-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Prometheus receiver: log error message when process_start_time_seconds
gauge is missing
#969
Milestone
Comments
@dinooliva as the author of PR #394 which introduced this flag, you may have more context on this, and share your opinion? |
I also got hit by this and second @nilebox' desire for at least some kind of logging in this situation and maybe adding this to some exposed metric |
This was referenced Sep 30, 2020
MovieStoreGuy
pushed a commit
to atlassian-forks/opentelemetry-collector
that referenced
this issue
Nov 11, 2021
* Consider renaming Infer to Any. Any is a commonly used concept in Go.
hughesjj
pushed a commit
to hughesjj/opentelemetry-collector
that referenced
this issue
Apr 27, 2023
Troels51
pushed a commit
to Troels51/opentelemetry-collector
that referenced
this issue
Jul 5, 2024
…pen-telemetry#969) Co-authored-by: Tom Tan <Tom.Tan@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prometheus receiver supports the flag
use_start_time_metric: true
.When this flag is enabled, every Prometheus endpoint must have the
process_start_time_seconds
gauge, e.g.When this metric is present, it will set the
startTime
inopentelemetry-collector/receiver/prometheusreceiver/internal/metricsbuilder.go
Lines 106 to 108 in 66d7acd
and will be used for adjusting time in metrics - this is expected behavior.
But if the
process_start_time_seconds
gauge is missing,startTime
will have the default zero value.The problem is that during transaction commit phase, we perform the check
opentelemetry-collector/receiver/prometheusreceiver/internal/transaction.go
Lines 168 to 171 in 66d7acd
which silently drops all metrics and updates the local variable
droppedTimeseries
that is never used.As a result, debugging this corner case is a nightmare, and the only way to discover all of this is to use Go debugger (that's how I found this issue).
At the very least, we should log a message when metrics get dropped.
I would suggest using
WARN
level for this specific issue, but if it's considered normal for some situations, we should printINFO
orDEBUG
message.Is there also some other existing way of reporting counters like
droppedTimeseries
?The text was updated successfully, but these errors were encountered: