mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Update tag in span based on Pyroscope API (#77701)
* Update tags key * Update link tags * Update test
This commit is contained in:
parent
6e929b2b53
commit
de9ee2e127
@ -1555,7 +1555,7 @@ function createTraceSpan(overrides: Partial<TraceSpan> = {}) {
|
||||
value: 'host',
|
||||
},
|
||||
{
|
||||
key: 'pyroscope.profiling.enabled',
|
||||
key: 'pyroscope.profile.id',
|
||||
value: 'hdgfljn23u982nj',
|
||||
},
|
||||
],
|
||||
|
@ -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[] = [];
|
||||
|
@ -533,7 +533,7 @@ export function transformTrace(
|
||||
groupBy: [],
|
||||
profileTypeId: traceToProfilesOptions.profileTypeId ?? '',
|
||||
queryType: 'profile',
|
||||
spanSelector: ['${__span.spanId}'],
|
||||
spanSelector: ['${__span.tags["pyroscope.profile.id"]}'],
|
||||
refId: 'profile',
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user