-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
prometheusexporter's "metric_expiration" parameter is ignored when used with spanmetrics connector #30688
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for connector/spanmetrics: @albertteoh @portertech. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@tqi-raurora Hi, I think it is related to this issue, when you set aggregation_temporality: AGGREGATION_TEMPORALITY_CUMULATIVE, which is the default setting, the connector will keep sending metrics(I have debugged into the source code and I found that metircs comes with new timestamp every time). If you change to AGGREGATION_TEMPORALITY_DELTA, metrics are deleted successfully. |
@toughnoah Hi, thank you, you're right, I think they are caused by the same issue |
Opened #31671 to discuss a possible solution using delta span metrics, but it'd need a code change |
This was fixed by #30559 on release 0.97.0 by adding the |
Component(s)
exporter/prometheus
What happened?
Description
metric_expiration setting for prometheus exporter seems to be ignored
Using otelcol-contrib version 0.92.0 with spanmetrics connector, and the prometheus exporter with setting metric_expiration: 10m
After 10 minutes have passed metrics that where not updated should disappear from the prometheus metric scrapping endpoint.
However, metrics are not disappearing. To test this I instrumented a test application, sent some telemetry, then killed the application. The metrics are never erased
after 20 minutes:
Steps to Reproduce
curl -s localhost:9130/metrics | grep duration_count | grep SPAN_KIND_SERVER
Expected Result
After 10 minutes of metrics not being updated, metric_expiration should kick in, and metrics should be removed from prometheus endpoint
Actual Result
Metrics are never removed from prometheus endpoint
Collector version
0.92.0
Environment information
Environment
Ubuntu 22.04.2 LTS
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: