OTEL cumulative counters with labels cause OTLP payload to grow over time — what is the recommended mitigation? #3798
Replies: 1 comment
-
Yeah, this is expected - you're hitting a known trade-off that the OTEL spec actually calls out explicitly.
There's no "max payload size" setting in the SDKs - and it's not in the OTEL spec either. This just isn't something OTEL provides.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi OTEL team,
I’m using the OpenTelemetry C++ SDK to export metrics in OTLP format to a time-series backend (VictoriaMetrics via vmagent).
I understand and agree with the OTEL metrics semantics, but I’m facing an operational issue and wanted to confirm the recommended industry-standard approach.
Setup
Observed Behavior
With cumulative counters:
Example pattern:
REQUEST_COUNT{id=1234}If id=1234 occurs once, that series is exported for the entire lifetime of the process, even if no further requests occur for that ID.
Understanding (to confirm)
I believe this is expected and correct behavior because:
Problem Statement
In a push-based OTLP pipeline, cumulative counters with labels cause the export payload to grow monotonically over time, driven by label cardinality rather than actual activity.
This becomes a practical problem in large systems where:
Questions
3.Are there best practices from OTEL around:
I’m looking for guidance on how this problem is typically handled in production systems using OTEL.
Beta Was this translation helpful? Give feedback.
All reactions