mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 12:14:08 -06:00
Tracing: Add string unit to trace search results to prevent Infinity bug (#48206)
This commit is contained in:
parent
8126331f66
commit
4e6c3be7ab
@ -71,6 +71,7 @@ export function createTableFrame(data: TraceResponse[], instanceSettings: DataSo
|
||||
name: 'traceID',
|
||||
type: FieldType.string,
|
||||
config: {
|
||||
unit: 'string',
|
||||
displayNameFromDS: 'Trace ID',
|
||||
links: [
|
||||
{
|
||||
|
@ -102,6 +102,9 @@ describe('createTableFrameFromSearch()', () => {
|
||||
expect(frame.fields[0].name).toBe('traceID');
|
||||
expect(frame.fields[0].values.get(0)).toBe('e641dcac1c3a0565');
|
||||
|
||||
// TraceID must have unit = 'string' to prevent the ID from rendering as Infinity
|
||||
expect(frame.fields[0].config.unit).toBe('string');
|
||||
|
||||
expect(frame.fields[1].name).toBe('traceName');
|
||||
expect(frame.fields[1].values.get(0)).toBe('c10d7ca4e3a00354 ');
|
||||
|
||||
|
@ -600,6 +600,7 @@ export function createTableFrameFromSearch(data: SearchResponse[], instanceSetti
|
||||
name: 'traceID',
|
||||
type: FieldType.string,
|
||||
config: {
|
||||
unit: 'string',
|
||||
displayNameFromDS: 'Trace ID',
|
||||
links: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user