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:
# ...
Problem description
Declaring custom receivers or processors like a
prometheusreceiver to scrape a few metrics or acumulativetodeltaprocessor 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 throughpresetsare preserved:otlphostmetrics,k8s_cluster,k8sobjects,kubeletstats,receiver_creator/metrics,receiver_creator/logsresourcedetection/env,resource/hostname,batchk8sattributesThe root cause is that the processors & receivers that are discarded are initially defined in
values.yamlwhile the preserved ones are defined through the helm rendering templates according to the values of thepresetsExample with a custom
cumulativetodeltaprocessorWhen declaring a custom metrics processor (eg
cumulativetodelta), some built-in processors don't get added (egresourcedetection/env,resource/hostname,batch) when others are added as expected (egk8sattributes).Actual service metrics pipeline when declaring a
cumulativetodeltaprocessorExpected service metrics pipeline