Skip to content
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

[exporter/prometheus] Wait for final scrape during collector shutdown #31887

Closed
swar8080 opened this issue Mar 21, 2024 · 3 comments
Closed

[exporter/prometheus] Wait for final scrape during collector shutdown #31887

swar8080 opened this issue Mar 21, 2024 · 3 comments
Labels

Comments

@swar8080
Copy link
Contributor

Component(s)

exporter/prometheus

Is your feature request related to a problem? Please describe.

Prometheus may miss scraping a collector's metrics while the collector is shutting down

Describe the solution you'd like

The prometheus exporter could block during Shutdown until it's scraped or a configurable timeout passes

Describe alternatives you've considered

Possibly artificially delaying the shutdown of the collector works, but it sounds hacky

Additional context

I could implement this if no one else is interested

From looking at the code, i'm picturing the /metrics http handler writing to a channel once the Shutdown code sets a isShuttingDown flag, and then the Shutdown code blocking on reading that channel

@swar8080 swar8080 added enhancement New feature or request needs triage New item requiring triage labels Mar 21, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label May 20, 2024
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant