forked from RemoteSync/grafana-meta-monitoring-chart
@@ -26,4 +26,15 @@
|
||||
{{- $list = append $list ("prometheus.remote_write.cloud.receiver") }}
|
||||
{{- end }}
|
||||
{{- join ", " $list }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "agent.tempo_write_targets" -}}
|
||||
{{- $list := list }}
|
||||
{{- if .Values.local.enabled }}
|
||||
{{- $list = append $list ("otelcol.exporter.otlp.local.input") }}
|
||||
{{- end }}
|
||||
{{- if .Values.cloud.enabled }}
|
||||
{{- $list = append $list ("otelcol.exporter.otlp.cloud.input") }}
|
||||
{{- end }}
|
||||
{{- join ", " $list }}
|
||||
{{- end }}
|
@@ -47,6 +47,34 @@ data:
|
||||
forward_to = [ {{ include "agent.prometheus_write_targets" . }} ]
|
||||
}
|
||||
|
||||
// Shamelessly copied from https://github.com/grafana/intro-to-mlt/blob/main/agent/config.river
|
||||
otelcol.receiver.otlp "otlp_receiver" {
|
||||
// We don't technically need this, but it shows how to change listen address and incoming port.
|
||||
// In this case, the Agent is listening on all available bindable addresses on port 4317 (which is the
|
||||
// default OTLP gRPC port) for the OTLP protocol.
|
||||
grpc {
|
||||
endpoint = "0.0.0.0:4317"
|
||||
}
|
||||
|
||||
// We define where to send the output of all ingested traces. In this case, to the OpenTelemetry batch processor
|
||||
// named 'default'.
|
||||
output {
|
||||
traces = [otelcol.processor.batch.default.input]
|
||||
}
|
||||
}
|
||||
|
||||
// The OpenTelemetry batch processor collects trace spans until a batch size or timeout is met, before sending those
|
||||
// spans onto another target. This processor is labeled 'default'.
|
||||
otelcol.processor.batch "default" {
|
||||
// Wait until we've received 16K of data.
|
||||
send_batch_size = 16384
|
||||
// Or until 2 seconds have elapsed.
|
||||
timeout = "2s"
|
||||
// When the Agent has enough batched data, send it to the OpenTelemetry exporter named 'local'.
|
||||
output {
|
||||
traces = [ {{ include "agent.tempo_write_targets" . }} ]
|
||||
}
|
||||
}
|
||||
|
||||
{{- if .Values.local.enabled }}
|
||||
loki.write "local" {
|
||||
@@ -60,6 +88,23 @@ data:
|
||||
url = "http://{{- .Release.Name -}}-mimir-nginx.{{- .Release.Namespace -}}.svc:80/api/v1/push"
|
||||
}
|
||||
}
|
||||
|
||||
// The OpenTelemetry exporter exports processed trace spans to another target that is listening for OTLP format traces.
|
||||
// A unique label, 'local', is added to uniquely identify this exporter.
|
||||
otelcol.exporter.otlp "local" {
|
||||
// Define the client for exporting.
|
||||
client {
|
||||
// Send to the locally running Tempo instance, on port 4317 (OTLP gRPC).
|
||||
endpoint = "meta-tempo-distributor:4317"
|
||||
// Configure TLS settings for communicating with the endpoint.
|
||||
tls {
|
||||
// The connection is insecure.
|
||||
insecure = true
|
||||
// Do not verify TLS certificates when connecting.
|
||||
insecure_skip_verify = true
|
||||
}
|
||||
}
|
||||
}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.cloud.enabled }}
|
||||
@@ -84,4 +129,16 @@ data:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
otelcol.exporter.otlp "cloud" {
|
||||
client {
|
||||
endpoint = "{{- .Values.cloud.traces.endpoint -}}"
|
||||
auth = otelcol.auth.basic.creds.handler
|
||||
}
|
||||
}
|
||||
|
||||
otelcol.auth.basic "creds" {
|
||||
username = "{{- .Values.cloud.traces.username -}}"
|
||||
password = "{{- .Values.cloud.traces.password -}}"
|
||||
}
|
||||
{{- end }}
|
@@ -58,4 +58,23 @@ data:
|
||||
# <bool> Allows users to edit data sources from the
|
||||
# Grafana UI.
|
||||
editable: true
|
||||
- name: Tempo
|
||||
# <string, required> Sets the data source type.
|
||||
type: tempo
|
||||
# <int> Sets the organization id. Defaults to orgId 1.
|
||||
orgId: 1
|
||||
# <string> Sets a custom UID to reference this
|
||||
# data source in other parts of the configuration.
|
||||
# If not specified, Grafana generates one.
|
||||
uid: tempo_ds
|
||||
# <string> Sets the data source's URL, including the
|
||||
# port.
|
||||
url: http://{{- $.Release.Name -}}-tempo-query-frontend.{{- $.Release.Namespace -}}.svc:3100
|
||||
# <bool> Toggles whether the data source is pre-selected
|
||||
# for new panels. You can set only one default
|
||||
# data source per organization.
|
||||
isDefault:
|
||||
# <bool> Allows users to edit data sources from the
|
||||
# Grafana UI.
|
||||
editable: true
|
||||
{{- end }}
|
Reference in New Issue
Block a user