Skip to content

Commit

Permalink
feat(fastify): Skip update HTTP's span name and update RpcMetadata's …
Browse files Browse the repository at this point in the history
…route instead (#1569)

Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
  • Loading branch information
chigia001 and pichlermarc authored Jul 12, 2023
1 parent bf25eb1 commit 8d9687d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ export class FastifyInstrumentation extends InstrumentationBase {
const rpcMetadata = getRPCMetadata(context.active());
const routeName = request.routerPath;
if (routeName && rpcMetadata?.type === RPCType.HTTP) {
rpcMetadata.span.setAttribute(SemanticAttributes.HTTP_ROUTE, routeName);
rpcMetadata.span.updateName(`${request.method} ${routeName}`);
rpcMetadata.route = routeName;
}
done();
};
Expand Down

0 comments on commit 8d9687d

Please sign in to comment.