mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Download span references in data inspector (#47074)
* Tempo: Download span references in data inspector
This commit is contained in:
parent
a571fcda6e
commit
5a87d12e8c
@ -29,7 +29,7 @@ export function JSONViewCell(props: TableCellProps): JSX.Element {
|
|||||||
return (
|
return (
|
||||||
<div {...cellProps} className={inspectEnabled ? tableStyles.cellContainerNoOverflow : tableStyles.cellContainer}>
|
<div {...cellProps} className={inspectEnabled ? tableStyles.cellContainerNoOverflow : tableStyles.cellContainer}>
|
||||||
<div className={cx(tableStyles.cellText, txt)}>
|
<div className={cx(tableStyles.cellText, txt)}>
|
||||||
{!link && <div className={tableStyles.cellText}>{value}</div>}
|
{!link && <div className={tableStyles.cellText}>{displayValue}</div>}
|
||||||
{link && (
|
{link && (
|
||||||
<a
|
<a
|
||||||
href={link.href}
|
href={link.href}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { css } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { Icon, useStyles2 } from '@grafana/ui';
|
import { Icon, useStyles2 } from '@grafana/ui';
|
||||||
|
|
||||||
import AccordianKeyValues from './AccordianKeyValues';
|
import AccordianKeyValues from './AccordianKeyValues';
|
||||||
@ -98,6 +98,9 @@ const getStyles = (theme: GrafanaTheme2) => {
|
|||||||
content: attr(data-label);
|
content: attr(data-label);
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
serviceName: css`
|
||||||
|
margin-right: 8px;
|
||||||
|
`,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -134,7 +137,9 @@ export function References(props: ReferenceItemProps) {
|
|||||||
<span className={styles.itemContent}>
|
<span className={styles.itemContent}>
|
||||||
{reference.span ? (
|
{reference.span ? (
|
||||||
<span>
|
<span>
|
||||||
<span className="span-svc-name">{reference.span.process.serviceName}</span>
|
<span className={cx('span-svc-name', styles.serviceName)}>
|
||||||
|
{reference.span.process.serviceName}
|
||||||
|
</span>
|
||||||
<small className="endpoint-name">{reference.span.operationName}</small>
|
<small className="endpoint-name">{reference.span.operationName}</small>
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
|
@ -3,12 +3,42 @@
|
|||||||
{
|
{
|
||||||
"resource": {
|
"resource": {
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "service.name", "value": { "stringValue": "db" } },
|
{
|
||||||
{ "key": "job", "value": { "stringValue": "tns/db" } },
|
"key": "service.name",
|
||||||
{ "key": "opencensus.exporterversion", "value": { "stringValue": "Jaeger-Go-2.22.1" } },
|
"value": {
|
||||||
{ "key": "host.name", "value": { "stringValue": "63d16772b4a2" } },
|
"stringValue": "db"
|
||||||
{ "key": "ip", "value": { "stringValue": "172.24.0.2" } },
|
}
|
||||||
{ "key": "client-uuid", "value": { "stringValue": "39fb01637a579639" } }
|
},
|
||||||
|
{
|
||||||
|
"key": "job",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tns/db"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "opencensus.exporterversion",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Jaeger-Go-2.22.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host.name",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "63d16772b4a2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ip",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "client-uuid",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "39fb01637a579639"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"instrumentationLibrarySpans": [
|
"instrumentationLibrarySpans": [
|
||||||
@ -24,10 +54,55 @@
|
|||||||
"startTimeUnixNano": "1627471657255809000",
|
"startTimeUnixNano": "1627471657255809000",
|
||||||
"endTimeUnixNano": "1627471657256268000",
|
"endTimeUnixNano": "1627471657256268000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "http.status_code", "value": { "intValue": "200" } },
|
{
|
||||||
{ "key": "http.method", "value": { "stringValue": "GET" } },
|
"key": "http.status_code",
|
||||||
{ "key": "http.url", "value": { "stringValue": "/" } },
|
"value": {
|
||||||
{ "key": "component", "value": { "stringValue": "net/http" } }
|
"intValue": "200"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.method",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GET"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.url",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "component",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "net/http"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"spanId": "spanId",
|
||||||
|
"traceId": "traceId",
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "key",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Value"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "intValue",
|
||||||
|
"value": {
|
||||||
|
"intValue": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"spanId": "spanId2",
|
||||||
|
"traceId": "traceId2",
|
||||||
|
"attributes": []
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"status": {}
|
"status": {}
|
||||||
}
|
}
|
||||||
@ -38,12 +113,42 @@
|
|||||||
{
|
{
|
||||||
"resource": {
|
"resource": {
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "service.name", "value": { "stringValue": "app" } },
|
{
|
||||||
{ "key": "job", "value": { "stringValue": "tns/app" } },
|
"key": "service.name",
|
||||||
{ "key": "opencensus.exporterversion", "value": { "stringValue": "Jaeger-Go-2.22.1" } },
|
"value": {
|
||||||
{ "key": "host.name", "value": { "stringValue": "f68212e86151" } },
|
"stringValue": "app"
|
||||||
{ "key": "ip", "value": { "stringValue": "172.24.0.7" } },
|
}
|
||||||
{ "key": "client-uuid", "value": { "stringValue": "8b6e8600b53a24" } }
|
},
|
||||||
|
{
|
||||||
|
"key": "job",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tns/app"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "opencensus.exporterversion",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Jaeger-Go-2.22.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host.name",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "f68212e86151"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ip",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "client-uuid",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "8b6e8600b53a24"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"instrumentationLibrarySpans": [
|
"instrumentationLibrarySpans": [
|
||||||
@ -66,12 +171,42 @@
|
|||||||
{
|
{
|
||||||
"resource": {
|
"resource": {
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "service.name", "value": { "stringValue": "lb" } },
|
{
|
||||||
{ "key": "job", "value": { "stringValue": "tns/loadgen" } },
|
"key": "service.name",
|
||||||
{ "key": "opencensus.exporterversion", "value": { "stringValue": "Jaeger-Go-2.22.1" } },
|
"value": {
|
||||||
{ "key": "host.name", "value": { "stringValue": "6475ba6d3c8b" } },
|
"stringValue": "lb"
|
||||||
{ "key": "ip", "value": { "stringValue": "172.24.0.8" } },
|
}
|
||||||
{ "key": "client-uuid", "value": { "stringValue": "535eb863d7ade742" } }
|
},
|
||||||
|
{
|
||||||
|
"key": "job",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tns/loadgen"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "opencensus.exporterversion",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Jaeger-Go-2.22.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host.name",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "6475ba6d3c8b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ip",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "client-uuid",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "535eb863d7ade742"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"instrumentationLibrarySpans": [
|
"instrumentationLibrarySpans": [
|
||||||
@ -85,8 +220,18 @@
|
|||||||
"startTimeUnixNano": "1627471657247632000",
|
"startTimeUnixNano": "1627471657247632000",
|
||||||
"endTimeUnixNano": "1627471657260233000",
|
"endTimeUnixNano": "1627471657260233000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "sampler.type", "value": { "stringValue": "const" } },
|
{
|
||||||
{ "key": "sampler.param", "value": { "boolValue": true } }
|
"key": "sampler.type",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "const"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "sampler.param",
|
||||||
|
"value": {
|
||||||
|
"boolValue": true
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"status": {}
|
"status": {}
|
||||||
}
|
}
|
||||||
@ -97,12 +242,42 @@
|
|||||||
{
|
{
|
||||||
"resource": {
|
"resource": {
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "service.name", "value": { "stringValue": "lb" } },
|
{
|
||||||
{ "key": "job", "value": { "stringValue": "tns/loadgen" } },
|
"key": "service.name",
|
||||||
{ "key": "opencensus.exporterversion", "value": { "stringValue": "Jaeger-Go-2.22.1" } },
|
"value": {
|
||||||
{ "key": "host.name", "value": { "stringValue": "6475ba6d3c8b" } },
|
"stringValue": "lb"
|
||||||
{ "key": "ip", "value": { "stringValue": "172.24.0.8" } },
|
}
|
||||||
{ "key": "client-uuid", "value": { "stringValue": "535eb863d7ade742" } }
|
},
|
||||||
|
{
|
||||||
|
"key": "job",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tns/loadgen"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "opencensus.exporterversion",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Jaeger-Go-2.22.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host.name",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "6475ba6d3c8b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ip",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "client-uuid",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "535eb863d7ade742"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"instrumentationLibrarySpans": [
|
"instrumentationLibrarySpans": [
|
||||||
@ -118,67 +293,189 @@
|
|||||||
"startTimeUnixNano": "1627471657247674000",
|
"startTimeUnixNano": "1627471657247674000",
|
||||||
"endTimeUnixNano": "1627471657261178000",
|
"endTimeUnixNano": "1627471657261178000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "http.status_code", "value": { "intValue": "200" } },
|
{
|
||||||
{ "key": "component", "value": { "stringValue": "net/http" } },
|
"key": "http.status_code",
|
||||||
{ "key": "http.method", "value": { "stringValue": "GET" } },
|
"value": {
|
||||||
{ "key": "http.url", "value": { "stringValue": "app:80" } },
|
"intValue": "200"
|
||||||
{ "key": "net/http.reused", "value": { "boolValue": false } },
|
}
|
||||||
{ "key": "net/http.was_idle", "value": { "boolValue": false } }
|
},
|
||||||
|
{
|
||||||
|
"key": "component",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "net/http"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.method",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GET"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.url",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "app:80"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "net/http.reused",
|
||||||
|
"value": {
|
||||||
|
"boolValue": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "net/http.was_idle",
|
||||||
|
"value": {
|
||||||
|
"boolValue": false
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"events": [
|
"events": [
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657247711000",
|
"timeUnixNano": "1627471657247711000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "GetConn" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GetConn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657247822000",
|
"timeUnixNano": "1627471657247822000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "DNSStart" } },
|
{
|
||||||
{ "key": "host", "value": { "stringValue": "app" } }
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "DNSStart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "app"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657249309000",
|
"timeUnixNano": "1627471657249309000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "DNSDone" } },
|
{
|
||||||
{ "key": "addr", "value": { "stringValue": "172.24.0.7" } }
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "DNSDone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "addr",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657249395000",
|
"timeUnixNano": "1627471657249395000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "ConnectStart" } },
|
{
|
||||||
{ "key": "network", "value": { "stringValue": "tcp" } },
|
"key": "event",
|
||||||
{ "key": "addr", "value": { "stringValue": "172.24.0.7:80" } }
|
"value": {
|
||||||
|
"stringValue": "ConnectStart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "network",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tcp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "addr",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.7:80"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657250250000",
|
"timeUnixNano": "1627471657250250000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "ConnectDone" } },
|
{
|
||||||
{ "key": "network", "value": { "stringValue": "tcp" } },
|
"key": "event",
|
||||||
{ "key": "addr", "value": { "stringValue": "172.24.0.7:80" } }
|
"value": {
|
||||||
|
"stringValue": "ConnectDone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "network",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tcp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "addr",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.7:80"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657250313000",
|
"timeUnixNano": "1627471657250313000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "GotConn" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GotConn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657250446000",
|
"timeUnixNano": "1627471657250446000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "WroteHeaders" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "WroteHeaders"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657250465000",
|
"timeUnixNano": "1627471657250465000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "WroteRequest" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "WroteRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657260087000",
|
"timeUnixNano": "1627471657260087000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "GotFirstResponseByte" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GotFirstResponseByte"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657260804000",
|
"timeUnixNano": "1627471657260804000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "ClosedBody" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "ClosedBody"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status": {}
|
"status": {}
|
||||||
@ -190,12 +487,42 @@
|
|||||||
{
|
{
|
||||||
"resource": {
|
"resource": {
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "service.name", "value": { "stringValue": "app" } },
|
{
|
||||||
{ "key": "job", "value": { "stringValue": "tns/app" } },
|
"key": "service.name",
|
||||||
{ "key": "opencensus.exporterversion", "value": { "stringValue": "Jaeger-Go-2.22.1" } },
|
"value": {
|
||||||
{ "key": "host.name", "value": { "stringValue": "f68212e86151" } },
|
"stringValue": "app"
|
||||||
{ "key": "ip", "value": { "stringValue": "172.24.0.7" } },
|
}
|
||||||
{ "key": "client-uuid", "value": { "stringValue": "8b6e8600b53a24" } }
|
},
|
||||||
|
{
|
||||||
|
"key": "job",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tns/app"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "opencensus.exporterversion",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Jaeger-Go-2.22.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host.name",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "f68212e86151"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ip",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "client-uuid",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "8b6e8600b53a24"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"instrumentationLibrarySpans": [
|
"instrumentationLibrarySpans": [
|
||||||
@ -211,67 +538,189 @@
|
|||||||
"startTimeUnixNano": "1627471657251445000",
|
"startTimeUnixNano": "1627471657251445000",
|
||||||
"endTimeUnixNano": "1627471657260828000",
|
"endTimeUnixNano": "1627471657260828000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "http.status_code", "value": { "intValue": "200" } },
|
{
|
||||||
{ "key": "component", "value": { "stringValue": "net/http" } },
|
"key": "http.status_code",
|
||||||
{ "key": "http.method", "value": { "stringValue": "GET" } },
|
"value": {
|
||||||
{ "key": "http.url", "value": { "stringValue": "db:80" } },
|
"intValue": "200"
|
||||||
{ "key": "net/http.reused", "value": { "boolValue": false } },
|
}
|
||||||
{ "key": "net/http.was_idle", "value": { "boolValue": false } }
|
},
|
||||||
|
{
|
||||||
|
"key": "component",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "net/http"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.method",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GET"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.url",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "db:80"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "net/http.reused",
|
||||||
|
"value": {
|
||||||
|
"boolValue": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "net/http.was_idle",
|
||||||
|
"value": {
|
||||||
|
"boolValue": false
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"events": [
|
"events": [
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657251575000",
|
"timeUnixNano": "1627471657251575000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "GetConn" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GetConn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657251700000",
|
"timeUnixNano": "1627471657251700000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "DNSStart" } },
|
{
|
||||||
{ "key": "host", "value": { "stringValue": "db" } }
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "DNSStart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "db"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657254144000",
|
"timeUnixNano": "1627471657254144000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "DNSDone" } },
|
{
|
||||||
{ "key": "addr", "value": { "stringValue": "172.24.0.2" } }
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "DNSDone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "addr",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657254295000",
|
"timeUnixNano": "1627471657254295000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "ConnectStart" } },
|
{
|
||||||
{ "key": "network", "value": { "stringValue": "tcp" } },
|
"key": "event",
|
||||||
{ "key": "addr", "value": { "stringValue": "172.24.0.2:80" } }
|
"value": {
|
||||||
|
"stringValue": "ConnectStart"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "network",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tcp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "addr",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.2:80"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657255054000",
|
"timeUnixNano": "1627471657255054000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "event", "value": { "stringValue": "ConnectDone" } },
|
{
|
||||||
{ "key": "network", "value": { "stringValue": "tcp" } },
|
"key": "event",
|
||||||
{ "key": "addr", "value": { "stringValue": "172.24.0.2:80" } }
|
"value": {
|
||||||
|
"stringValue": "ConnectDone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "network",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tcp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "addr",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.2:80"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657255199000",
|
"timeUnixNano": "1627471657255199000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "GotConn" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GotConn"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657255257000",
|
"timeUnixNano": "1627471657255257000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "WroteHeaders" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "WroteHeaders"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657255274000",
|
"timeUnixNano": "1627471657255274000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "WroteRequest" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "WroteRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657258308000",
|
"timeUnixNano": "1627471657258308000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "GotFirstResponseByte" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GotFirstResponseByte"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"timeUnixNano": "1627471657260811000",
|
"timeUnixNano": "1627471657260811000",
|
||||||
"attributes": [{ "key": "event", "value": { "stringValue": "ClosedBody" } }]
|
"attributes": [
|
||||||
|
{
|
||||||
|
"key": "event",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "ClosedBody"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status": {}
|
"status": {}
|
||||||
@ -283,12 +732,42 @@
|
|||||||
{
|
{
|
||||||
"resource": {
|
"resource": {
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "service.name", "value": { "stringValue": "app" } },
|
{
|
||||||
{ "key": "job", "value": { "stringValue": "tns/app" } },
|
"key": "service.name",
|
||||||
{ "key": "opencensus.exporterversion", "value": { "stringValue": "Jaeger-Go-2.22.1" } },
|
"value": {
|
||||||
{ "key": "host.name", "value": { "stringValue": "f68212e86151" } },
|
"stringValue": "app"
|
||||||
{ "key": "ip", "value": { "stringValue": "172.24.0.7" } },
|
}
|
||||||
{ "key": "client-uuid", "value": { "stringValue": "8b6e8600b53a24" } }
|
},
|
||||||
|
{
|
||||||
|
"key": "job",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "tns/app"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "opencensus.exporterversion",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "Jaeger-Go-2.22.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "host.name",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "f68212e86151"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "ip",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "172.24.0.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "client-uuid",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "8b6e8600b53a24"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"instrumentationLibrarySpans": [
|
"instrumentationLibrarySpans": [
|
||||||
@ -304,10 +783,30 @@
|
|||||||
"startTimeUnixNano": "1627471657251228000",
|
"startTimeUnixNano": "1627471657251228000",
|
||||||
"endTimeUnixNano": "1627471657260930000",
|
"endTimeUnixNano": "1627471657260930000",
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "key": "http.status_code", "value": { "intValue": "200" } },
|
{
|
||||||
{ "key": "http.method", "value": { "stringValue": "GET" } },
|
"key": "http.status_code",
|
||||||
{ "key": "http.url", "value": { "stringValue": "/" } },
|
"value": {
|
||||||
{ "key": "component", "value": { "stringValue": "net/http" } }
|
"intValue": "200"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.method",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "GET"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "http.url",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "component",
|
||||||
|
"value": {
|
||||||
|
"stringValue": "net/http"
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"status": {}
|
"status": {}
|
||||||
}
|
}
|
||||||
|
@ -390,6 +390,7 @@ export function transformToOTLP(data: MutableDataFrame): {
|
|||||||
droppedLinksCount: 0,
|
droppedLinksCount: 0,
|
||||||
status: getOTLPStatus(span.tags),
|
status: getOTLPStatus(span.tags),
|
||||||
events: getOTLPEvents(span.logs),
|
events: getOTLPEvents(span.logs),
|
||||||
|
links: getOTLPReferences(span.references),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,6 +503,34 @@ function getOTLPEvents(logs: TraceLog[]): collectorTypes.opentelemetryProto.trac
|
|||||||
return events;
|
return events;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getOTLPReferences(
|
||||||
|
references: TraceSpanReference[]
|
||||||
|
): collectorTypes.opentelemetryProto.trace.v1.Span.Link[] | undefined {
|
||||||
|
if (!references || !references.length) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
let links: collectorTypes.opentelemetryProto.trace.v1.Span.Link[] = [];
|
||||||
|
for (const ref of references) {
|
||||||
|
let link: collectorTypes.opentelemetryProto.trace.v1.Span.Link = {
|
||||||
|
traceId: ref.traceID,
|
||||||
|
spanId: ref.spanID,
|
||||||
|
attributes: [],
|
||||||
|
droppedAttributesCount: 0,
|
||||||
|
};
|
||||||
|
if (ref.tags?.length) {
|
||||||
|
for (const tag of ref.tags) {
|
||||||
|
link.attributes?.push({
|
||||||
|
key: tag.key,
|
||||||
|
value: toAttributeValue(tag),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
links.push(link);
|
||||||
|
}
|
||||||
|
return links;
|
||||||
|
}
|
||||||
|
|
||||||
export function transformTrace(response: DataQueryResponse, nodeGraph = false): DataQueryResponse {
|
export function transformTrace(response: DataQueryResponse, nodeGraph = false): DataQueryResponse {
|
||||||
// We need to parse some of the fields which contain stringified json.
|
// We need to parse some of the fields which contain stringified json.
|
||||||
// Seems like we can't just map the values as the frame we got from backend has some default processing
|
// Seems like we can't just map the values as the frame we got from backend has some default processing
|
||||||
|
@ -1928,7 +1928,23 @@ export const otlpDataFrameFromResponse = new MutableDataFrame({
|
|||||||
type: 'other',
|
type: 'other',
|
||||||
config: {},
|
config: {},
|
||||||
labels: undefined,
|
labels: undefined,
|
||||||
values: [[]],
|
values: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
spanID: 'spanId',
|
||||||
|
traceID: 'traceId',
|
||||||
|
tags: [
|
||||||
|
{ key: 'key', value: 'Value' },
|
||||||
|
{ key: 'intValue', value: 4 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
spanID: 'spanId2',
|
||||||
|
traceID: 'traceId2',
|
||||||
|
tags: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
state: {
|
state: {
|
||||||
displayName: 'references',
|
displayName: 'references',
|
||||||
},
|
},
|
||||||
@ -2118,6 +2134,32 @@ export const otlpDataFrameToResponse = new MutableDataFrame({
|
|||||||
displayName: 'tags',
|
displayName: 'tags',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'references',
|
||||||
|
type: 'other',
|
||||||
|
config: {},
|
||||||
|
labels: undefined,
|
||||||
|
values: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
spanID: 'spanId',
|
||||||
|
traceID: 'traceId',
|
||||||
|
tags: [
|
||||||
|
{ key: 'key', value: 'Value' },
|
||||||
|
{ key: 'intValue', value: 4 },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
spanID: 'spanId2',
|
||||||
|
traceID: 'traceId2',
|
||||||
|
tags: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
state: {
|
||||||
|
displayName: 'references',
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
first: ['60ba2abb44f13eae'],
|
first: ['60ba2abb44f13eae'],
|
||||||
length: 1,
|
length: 1,
|
||||||
@ -2153,6 +2195,31 @@ export const otlpResponse = {
|
|||||||
{ key: 'http.url', value: { stringValue: '/' } },
|
{ key: 'http.url', value: { stringValue: '/' } },
|
||||||
{ key: 'component', value: { stringValue: 'net/http' } },
|
{ key: 'component', value: { stringValue: 'net/http' } },
|
||||||
],
|
],
|
||||||
|
links: [
|
||||||
|
{
|
||||||
|
spanId: 'spanId',
|
||||||
|
traceId: 'traceId',
|
||||||
|
attributes: [
|
||||||
|
{
|
||||||
|
key: 'key',
|
||||||
|
value: {
|
||||||
|
stringValue: 'Value',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'intValue',
|
||||||
|
value: {
|
||||||
|
intValue: 4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
spanId: 'spanId2',
|
||||||
|
traceId: 'traceId2',
|
||||||
|
attributes: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user