File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,9 @@ function routeMatchToParamSpanAttributes(match: VendoredTanstackRouterRouteMatch
119119
120120 const paramAttributes : Record < string , string > = { } ;
121121 Object . entries ( match . params ) . forEach ( ( [ key , value ] ) => {
122- paramAttributes [ `url.path.params.${ key } ` ] = value ;
122+ paramAttributes [ `url.path.params.${ key } ` ] = value ; // todo(v10): remove attribute which does not adhere to Sentry's semantic convention
123+ paramAttributes [ `url.path.parameter.${ key } ` ] = value ;
124+ paramAttributes [ `params.${ key } ` ] = value ; // params.[key] is an alias
123125 } ) ;
124126
125127 return paramAttributes ;
Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ export function instrumentVueRouter(
6161 const attributes : SpanAttributes = { } ;
6262
6363 for ( const key of Object . keys ( to . params ) ) {
64- attributes [ `params.${ key } ` ] = to . params [ key ] ;
64+ attributes [ `url.path.parameter.${ key } ` ] = to . params [ key ] ;
65+ attributes [ `params.${ key } ` ] = to . params [ key ] ; // params.[key] is an alias
6566 }
6667 for ( const key of Object . keys ( to . query ) ) {
6768 const value = to . query [ key ] ;
Original file line number Diff line number Diff line change @@ -423,6 +423,7 @@ function getAttributesForRoute(route: Route): SpanAttributes {
423423 const attributes : SpanAttributes = { } ;
424424
425425 for ( const key of Object . keys ( params ) ) {
426+ attributes [ `url.path.parameter.${ key } ` ] = params [ key ] ;
426427 attributes [ `params.${ key } ` ] = params [ key ] ;
427428 }
428429 for ( const key of Object . keys ( query ) ) {
You can’t perform that action at this time.
0 commit comments