Tempo: Copy full trace id on imported trace (#104264)

* Ensure all of trace id is copied

* Update tests
This commit is contained in:
Joey
2025-04-22 14:37:40 +01:00
committed by GitHub
parent 073e6dc98c
commit d1bbebcc7b
3 changed files with 4 additions and 4 deletions
@@ -303,7 +303,7 @@ describe('Tempo data source', () => {
const field = response.data[0].fields[0];
expect(field.name).toBe('traceID');
expect(field.type).toBe(FieldType.string);
expect(field.values[0]).toBe('60ba2abb44f13eae');
expect(field.values[0]).toBe('000000000000000060ba2abb44f13eae');
expect(field.values.length).toBe(6);
});
@@ -166,7 +166,7 @@ export function transformFromOTLP(
for (const librarySpan of data.instrumentationLibrarySpans) {
for (const span of librarySpan.spans) {
frame.add({
traceID: span.traceId.length > 16 ? span.traceId.slice(16) : span.traceId,
traceID: span.traceId,
spanID: span.spanId,
parentSpanID: span.parentSpanId || '',
operationName: span.name || '',
@@ -12,7 +12,7 @@ export const otlpDataFrameFromResponse = new MutableDataFrame({
name: 'traceID',
type: FieldType.string,
config: {},
values: ['60ba2abb44f13eae'],
values: ['000000000000000060ba2abb44f13eae'],
},
{
name: 'spanID',
@@ -188,7 +188,7 @@ export const otlpDataFrameToResponse = new MutableDataFrame({
name: 'traceID',
type: FieldType.string,
config: {},
values: ['60ba2abb44f13eae'],
values: ['000000000000000060ba2abb44f13eae'],
state: {
displayName: 'traceID',
},