Skip to content

[kube-stack] Declaring custom receivers or processors in pipelines discards some but not all built-in ones #2254

Description

@cyrille-leclerc

Problem description

Declaring custom receivers or processors like a prometheus receiver to scrape a few metrics or a cumulativetodelta processor in telemetry pipelines discards some built-in ones but not all, creating confusion.

Precisely, the built-in receivers and processors defined in telemetry pipelines defined in the kube-stack original values.yaml (here) get discarded when the ones defined through presets are preserved:

  • Receivers:
    • Discarded: otlp
    • Preserved: hostmetrics, k8s_cluster, k8sobjects, kubeletstats, receiver_creator/metrics, receiver_creator/logs
  • Processors:
    • Discarded: resourcedetection/env, resource/hostname, batch
    • Preserved: k8sattributes

The root cause is that the processors & receivers that are discarded are initially defined in values.yaml while the preserved ones are defined through the helm rendering templates according to the values of the presets

Example with a custom cumulativetodelta processor

When declaring a custom metrics processor (eg cumulativetodelta), some built-in processors don't get added (eg resourcedetection/env, resource/hostname, batch) when others are added as expected (eg k8sattributes).

    presets:
      kubernetesAttributes:
        enabled: true
    config:
      exporters:
        otlp_http:
          # ...
      processors:
        cumulativetodelta:
          # ...
      service:
        pipelines:
          traces:
            exporters:
            - otlp_http
          metrics:
            exporters:
            - otlp_http
            processors:
            - cumulativetodelta
          logs:
            exporters:
            - otlp_http

Actual service metrics pipeline when declaring a cumulativetodelta processor

      pipelines:
        metrics:
          exporters:
          - otlp_http
          processors:
          - k8sattributes
          - cumulativetodelta
          receivers:
          # ...

Expected service metrics pipeline

      pipelines:
        metrics:
          exporters:
          - otlp_http
          processors:
          - k8sattributes
          - resourcedetection/env
          - resource/hostname
          - cumulativetodelta
          - batch
          receivers:
          # ...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions