From feffc947ded6cb36f38092dec44c2563eef55b5d Mon Sep 17 00:00:00 2001 From: KingJ Date: Fri, 29 Apr 2022 17:24:46 +0100 Subject: [PATCH] Add gateway support for Host Logs (#437) Host logs does not currently support gateway mode. If running the agent in gateway mode, the exporters section of the logs/host pipeline will be set to splunk_hec/platform_logs. In gateway mode, the agent does not have this exporter configured and it is only present on the collector. Therefore, the exporter must be set to otlp so that logs are sent to the collector. This is the same approach used for main logs pipeline - if running in gateway mode use the otlp exporter, otherwise use the splunk_hec/o11y or splunk_hec/platform_logs exporters depending on configuration. Co-authored-by: Dmitrii Anoshin --- .../splunk-otel-collector/templates/config/_otel-agent.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl index 315894e0f..b9c4b6251 100644 --- a/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl +++ b/helm-charts/splunk-otel-collector/templates/config/_otel-agent.tpl @@ -669,6 +669,9 @@ service: - resource/add_environment {{- end }} exporters: + {{- if $gateway.enabled }} + - otlp + {{- else }} {{- if eq (include "splunk-otel-collector.platformLogsEnabled" .) "true" }} - splunk_hec/platform_logs {{- end }} @@ -676,6 +679,7 @@ service: - splunk_hec/o11y {{- end }} {{- end }} + {{- end }} {{- end }} {{- if (eq (include "splunk-otel-collector.tracesEnabled" .) "true") }}