From 32272298d753a6534ef1a4a8ed7392a7f65b9e07 Mon Sep 17 00:00:00 2001 From: Michel Hollands Date: Tue, 7 May 2024 16:35:00 +0100 Subject: [PATCH] Fix the alloy config Signed-off-by: Michel Hollands --- .../templates/agent/_helpers-agent.tpl | 2 +- charts/meta-monitoring/templates/agent/config.yaml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/charts/meta-monitoring/templates/agent/_helpers-agent.tpl b/charts/meta-monitoring/templates/agent/_helpers-agent.tpl index ac7e80a..d8d6642 100644 --- a/charts/meta-monitoring/templates/agent/_helpers-agent.tpl +++ b/charts/meta-monitoring/templates/agent/_helpers-agent.tpl @@ -48,7 +48,7 @@ {{- define "agent.tempo_write_targets" -}} {{- $list := list }} {{- if .Values.local.traces.enabled }} -{{- $list = append $list ("otelcol.exporter.otlp.local.input") }} +{{- $list = append $list ("otelcol.exporter.otlphttp.local.input") }} {{- end }} {{- if .Values.cloud.traces.enabled }} {{- $list = append $list ("otelcol.exporter.otlphttp.cloud.input") }} diff --git a/charts/meta-monitoring/templates/agent/config.yaml b/charts/meta-monitoring/templates/agent/config.yaml index cf22a80..55e6963 100644 --- a/charts/meta-monitoring/templates/agent/config.yaml +++ b/charts/meta-monitoring/templates/agent/config.yaml @@ -294,9 +294,7 @@ data: // 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" - } + grpc {} // We define where to send the output of all ingested traces. In this case, to the OpenTelemetry batch processor // named 'default'. @@ -345,6 +343,14 @@ data: } {{- end }} + {{- if .Values.local.traces.enabled }} + otelcol.exporter.otlphttp "local" { + client { + endpoint = "http://{{- .Release.Name -}}-tempo-distributor.svc:4318" + } + } + {{- end }} + {{- if .Values.cloud.logs.enabled }} loki.write "cloud" { endpoint {