-
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
Support reporting ExtraMetrics in prometheus client internally used by PrometheusReceiver in otel collector #21040
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@premendrasingh makes sense, and would you be interested in contributing this |
Thanks @JaredTan95 I will submit a PR for this change. |
@JaredTan95 Please help review the PR #21064 Thanks |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@JaredTan95 Please help review PR and let me know whether any more changes are needed. Thanks. |
(#21763) Feature: Enable reporting of additional metrics for Prometheus client used in PrometheusReceiver **Description:** Prometheus client has a featureFlag options.ExtraMetrics which reports content size metric ([scrape_body_size_bytes](https://github.com/prometheus/prometheus/blob/main/scrape/scrape.go#L1770)) for successful scrapes and -1 for dropped data. This metric will help us collect data and setup alert for dropped data. However the prometheus receiver does not have a way to enable this feature flag. This PR passes the flag to scrape.NewManager() to enable reporting of metric - [scrape_body_size_bytes](https://github.com/prometheus/prometheus/blob/main/scrape/scrape.go#L1770) **Link to tracking Issue:** #21040 **Testing:** Added check for validating the value set in testdata/config.yaml --------- Co-authored-by: Jared Tan <[email protected]> Co-authored-by: Pablo Baeyens <[email protected]>
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
receiver/prometheus
Is your feature request related to a problem? Please describe.
We use prometheus receiver to scrape metrics, however many times the prometheus endpoints return huge number of time series. We use body_size_limit to drop data but there is no way to report for which endpoints the data has been dropped.
Prometheus client has a featureFlag options.ExtraMetrics which reports content size metric (scrape_body_size_bytes) for successful scrapes and -1 for dropped data. This metric will help us collect data and setup alert for dropped data. However the prometheus receiver does not have a way to enable this feature flag. Please suggest a solution to enable this metric - scrape_body_size_bytes
Feature flag used for collecting metric
https://github.com/prometheus/prometheus/blob/main/scrape/scrape.go#L1798-L1808
Describe the solution you'd like
New scrape manager is created in PrometheusReceiver here, it can be enhanced to pass a flag to enable ExtraMetrics in Prometheus client.
For example something like
r.scrapeManager = scrape.NewManager(&scrape.Options{PassMetadataInContext:true, ExtraMetrics:r.cfg.ReportExtraMetrics}, logger, store)
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: