diff --git a/public/app/features/explore/TraceView/createSpanLink.test.ts b/public/app/features/explore/TraceView/createSpanLink.test.ts index 743e3290c1f..9fd18ad6d5d 100644 --- a/public/app/features/explore/TraceView/createSpanLink.test.ts +++ b/public/app/features/explore/TraceView/createSpanLink.test.ts @@ -1555,7 +1555,7 @@ function createTraceSpan(overrides: Partial = {}) { value: 'host', }, { - key: 'pyroscope.profiling.enabled', + key: 'pyroscope.profile.id', value: 'hdgfljn23u982nj', }, ], diff --git a/public/app/features/explore/TraceView/createSpanLink.tsx b/public/app/features/explore/TraceView/createSpanLink.tsx index 4de87bdd33e..4feca94f259 100644 --- a/public/app/features/explore/TraceView/createSpanLink.tsx +++ b/public/app/features/explore/TraceView/createSpanLink.tsx @@ -85,7 +85,7 @@ export function createSpanLinkFactory({ profilesDataSourceSettings = getDatasourceSrv().getInstanceSettings(traceToProfilesOptions.datasourceUid); } const hasConfiguredPyroscopeDS = profilesDataSourceSettings?.type === 'grafana-pyroscope-datasource'; - const hasPyroscopeProfile = span.tags.filter((tag) => tag.key === 'pyroscope.profiling.enabled').length > 0; + const hasPyroscopeProfile = span.tags.filter((tag) => tag.key === 'pyroscope.profile.id').length > 0; const shouldCreatePyroscopeLink = hasConfiguredPyroscopeDS && hasPyroscopeProfile; let links: ExploreFieldLinkModel[] = []; diff --git a/public/app/plugins/datasource/tempo/resultTransformer.ts b/public/app/plugins/datasource/tempo/resultTransformer.ts index f56f06f9a7b..dfb68c4216c 100644 --- a/public/app/plugins/datasource/tempo/resultTransformer.ts +++ b/public/app/plugins/datasource/tempo/resultTransformer.ts @@ -533,7 +533,7 @@ export function transformTrace( groupBy: [], profileTypeId: traceToProfilesOptions.profileTypeId ?? '', queryType: 'profile', - spanSelector: ['${__span.spanId}'], + spanSelector: ['${__span.tags["pyroscope.profile.id"]}'], refId: 'profile', }, },