Skip to content
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

otelcol.connector.spanmetrics should initialise stale counter series at 0 #2888

Open
dmurphyccs opened this issue Mar 3, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dmurphyccs
Copy link

Request

The Span Metrics connector has a metrics_expiration argument which defines the time period after which metrics are considered stale and are removed from the cache.

This is a problem for series that are removed frequently, because traces_spanmetrics_calls_total gets initialised at the value of the first scrape once the series gets registered, and Prometheus skips the jump from null to a given value. In order not to lose that first value, a first value of 0 should be pushed when a new series is added to the counter.

The same problem existed in Tempo metrics-generator but was resolved in this issue: grafana/tempo#2006

Use case

So that infrequent spanmetrics generated by otelcol.connector.spanmetrics in Alloy can be correctly queried in Prometheus, using PromQL functions such as increase() etc.

@dmurphyccs dmurphyccs added the enhancement New feature or request label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant