@@ -17,7 +17,7 @@ import {
1717 InstrumentationConfig ,
1818 InstrumentationNodeModuleDefinition ,
1919} from "@opentelemetry/instrumentation" ;
20- import type * as kdb from "@kurrent/kurrentdb-client" ;
20+ import type * as kurrentdb from "@kurrent/kurrentdb-client" ;
2121import type {
2222 AppendResult ,
2323 BinaryEventType ,
@@ -61,7 +61,7 @@ export class Instrumentation extends InstrumentationBase {
6161 }
6262
6363 private _onPatchMain ( ) {
64- return ( moduleExports : typeof kdb ) => {
64+ return ( moduleExports : typeof kurrentdb ) => {
6565 this . wrap (
6666 moduleExports . KurrentDBClient . prototype ,
6767 "appendToStream" ,
@@ -102,7 +102,7 @@ export class Instrumentation extends InstrumentationBase {
102102 }
103103
104104 private _onUnPatchMain ( ) {
105- return ( moduleExports : typeof kdb ) => {
105+ return ( moduleExports : typeof kurrentdb ) => {
106106 this . _diag . debug ( "un-patching" ) ;
107107
108108 this . _unwrap ( moduleExports . KurrentDBClient . prototype , "appendToStream" ) ;
@@ -123,17 +123,17 @@ export class Instrumentation extends InstrumentationBase {
123123
124124 private _patchAppendToStream ( ) : (
125125 original : Function ,
126- operation : keyof kdb . KurrentDBClient
126+ operation : keyof kurrentdb . KurrentDBClient
127127 ) => ( ...args : AppendToStreamParams ) => Promise < AppendResult > {
128128 const instrumentation = this ;
129129 const tracer = instrumentation . tracer ;
130130
131131 return function appendToStream (
132132 original : Function ,
133- operation : keyof kdb . KurrentDBClient
133+ operation : keyof kurrentdb . KurrentDBClient
134134 ) {
135135 return async function (
136- this : kdb . KurrentDBClient ,
136+ this : kurrentdb . KurrentDBClient ,
137137 ...args : AppendToStreamParams
138138 ) : Promise < AppendResult > {
139139 const [ streamName , events , options ] = [ ...args ] ;
@@ -261,17 +261,17 @@ export class Instrumentation extends InstrumentationBase {
261261
262262 private _patchCatchUpSubscription ( ) : (
263263 original : Function ,
264- operation : keyof kdb . KurrentDBClient
264+ operation : keyof kurrentdb . KurrentDBClient
265265 ) => ( ...args : any ) => any {
266266 const instrumentation = this ;
267267 const tracer = instrumentation . tracer ;
268268
269269 return function subscribe < KnownEventType extends EventType = EventType > (
270270 original : Function ,
271- operation : keyof kdb . KurrentDBClient
271+ operation : keyof kurrentdb . KurrentDBClient
272272 ) {
273273 return function (
274- this : kdb . KurrentDBClient ,
274+ this : kurrentdb . KurrentDBClient ,
275275 ...args : SubscribeParameters
276276 ) {
277277 let options :
@@ -308,17 +308,17 @@ export class Instrumentation extends InstrumentationBase {
308308
309309 private _patchPersistentSubscription ( ) : (
310310 original : Function ,
311- operation : keyof kdb . KurrentDBClient
311+ operation : keyof kurrentdb . KurrentDBClient
312312 ) => ( ...args : any ) => any {
313313 const instrumentation = this ;
314314 const tracer = instrumentation . tracer ;
315315
316316 return function subscribe < E > (
317317 original : Function ,
318- operation : keyof kdb . KurrentDBClient
318+ operation : keyof kurrentdb . KurrentDBClient
319319 ) {
320320 return function (
321- this : kdb . KurrentDBClient ,
321+ this : kurrentdb . KurrentDBClient ,
322322 ...args : PersistentSubscribeParameters
323323 ) {
324324 let options :
@@ -353,7 +353,7 @@ export class Instrumentation extends InstrumentationBase {
353353 }
354354
355355 private static restoreContext = (
356- metadata : kdb . MetadataType ,
356+ metadata : kurrentdb . MetadataType ,
357357 isRemote = true
358358 ) : Context => {
359359 const traceId = metadata [ TRACE_ID ] as string ;
0 commit comments