Conversation
florianl
left a comment
There was a problem hiding this comment.
Overall looks good to me - but I'm not an helm expert. Just a minor question around the set resource limits.
| resources: | ||
| limits: | ||
| cpu: 100m | ||
| memory: 200M |
There was a problem hiding this comment.
Was this memory limit tested in some way? Depending on the environment, my experiments usually require 400M to 500M.
There was a problem hiding this comment.
If I'm not mistaken, this limit is only used for the CI environment. It's not a default value injected by kubernetesattributes or the new profiling preset.
| {{- include "opentelemetry-collector.pod" ($podData | mustMergeOverwrite (deepCopy .)) | nindent 6 }} | ||
| hostNetwork: {{ .Values.hostNetwork }} | ||
| hostPID: {{ .Values.hostPID }} | ||
| hostPID: {{ or .Values.hostPID .Values.presets.profiling.enabled }} |
There was a problem hiding this comment.
What we expect if profiling.enabled: true and hostPID: ""?
There was a problem hiding this comment.
Since the eBPF profiler requires hostPID: true to function, it makes sense that enabling the profiling preset forces this value to true, regardless of whether hostPID is left empty ("") in the user's configuration.
What does this PR do?
Adds a new
profiling presetto the opentelemetry-collector Helm chart. Whenpresets.profiling.enabled: true, the chart automatically configures:profiling receiverand aprofiles pipelinewithdebug exporteras fallback if no exporter configuredtracefshost volume mount (/sys/kernel/tracing, read-only)hostPID: trueon the pod specWhen combined with the kubernetesAttributes preset, the chart also:
k8sattributes processorinto theprofiles pipeline(same pattern as logs/metrics/traces)container.idto thepod_associationconfiguration - eBPF profilers identify workloads by container ID, not pod IP/UID.Motivation
Deploying an eBPF profiler (e.g.
opentelemetry-collector-ebpf-profiler) on Kubernetes currently requires significant boilerplate. This was discussed in open-telemetry/opentelemetry-ebpf-profiler#1072 where the community expressed interest in a preset to simplify this.Describe how you validated your changes
Two new CI values files:
ci/preset-profiling-values.yaml- profiling preset onlyci/preset-profiling-kubernetesattributes-values.yaml- profiling + kubernetesAttributeAdditional notes
The
container.idpod_association injection is gated on$config.service.pipelines.profilesexistence inapplyKubernetesAttributesConfig, not onprofiling.enabled. This means any profiles pipeline (preset or user-defined) benefits from the enrichment whenkubernetesAttributesis enabled.hostPIDis applied to all three workload templates (DaemonSet,Deployment,StatefulSet) for consistency.