Skip to content

[opentelemetry-kube-stack] Cannot exclude collector logs with logsCollection preset #1697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dysfungi opened this issue May 31, 2025 · 0 comments

Comments

@dysfungi
Copy link

Disabling any .presets.logsCollection.includeCollectorLogs does not work for OpenTelemetry Kube Stack Helm Chart v0.6.1 with any collector mode.

I believe I narrowed this down to the container name for the exclude rule being set to the Chart name (defaults to opentelemetry-kube-stack) instead of otc-container, which is said to be the container name in the Operator API Docs.

My daemonset OpenTelemetryCollector CRD YAML snippet:

    receivers:
      filelog:
        exclude: /var/log/pods/observability_opentelemetry-kube-stack-daemon*_*/opentelemetry-kube-stack/*.log
        include:
        - /var/log/pods/*/*/*.log

My daemonset YAML snippet:

      containers:
      - args:
        - --config=/conf/collector.yaml
        image: otel/opentelemetry-collector-k8s:0.120.0
        name: otc-container

One of my log filepaths:

log.file.path:
    /var/log/pods/observability_opentelemetry-kube-stack-daemon-collector-wzjz6_51637406-3496-4291-a188-39e9fa8523d4/otc-container/0.log

From OpenTelemetryCollector (v1beta1) API:

Container names managed by the operator:

  • otc-container

From OpenTelemetry Kube Stack Helm Chart _config.tpl:

{{- if .collector.presets.logsCollection.enabled }}
{{- $_ := set $collector "exclude" (printf "/var/log/pods/%s_%s*_*/%s/*.log" .namespace (include "opentelemetry-kube-stack.collectorFullname" .) (.Chart.Name | lower)) }}
@dysfungi dysfungi changed the title Cannot exclude collector logs with logsCollection preset [opentelemetry-kube-stack] Cannot exclude collector logs with logsCollection preset May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants