Tempo: Rename metrics for service graph (#40584)

* Rename tempo -> traces

* Fix tests

Co-authored-by: Ivana <ivana.huckova@gmail.com>
This commit is contained in:
Andrej Ocenas 2021-10-19 11:58:21 +02:00 committed by GitHub
parent 6d4088292c
commit b9ff68d4d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View File

@ -255,7 +255,7 @@ const defaultSettings: DataSourceInstanceSettings<TempoJsonData> = {
};
const totalsPromMetric = new MutableDataFrame({
refId: 'tempo_service_graph_request_total',
refId: 'traces_service_graph_request_total',
fields: [
{ name: 'Time', values: [1628169788000, 1628169788000] },
{ name: 'client', values: ['app', 'lb'] },
@ -263,12 +263,12 @@ const totalsPromMetric = new MutableDataFrame({
{ name: 'job', values: ['local_scrape', 'local_scrape'] },
{ name: 'server', values: ['db', 'app'] },
{ name: 'tempo_config', values: ['default', 'default'] },
{ name: 'Value #tempo_service_graph_request_total', values: [10, 20] },
{ name: 'Value #traces_service_graph_request_total', values: [10, 20] },
],
});
const secondsPromMetric = new MutableDataFrame({
refId: 'tempo_service_graph_request_server_seconds_sum',
refId: 'traces_service_graph_request_server_seconds_sum',
fields: [
{ name: 'Time', values: [1628169788000, 1628169788000] },
{ name: 'client', values: ['app', 'lb'] },
@ -276,7 +276,7 @@ const secondsPromMetric = new MutableDataFrame({
{ name: 'job', values: ['local_scrape', 'local_scrape'] },
{ name: 'server', values: ['db', 'app'] },
{ name: 'tempo_config', values: ['default', 'default'] },
{ name: 'Value #tempo_service_graph_request_server_seconds_sum', values: [10, 40] },
{ name: 'Value #traces_service_graph_request_server_seconds_sum', values: [10, 40] },
],
});

View File

@ -110,7 +110,7 @@ const missingSpanResponse = new MutableDataFrame({
});
const totalsPromMetric = new MutableDataFrame({
refId: 'tempo_service_graph_request_total',
refId: 'traces_service_graph_request_total',
fields: [
{ name: 'Time', values: [1628169788000, 1628169788000] },
{ name: 'client', values: ['app', 'lb'] },
@ -118,12 +118,12 @@ const totalsPromMetric = new MutableDataFrame({
{ name: 'job', values: ['local_scrape', 'local_scrape'] },
{ name: 'server', values: ['db', 'app'] },
{ name: 'tempo_config', values: ['default', 'default'] },
{ name: 'Value #tempo_service_graph_request_total', values: [10, 20] },
{ name: 'Value #traces_service_graph_request_total', values: [10, 20] },
],
});
const secondsPromMetric = new MutableDataFrame({
refId: 'tempo_service_graph_request_server_seconds_sum',
refId: 'traces_service_graph_request_server_seconds_sum',
fields: [
{ name: 'Time', values: [1628169788000, 1628169788000] },
{ name: 'client', values: ['app', 'lb'] },
@ -131,6 +131,6 @@ const secondsPromMetric = new MutableDataFrame({
{ name: 'job', values: ['local_scrape', 'local_scrape'] },
{ name: 'server', values: ['db', 'app'] },
{ name: 'tempo_config', values: ['default', 'default'] },
{ name: 'Value #tempo_service_graph_request_server_seconds_sum', values: [10, 40] },
{ name: 'Value #traces_service_graph_request_server_seconds_sum', values: [10, 40] },
],
});

View File

@ -127,18 +127,18 @@ function findTraceDuration(view: DataFrameView<Row>): number {
return traceEndTime - traceStartTime;
}
const secondsMetric = 'tempo_service_graph_request_server_seconds_sum';
const totalsMetric = 'tempo_service_graph_request_total';
const secondsMetric = 'traces_service_graph_request_server_seconds_sum';
const totalsMetric = 'traces_service_graph_request_total';
export const serviceMapMetrics = [
secondsMetric,
totalsMetric,
// We don't show histogram in node graph at the moment but we could later add that into a node context menu.
// 'tempo_service_graph_request_seconds_bucket',
// 'tempo_service_graph_request_seconds_count',
// 'traces_service_graph_request_seconds_bucket',
// 'traces_service_graph_request_seconds_count',
// These are used for debugging the tempo collection so probably not useful for service map right now.
// 'tempo_service_graph_unpaired_spans_total',
// 'tempo_service_graph_untagged_spans_total',
// 'traces_service_graph_unpaired_spans_total',
// 'traces_service_graph_untagged_spans_total',
];
/**