apiVersion: 1 datasources: - name: Prometheus uid: prometheus type: prometheus access: proxy url: https://prometheus:9090 isDefault: true secureJsonData: tlsCACert: $LAB_CA tlsClientCert: $LAB_CERT tlsClientKey: $LAB_KEY jsonData: tlsAuth: true tlsAuthWithCACert: true timeInterval: 5s exemplarTraceIdDestinations: - name: trace_id datasourceUid: tempo - name: Loki uid: loki type: loki access: proxy url: https://loki:3100 secureJsonData: tlsCACert: $LAB_CA tlsClientCert: $LAB_CERT tlsClientKey: $LAB_KEY jsonData: tlsAuth: true tlsAuthWithCACert: true derivedFields: - name: Trace matcherRegex: '"trace_id":"([0-9a-f]{32})"' datasourceUid: tempo url: '$${__value.raw}' - name: Tempo uid: tempo type: tempo access: proxy url: https://tempo:3200 secureJsonData: tlsCACert: $LAB_CA tlsClientCert: $LAB_CERT tlsClientKey: $LAB_KEY jsonData: tlsAuth: true tlsAuthWithCACert: true tracesToLogsV2: datasourceUid: loki spanStartTimeShift: '-10s' spanEndTimeShift: '10s' tags: - key: service.name value: service_name customQuery: true query: '{$${__tags}} | json | trace_id="$${__span.traceId}"'