-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What is the problem this feature would solve?
Right now the route is preferred when creating the root span name, for orpc handlers this becomes: GET /v1*
The underlying path however is: /v1/process/prc_01kadyd/schema
ctx: {
"traceId": "2b2822f1bc4af90e1a339f9edc42a02f",
"spanId": "ed3cd7e61617e082",
"traceFlags": 1,
"traceState": {
"_internalState": {}
}
}
path: "/v1/process/prc_01kadyd/schema"
route: "/v1*"
I would like to expose the path instead of the route so that the traces and spans become more readable in sentry.
What is the feature you are proposing to solve the problem?
I tried to do a one-liner fix on local:
onTransform(() => {
const { cookie, request, route, path } = context
if (route) {
rootSpan.updateName(
// @ts-ignore private property
`${method} ${route?.includes('*') ? path : route || path}`,
)
}
if (context.route) attributes['http.route'] = context.routeBut for some reason the root span still gets named after the route, despite the update executing.
What alternatives have you considered?
Exposing a getRootSpan() method to allow access to users for updateName before returning from the main handler.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request