-
Notifications
You must be signed in to change notification settings - Fork 2.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
Otel collector not scrapping metrics properly #37281
Comments
When you say "Otel collector doesn't scrape all the metrics", what do you mean, specifically? Do you see errors in the logs? Are all metrics missing, or just some metrics (which ones?) |
Also note that we generally recommend using the googlemanagedprometheus exporter for metrics over the googlecloud exporter. It has lower pricing, and better support for promql. |
@dashpole It is not scraping some of the metrics. Even for the missing metrics, we can see that it scrapped for a while and then stopped. |
Is the prometheus receiver failing to scrape the metric, or is the googlecloud exporter failing to export it? Do you see any errors in the logs? |
@dashpole It is scraping metrics but a few of the metrics are getting dropped. I checked and found that it might be due to relabel config in our scrape config specification. I will update on this. Please keep this open for a while. |
@dashpole We keep seeing this error in our Otel pod logs although there is no issue with the metrics now.
I am unable to understand why we keep getting this. |
That means the prometheus receiver is unable to scrape one of the targets. You will need to enable debug logging in the collector to see the detailed error message |
Pinging code owners for receiver/prometheus: @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label. |
@dashpole I have enabled detailed logging but I am not setting anything else for the error mentioned above. Am I missing something here? |
You did this, right? service:
telemetry:
metrics:
level: detailed |
Apologies, I did it for Otel, not here. Let me make the changes and see what's going on. |
I have enabled the detailed for metrics telemetry but not seeing any detailed information for the above error. service:
telemetry:
metrics:
level: detailed |
Oh, my bad. I copy-pasted the wrong thing from https://opentelemetry.io/docs/collector/internal-telemetry/#configure-internal-logs. It should be: service:
telemetry:
logs:
level: debug |
@dashpole We're good now. Due to logging, we can identify the root cause of the error. Thanks a ton. |
Component(s)
exporter/googlecloud
Describe the issue you're reporting
Hi Team,
We're using google cloud exporter with our Otel configuration. However, we have seen that Otel collector doesn't scrape all the metrics. Can you help us identify the problem? From the configuration endpoint, I couldn't find an issue.
Attached is the configuration currently in use.
Regards,
Piyush Gaur
values.txt
The text was updated successfully, but these errors were encountered: