From d246c54dfee458b987368e88f1eff64cb0acf2fb Mon Sep 17 00:00:00 2001 From: Mark Wolff Date: Fri, 1 May 2020 14:07:08 -0400 Subject: [PATCH] fix: add missing error status handler (#1005) --- packages/opentelemetry-plugin-grpc/src/grpc.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/opentelemetry-plugin-grpc/src/grpc.ts b/packages/opentelemetry-plugin-grpc/src/grpc.ts index f53cd493ae..44efeb2a93 100644 --- a/packages/opentelemetry-plugin-grpc/src/grpc.ts +++ b/packages/opentelemetry-plugin-grpc/src/grpc.ts @@ -297,6 +297,10 @@ export class GrpcPlugin extends BasePlugin { }); call.on('error', (err: grpcTypes.ServiceError) => { + span.setStatus({ + code: _grpcStatusCodeToCanonicalCode(err.code), + message: err.message, + }); span.addEvent('finished with error'); span.setAttributes({ [AttributeNames.GRPC_ERROR_NAME]: err.name,