Prometheusremotewrite exporter handling of empty metrics #10152
Unanswered
jjcollinge
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a custom receiver that is very similar to the dockerstats receiver. When there are no containers the scrape method returns a zero
Metrics
result (returned bypmetric.NewMetrics()
) - this is exactly the same as the dockerstats receiver. However, I am also using theprometheusremotewrite
exporter to push these metrics to a Cortex backend. Theprometheusremotewrite
exporter errors on empty metrics:By default the send of this empty metrics set is retried several times until it is finally dropped. This was causing none empty metrics received by different receivers to not get through to Cortex consistently (presumably because there were so many retries of this empty batch blocking the pipe). Disabling
retry_on_failure
on thepromtheusremotewrite
exporter is the only way I've been able to consistently get the metrics from the other receivers through to Cortex.Is there something I should be doing in my custom receiver to drop empty metrics sets rather than having them passed through to the exporter? If this is not possible, how should I avoid the
prometheusremotewrite
exporter erroring (in a non permanent way) for each empty metrics set?I'm very new to the Otel collector so I may have missed something obvious, so would appreciate some guidance on this.
Beta Was this translation helpful? Give feedback.
All reactions