Skip to content

Commit

Permalink
fix: clientMethodTrace missing original properties
Browse files Browse the repository at this point in the history
  • Loading branch information
bgpo committed Dec 6, 2021
1 parent 3959386 commit 9c09376
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export class GrpcNativeInstrumentation extends InstrumentationBase<
const instrumentation = this;
return (original: GrpcClientFunc) => {
instrumentation._diag.debug('patch all client methods');
return function clientMethodTrace(this: grpcTypes.Client) {
function clientMethodTrace(this: grpcTypes.Client) {
const name = `grpc.${(original.path as string | undefined)?.replace(
'/',
''
Expand All @@ -304,7 +304,9 @@ export class GrpcNativeInstrumentation extends InstrumentationBase<
this
)(span)
);
};
}
Object.assign(clientMethodTrace, original);
return clientMethodTrace;
};
}
}

0 comments on commit 9c09376

Please sign in to comment.