Skip to content

Commit d55171f

Browse files
Prevent accessing deprecated Fastify property in NestJS instrumentation (#1699)
Co-authored-by: Amir Blum <[email protected]>
1 parent 76dd559 commit d55171f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/node/opentelemetry-instrumentation-nestjs-core/src/instrumentation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ function createWrapCreateHandler(tracer: api.Tracer, moduleVersion?: string) {
188188
[AttributeNames.TYPE]: NestType.REQUEST_CONTEXT,
189189
[SemanticAttributes.HTTP_METHOD]: req.method,
190190
[SemanticAttributes.HTTP_URL]: req.originalUrl || req.url,
191-
[SemanticAttributes.HTTP_ROUTE]: req.route?.path || req.routerPath,
191+
[SemanticAttributes.HTTP_ROUTE]:
192+
req.route?.path || req.routeOptions?.url || req.routerPath,
192193
[AttributeNames.CONTROLLER]: instanceName,
193194
[AttributeNames.CALLBACK]: callbackName,
194195
},

0 commit comments

Comments
 (0)