mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Zipkin: add ability to upload trace json (#37483)
* Zipkin: upload json * Change back mock json
This commit is contained in:
@@ -32,7 +32,7 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
|
||||
|
||||
- **Data source -** Target data source.
|
||||
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
|
||||
- **Span start time shift -** Shift in the start time for the Loki query based on the span start time. In order to extend to the past, you need to use a negative value. Time units can be used here, for example, 5s, 1m, 3h. The default is 0.
|
||||
- **Span start time shift -** Shift in the start time for the Loki query based on the span start time. In order to extend to the past, you need to use a negative value. Use time interval units like 5s, 1m, 3h. The default is 0.
|
||||
- **Span end time shift -** Shift in the end time for the Loki query based on the span end time. Time units can be used here, for example, 5s, 1m, 3h. The default is 0.
|
||||
|
||||

|
||||
@@ -57,6 +57,36 @@ Use the trace selector to pick particular trace from all traces logged in the ti
|
||||
|
||||
Zipkin annotations are shown in the trace view as logs with annotation value shown under annotation key.
|
||||
|
||||
## Upload JSON trace file
|
||||
|
||||
You can upload a JSON file that contains a single trace to visualize it.
|
||||
|
||||
{{< figure src="/static/img/docs/explore/zipkin-upload-json.png" class="docs-image--no-shadow" caption="Screenshot of the Zipkin data source in explore with upload selected" >}}
|
||||
|
||||
Here is an example JSON:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"traceId": "efe9cb8857f68c8f",
|
||||
"parentId": "efe9cb8857f68c8f",
|
||||
"id": "8608dc6ce5cafe8e",
|
||||
"kind": "SERVER",
|
||||
"name": "get /api",
|
||||
"timestamp": 1627975249601797,
|
||||
"duration": 23457,
|
||||
"localEndpoint": { "serviceName": "backend", "ipv4": "127.0.0.1", "port": 9000 },
|
||||
"tags": {
|
||||
"http.method": "GET",
|
||||
"http.path": "/api",
|
||||
"jaxrs.resource.class": "Resource",
|
||||
"jaxrs.resource.method": "printDate"
|
||||
},
|
||||
"shared": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Linking Trace ID from logs
|
||||
|
||||
You can link to Zipkin trace from logs in Loki by configuring a derived field with internal link. See [Loki documentation]({{< relref "loki#derived-fields" >}}) for details.
|
||||
|
||||
Reference in New Issue
Block a user