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',
|
value: 'host',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'pyroscope.profiling.enabled',
|
key: 'pyroscope.profile.id',
|
||||||
value: 'hdgfljn23u982nj',
|
value: 'hdgfljn23u982nj',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -85,7 +85,7 @@ export function createSpanLinkFactory({
|
|||||||
profilesDataSourceSettings = getDatasourceSrv().getInstanceSettings(traceToProfilesOptions.datasourceUid);
|
profilesDataSourceSettings = getDatasourceSrv().getInstanceSettings(traceToProfilesOptions.datasourceUid);
|
||||||
}
|
}
|
||||||
const hasConfiguredPyroscopeDS = profilesDataSourceSettings?.type === 'grafana-pyroscope-datasource';
|
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;
|
const shouldCreatePyroscopeLink = hasConfiguredPyroscopeDS && hasPyroscopeProfile;
|
||||||
|
|
||||||
let links: ExploreFieldLinkModel[] = [];
|
let links: ExploreFieldLinkModel[] = [];
|
||||||
|
@ -533,7 +533,7 @@ export function transformTrace(
|
|||||||
groupBy: [],
|
groupBy: [],
|
||||||
profileTypeId: traceToProfilesOptions.profileTypeId ?? '',
|
profileTypeId: traceToProfilesOptions.profileTypeId ?? '',
|
||||||
queryType: 'profile',
|
queryType: 'profile',
|
||||||
spanSelector: ['${__span.spanId}'],
|
spanSelector: ['${__span.tags["pyroscope.profile.id"]}'],
|
||||||
refId: 'profile',
|
refId: 'profile',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user