-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[statsdreceiver] Counters are marked as monotonic #1789
Comments
Thanks for that, the new version has changed the type for counter already: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/master/receiver/statsdreceiver/protocol/statsd_parser.go#L220 |
Closing since I can no longer reproduce the issue. Thanks for the fix! |
Hmmm. I think the correct output point for a Statsd counter should be the non-monotonic delta sum, not the gauge, but we can revisit this. |
Signed-off-by: Bogdan Drutu <[email protected]>
* Add k8s.node.name and k8s.node.uid to semconv According to the specification[1] they should exist. [1] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/k8s.md#node * Update changelog * Update semconv/resource.go Co-authored-by: Tyler Yahn <[email protected]> * Update semconv/resource.go Co-authored-by: Tyler Yahn <[email protected]> * Update CHANGELOG.md Co-authored-by: Tyler Yahn <[email protected]> * Update semconv/resource.go Co-authored-by: Tyler Yahn <[email protected]> Co-authored-by: Tyler Yahn <[email protected]>
Describe the bug
Statsd count metrics are being reported as monotonic when they are not. This can cause other components to incorrectly assume monotonicity (currently the SignalFx exporter and in the future the Datadog exporter).
Steps to reproduce
Run an OpenTelemetry Collector with the statsd receiver and send a count metric to it.
What did you expect to see?
Statsd metrics being reported as non-monotonic.
What did you see instead?
Statsd metrics being reported as monotonic. For a metric sent as
counter.name:1|c
.What version did you use?
313a5a5
What config did you use?
Config:
Environment
OS: macOS 10.15
Compiler(if manually compiled): go 1.15.5
Additional context
In StatsD, counters are not monotonic and work like deltas that are aggregated on the server side.
From b/statsd_spec:
From statsd/statsd:
They can increment or decrement and the instrumented application should report these increments or decrements rather than the whole value.
In the statsd receiver they are set as cumulative OpenCensus metrics:
opentelemetry-collector-contrib/receiver/statsdreceiver/protocol/statsd_parser.go
Lines 169 to 172 in a20a6f4
Cumulative values are described by the OpenCensus proto as:
The OpenCensus translator then maps this type into an IntSum with cumulative aggregation and monotonic.
I am not sure if they should be marked as cumulative either, given the OpenTelemetry proto description:
but this seems to be more common (e.g. some components on the core repo do this too, like the hostmetrics receiver), so I am not sure if this last part should be considered a bug.
The text was updated successfully, but these errors were encountered: