Skip to content

Commit cfd18f7

Browse files
committed
fix(node): Use snake_case for Fastify's request-handler op.
1 parent 2a2e8cb commit cfd18f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dev-packages/e2e-tests/test-applications/nestjs-fastify/tests/transactions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ test('Sends an API route transaction', async ({ baseURL }) => {
8080
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
8181
data: {
8282
'sentry.origin': 'auto.http.otel.fastify',
83-
'sentry.op': 'request-handler.fastify',
83+
'sentry.op': 'request_handler.fastify',
8484
'service.name': 'fastify',
8585
'hook.name': 'fastify -> @fastify/otel -> @fastify/middie - route-handler',
8686
'fastify.type': 'request-handler',
8787
'http.route': '/test-transaction',
8888
'hook.callback.name': 'anonymous',
8989
},
9090
description: '@fastify/middie - route-handler',
91-
op: 'request-handler.fastify',
91+
op: 'request_handler.fastify',
9292
parent_span_id: expect.stringMatching(/[a-f0-9]{16}/),
9393
start_timestamp: expect.any(Number),
9494
timestamp: expect.any(Number),

packages/node/src/integrations/tracing/fastify/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function addFastifySpanAttributes(span: Span): void {
282282
return;
283283
}
284284

285-
const opPrefix = isHook ? 'hook' : isHandler ? 'middleware' : isRequestHandler ? 'request-handler' : '<unknown>';
285+
const opPrefix = isHook ? 'hook' : isHandler ? 'middleware' : isRequestHandler ? 'request_handler' : '<unknown>';
286286

287287
span.setAttributes({
288288
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.fastify',

0 commit comments

Comments
 (0)