Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/react/src/tanstackrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ function routeMatchToParamSpanAttributes(match: VendoredTanstackRouterRouteMatch

const paramAttributes: Record<string, string> = {};
Object.entries(match.params).forEach(([key, value]) => {
paramAttributes[`url.path.params.${key}`] = value;
paramAttributes[`url.path.params.${key}`] = value; // todo(v10): remove attribute which does not adhere to Sentry's semantic convention
paramAttributes[`url.path.parameter.${key}`] = value;
paramAttributes[`params.${key}`] = value; // params.[key] is an alias
});

return paramAttributes;
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export function instrumentVueRouter(
const attributes: SpanAttributes = {};

for (const key of Object.keys(to.params)) {
attributes[`params.${key}`] = to.params[key];
attributes[`url.path.parameter.${key}`] = to.params[key];
attributes[`params.${key}`] = to.params[key]; // params.[key] is an alias
}
for (const key of Object.keys(to.query)) {
const value = to.query[key];
Expand Down
Loading