Add cumulativetodelta processor to default DDOT Collector metrics pipelines - #2815
Add cumulativetodelta processor to default DDOT Collector metrics pipelines#2815RiantZ wants to merge 2 commits into
Conversation
|
mackjmr
left a comment
There was a problem hiding this comment.
Do we need this change in helm / operator ? If we want to add it always, just adding it in the converter should be enough, and we would need to only maintain it in one place ?
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eac324f112
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| exporters: [datadog] | ||
| metrics: | ||
| receivers: [otlp] | ||
| processors: [cumulativetodelta] |
There was a problem hiding this comment.
Keep stateful delta conversion off scaled Gateways
When otelAgentGateway.replicas is raised above 1 or the Gateway HPA is enabled, putting cumulativetodelta in the Gateway pipeline makes the first stateful conversion happen behind the chart's Gateway Service, which has no sticky routing. A single cumulative OTLP time series can therefore land on different Gateway pods across export requests; each processor instance only has its own in-memory previous point, so it will drop initial points or emit incorrect deltas and corrupt metrics for scaled Gateway deployments. Convert before the load-balanced hop or require deterministic routing for this default config.
Useful? React with 👍 / 👎.
Automatic converter injection does not cover everything (as far I know, if I'm wrong - please tell me) Standalone Agent (no gateway): the converter will inject c2d itself — but only from a future agent version (the datadog-agent converter change isn't in any release yet). Since the c2d processor is already compiled into every DDOT image, writing it in the config works on any version immediately. Here the explicit helm change is redundant once that agent version ships, but adds version-independence and visibility. Gateway: the converter won't inject it at all. The chart overrides DD_OTELCOLLECTOR_CONVERTER_FEATURES (zpages,pprof,datadog), replacing the default list and omitting c2d. So the gateway needs either explicit config or c2d added to that env — otherwise it never gets it. Core reason: the processor is in every image; converter auto-injection is a new, version-specific feature. |
I guess this depends when we want to support this by, wait for new agent version or add it now via helm but remove when new agent version is out.
Can we inject it in converter for gateway ? If we want to support this asap without waiting for new agent image im fine with adding it now as long as we add a todo to remove it with new agent version. But for changes like this that need to be added everywhere, I prefer that we add it only in the converter. Otherwise if we update the config we need to update it in 3/4 different places rather than just the converter. |
What this PR does / why we need it:
Adds the
cumulativetodeltaprocessor to the default DDOT сollector configuration rendered by thedatadogchart, in the metrics pipelines that export to the Datadog exporter:metricsandmetrics/prometheuspipelines;metricspipeline.DDOT is moving to the metrics v3 payload format. In v3 the Datadog exporter stops converting cumulative counters to delta internally, so a
cumulativetodeltaprocessor in the pipeline becomes mandatory. Adding it to the default config now is safe before v3 — the exporter consumes already-delta input directly, without a second conversion — and prepares the chart for the v3 switch.Special notes for your reviewer:
Placement — the processor is added only where the
datadogexporter is present:forwards metrics to the Gateway over
otlphttp; the Gateway performs the conversion. Thismatches the chart's existing minimal-forwarding-agent design.
traces/logspipelines. The processor only implements metricsprocessing, and the collector fails to start if it is placed in a traces/logs pipeline.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
<chartName>/minor-version,<chartName>/patch-version, or<chartName>/no-version-bump)https://datadoghq.atlassian.net/browse/OTAGENT-1178