Skip to content

Commit

Permalink
Add gateway support for Host Logs (#437)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
KingJ and dmitryax authored Apr 29, 2022
1 parent a7c7da1 commit feffc94
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -669,13 +669,17 @@ service:
- resource/add_environment
{{- end }}
exporters:
{{- if $gateway.enabled }}
- otlp
{{- else }}
{{- if eq (include "splunk-otel-collector.platformLogsEnabled" .) "true" }}
- splunk_hec/platform_logs
{{- end }}
{{- if eq (include "splunk-otel-collector.o11yLogsEnabled" .) "true" }}
- splunk_hec/o11y
{{- end }}
{{- end }}
{{- end }}
{{- end }}

{{- if (eq (include "splunk-otel-collector.tracesEnabled" .) "true") }}
Expand Down

0 comments on commit feffc94

Please sign in to comment.