-
Notifications
You must be signed in to change notification settings - Fork 539
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hopefully helpful comment on when routeOptions.url became available
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ export class FastifyInstrumentation extends InstrumentationBase { | |
|
||
const rpcMetadata = getRPCMetadata(context.active()); | ||
const routeName = anyRequest.routeOptions | ||
? anyRequest.routeOptions.url | ||
? anyRequest.routeOptions.url // since [email protected] | ||
: request.routerPath; | ||
if (routeName && rpcMetadata?.type === RPCType.HTTP) { | ||
rpcMetadata.route = routeName; | ||
|
@@ -279,7 +279,7 @@ export class FastifyInstrumentation extends InstrumentationBase { | |
[AttributeNames.PLUGIN_NAME]: this.pluginName, | ||
[AttributeNames.FASTIFY_TYPE]: FastifyTypes.REQUEST_HANDLER, | ||
[SemanticAttributes.HTTP_ROUTE]: anyRequest.routeOptions | ||
? anyRequest.routeOptions.url | ||
? anyRequest.routeOptions.url // since [email protected] | ||
: request.routerPath, | ||
}; | ||
if (handlerName) { | ||
|