Skip to content

Commit 8d9687d

Browse files
feat(fastify): Skip update HTTP's span name and update RpcMetadata's route instead (#1569)
Co-authored-by: Marc Pichler <[email protected]>
1 parent bf25eb1 commit 8d9687d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/node/opentelemetry-instrumentation-fastify/src/instrumentation.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ export class FastifyInstrumentation extends InstrumentationBase {
9696
const rpcMetadata = getRPCMetadata(context.active());
9797
const routeName = request.routerPath;
9898
if (routeName && rpcMetadata?.type === RPCType.HTTP) {
99-
rpcMetadata.span.setAttribute(SemanticAttributes.HTTP_ROUTE, routeName);
100-
rpcMetadata.span.updateName(`${request.method} ${routeName}`);
99+
rpcMetadata.route = routeName;
101100
}
102101
done();
103102
};

0 commit comments

Comments
 (0)