diff --git a/charts/pga/templates/datasources/loki.yaml b/charts/pga/templates/datasources/loki.yaml new file mode 100644 index 00000000..b8efa56c --- /dev/null +++ b/charts/pga/templates/datasources/loki.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: kube-loki-datasource + namespace: logging + labels: + grafana_datasource: "1" + app: kube-grafana + prometheus: kube +data: + kube-loki.yaml: |- + apiVersion: 1 + datasources: + - uid: loki + orgId: 1 + name: Loki + type: loki + typeName: Loki + access: proxy + url: http://loki-logging-gateway.logging.svc + password: '' + user: '' + database: '' + basicAuth: false + isDefault: false + jsonData: + derivedFields: + - datasourceUid: tempo + matcherRegex: (?:trace_id)=(\w+) + name: TraceID + url: $${__value.raw} + readOnly: false + editable: true \ No newline at end of file diff --git a/charts/pga/templates/datasources/prometheus.yaml b/charts/pga/templates/datasources/prometheus.yaml index 6265b32d..4dea4883 100644 --- a/charts/pga/templates/datasources/prometheus.yaml +++ b/charts/pga/templates/datasources/prometheus.yaml @@ -21,4 +21,10 @@ data: jsonData: httpMethod: POST timeInterval: 30s + exemplarTraceIdDestinations: + - datasourceUid: tempo + name: TraceID + httpMethod: POST + readOnly: false + editable: true {{- end }} diff --git a/charts/pga/templates/datasources/tempo.yaml b/charts/pga/templates/datasources/tempo.yaml index 2505df07..e8b1442f 100644 --- a/charts/pga/templates/datasources/tempo.yaml +++ b/charts/pga/templates/datasources/tempo.yaml @@ -19,3 +19,16 @@ data: jsonData: handleGrafanaManagedAlerts: false implementation: prometheus + nodeGraph: + enabled: true + search: + hide: false + lokiSearch: + datasourceUid: loki + tracesToLogs: + datasourceUid: loki + filterBySpanID: false + filterByTraceID: true + mapTagNamesEnabled: false + tags: + - app \ No newline at end of file diff --git a/charts/pga/templates/datasources/thanos.yaml b/charts/pga/templates/datasources/thanos.yaml index 3f6df974..67e86e32 100644 --- a/charts/pga/templates/datasources/thanos.yaml +++ b/charts/pga/templates/datasources/thanos.yaml @@ -20,4 +20,10 @@ data: jsonData: httpMethod: POST timeInterval: 30s + exemplarTraceIdDestinations: + - datasourceUid: tempo + name: TraceID + httpMethod: POST + readOnly: false + editable: true {{- end }}