apiVersion: 1 datasources: - name: Prometheus uid: prometheus type: prometheus access: proxy url: http://prometheus:9090 isDefault: true editable: true jsonData: exemplarTraceIdDestinations: - datasourceUid: tempo name: trace_id - name: Loki uid: loki type: loki access: proxy url: http://loki:3100 editable: true jsonData: derivedFields: - datasourceUid: tempo matcherRegex: 'trace[_-]?id["=: ]+([a-fA-F0-9]+)' name: TraceID url: '$${__value.raw}' - name: Tempo uid: tempo type: tempo access: proxy url: http://tempo:3200 editable: true jsonData: tracesToLogsV2: datasourceUid: loki filterByTraceID: true spanStartTimeShift: -1m spanEndTimeShift: 1m # QUESTION (answer in your own words; verify by reading the LogQL that # "Logs for this span" generates): why is `filterByTraceID: true` enough # with no `tags` mapping here, and when would it not be? tracesToMetrics: datasourceUid: prometheus # Wider than the span: rate() needs a few scrape intervals of data. spanStartTimeShift: -2m spanEndTimeShift: 2m # span attribute -> Prometheus label on traces_spanmetrics_* tags: - key: service.name value: service queries: # `$$` is the provisioning-file escape for a literal `$`. - name: Request rate query: sum(rate(traces_spanmetrics_calls_total{$$__tags}[5m])) serviceMap: datasourceUid: prometheus nodeGraph: enabled: true - name: Alertmanager uid: alertmanager type: alertmanager access: proxy url: http://alertmanager:9093 editable: true jsonData: implementation: prometheus