Tracing: Specify type of the data frame that is expected for TraceView (#31465)

* Use dataframe API for jeager

* Move types around

* Fix imports

* Simplify the data frame type

* Add comment

* Move the transform to separate file

* Fix logs timestamp

* Add/update tests for trace view

* Fix lint

* Add test to compare old and new format rendering

* Fix test imports

* Update data source tests
This commit is contained in:
Andrej Ocenas
2021-03-02 13:59:35 +01:00
committed by GitHub
parent d84cfdbb0f
commit c113d3ce72
48 changed files with 651 additions and 220 deletions

View File

@@ -0,0 +1,49 @@
import { TraceResponse } from './types';
export const testResponse: TraceResponse = {
traceID: '3fa414edcef6ad90',
spans: [
{
traceID: '3fa414edcef6ad90',
spanID: '3fa414edcef6ad90',
operationName: 'HTTP GET - api_traces_traceid',
references: [],
startTime: 1605873894680409,
duration: 1049141,
tags: [
{ key: 'sampler.type', type: 'string', value: 'probabilistic' },
{ key: 'sampler.param', type: 'float64', value: 1 },
],
logs: [],
processID: 'p1',
warnings: null,
flags: 0,
},
{
traceID: '3fa414edcef6ad90',
spanID: '0f5c1808567e4403',
operationName: '/tempopb.Querier/FindTraceByID',
references: [{ refType: 'CHILD_OF', traceID: '3fa414edcef6ad90', spanID: '3fa414edcef6ad90' }],
startTime: 1605873894680587,
duration: 1847,
tags: [
{ key: 'component', type: 'string', value: 'gRPC' },
{ key: 'span.kind', type: 'string', value: 'client' },
],
logs: [],
processID: 'p1',
warnings: null,
flags: 0,
},
],
processes: {
p1: {
serviceName: 'tempo-querier',
tags: [
{ key: 'cluster', type: 'string', value: 'ops-tools1' },
{ key: 'container', type: 'string', value: 'tempo-query' },
],
},
},
warnings: null,
};