Skip to content

Commit

Permalink
feat(demo): traces to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 10, 2023
1 parent f409aa4 commit 3e2bdf0
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dev/local/ch-demo/grafana/dashboards/oteldb.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,8 @@
"type": "loki",
"uid": "loki-oteldb"
},
"expr": "{service_name=\"go-faster.oteldb\", level!=\"DEBUG\"}",
"editorMode": "code",
"expr": "{service_name=\"oteldb\", level!=\"DEBUG\"}",
"queryType": "range",
"refId": "A"
}
Expand Down
36 changes: 34 additions & 2 deletions dev/local/ch-demo/grafana/datasources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,30 @@ datasources:
uid: tempo-oteldb
jsonData:
httpMethod: GET
tracesToLogsV2:
# Field with an internal link pointing to a logs data source in Grafana.
# datasourceUid value must match the uid value of the logs data source.
datasourceUid: 'loki-oteldb'
spanStartTimeShift: '1h'
spanEndTimeShift: '-1h'
filterByTraceID: true
filterBySpanID: false
tags:
- key: service.name
value: service_name
tracesToMetrics:
datasourceUid: 'prom-oteldb'
spanStartTimeShift: '1h'
spanEndTimeShift: '-1h'
tags:
- key: service.name
value: service_name
nodeGraph:
enabled: true
serviceMap:
datasourceUid: prom-oteldb
lokiSearch:
datasourceUid: 'loki-oteldb'

- name: "LogQL"
type: loki
Expand All @@ -19,9 +41,19 @@ datasources:
url: http://oteldb:3100
uid: loki-oteldb
jsonData:
httpMethod: GET
serviceMap:
datasourceUid: prometheus
datasourceUid: prom-oteldb
maxLines: 500
derivedFields:
# Field with internal link pointing to data source in Grafana.
# datasourceUid value can be anything, but it should be unique across all defined data source uids.
- datasourceUid: tempo-oteldb
matcherRegex: '"trace_id":"([0-9a-f]+)"'
name: trace
# url will be interpreted as query for the datasource
url: '$${__value.raw}'
# optional for URL Label to set a custom display label for the link.
urlDisplayLabel: 'View Trace'

- name: "PromQL"
type: prometheus
Expand Down

0 comments on commit 3e2bdf0

Please sign in to comment.