File tree Expand file tree Collapse file tree 4 files changed +16
-13
lines changed
plugins/node/opentelemetry-instrumentation-oracledb/src Expand file tree Collapse file tree 4 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ export enum AttributeNames {
2525 ORACLE_EXEC_OPTIONS = 'db.oracle.exec.options' ,
2626 ORACLE_INSTANCE = 'db.oracle.instance' ,
2727 ORACLE_PDBNAME = 'db.oracle.pdbname' ,
28- ORACLE_IMPLICIT_RELEASE = 'db.oracle.ImplicitRelease ' ,
28+ ORACLE_IMPLICIT_RELEASE = 'db.oracle.implicit_release ' ,
2929}
3030
3131// Contains span names produced by instrumentation
32+ // It lists the RPC names (suffix with _MSG like EXECUTE_MSG) and
33+ // exported oracledb functions (like EXECUTE).
3234export enum SpanNames {
3335 CONNECT = 'oracledb.getConnection' ,
3436 POOL_CONNECT = 'oracledb.Pool.getConnection' ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import * as utils from './utils';
2525import { PACKAGE_NAME , PACKAGE_VERSION } from './version' ;
2626
2727export class OracleInstrumentation extends InstrumentationBase {
28- private _tmHandler ! : utils . OracleTelemetryTraceHandler | null ;
28+ private _tmHandler : utils . OracleTelemetryTraceHandler | null = null ;
2929
3030 constructor ( config : OracleInstrumentationConfig = { } ) {
3131 super ( PACKAGE_NAME , PACKAGE_VERSION , config ) ;
Original file line number Diff line number Diff line change @@ -20,26 +20,27 @@ import * as oracledbTypes from 'oracledb';
2020import type * as api from '@opentelemetry/api' ;
2121import { SpanConnectionConfig } from './types' ;
2222
23- // Captures the context associated with onEnterFn, onExitFn hooks.
23+ // onEnterFn returns this Context(contains only span for now) and it is
24+ // received in onExitFn to end the span.
2425export interface InstrumentationContext {
2526 span : api . Span ;
2627}
2728
2829// Captures the entire span data
2930export interface TraceSpanData {
30- operation : string ;
31+ operation : string ; // RPC or exported function name.
3132 error ?: oracledbTypes . DBError ;
3233 connectLevelConfig ?: SpanConnectionConfig ;
3334 callLevelConfig ?: SpanCallLevelConfig ;
34- additionalConfig ?: any ;
35- fn : Function ;
36- args ?: any [ ] ;
35+ additionalConfig ?: any ; // custom key/values associated with a function.
36+ fn : Function ; // Replaced with bind function associating the active context.
37+ args ?: any [ ] ; // input arguments passed to the exported function.
3738 userContext : InstrumentationContext ;
3839}
3940
4041// Captures call level related span data
4142export interface SpanCallLevelConfig {
42- statement ?: string ;
43- operation ?: string ;
44- values ?: any [ ] ;
43+ statement ?: string ; // SQL stmt.
44+ operation ?: string ; // SQL op ('SELECT | INSERT ..').
45+ values ?: any [ ] ; // bind values.
4546}
Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ export interface SpanConnectionConfig {
2929 instanceName ?: string ;
3030 serverMode ?: string ;
3131 pdbName ?: string ;
32- poolMin ?: string ;
33- poolMax ?: string ;
34- poolIncrement ?: string ;
32+ poolMin ?: number ;
33+ poolMax ?: number ;
34+ poolIncrement ?: number ;
3535}
3636
3737export interface OracleRequestHookInformation {
You can’t perform that action at this time.
0 commit comments