File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -31,20 +31,15 @@ class OpenTelemetryTracer {
3131 this . exporter = new TraceExporter ( traceExporterOptions ) ;
3232 this . provider . addSpanProcessor ( new SimpleSpanProcessor ( this . exporter ) ) ;
3333 this . provider . register ( ) ;
34- this . createTracerHOF = this . createTracerHOF . bind ( this ) ;
3534 }
3635
37- get tracer ( ) {
36+ getTracer ( ) {
3837 return opentelemetry . trace . getTracer ( this . serviceName ) ;
3938 }
4039
4140 createTracerHOF ( originalFunction ) {
42- const thisArg = {
43- tracer : this . tracer ,
44- } ;
45-
4641 return async function ( ...args ) {
47- return await originalFunction . call ( thisArg , ...args ) ;
42+ return await originalFunction . call ( null , ...args , this . getTracer ( ) ) ;
4843 } . bind ( this ) ;
4944 }
5045}
Original file line number Diff line number Diff line change 11{
22 "name" : " opentelemetry-cloud-functions" ,
3- "version" : " 0.1.5 " ,
3+ "version" : " 0.1.6 " ,
44 "description" : " OpenTelemetry for Google Cloud Functions (Pub/Sub)." ,
55 "main" : " index.js" ,
66 "contributors" : [
You can’t perform that action at this time.
0 commit comments