mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-21 03:59:04 +02:00
collector: bound MI probe queries in Build with a timeout (#2657)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1302cf6899
commit
465fccbe69
@@ -95,6 +95,8 @@ exercised a live Windows role.
|
||||
the original `Collection` owns collectors and MI resources. A timed-out call
|
||||
may still be running: prevent overlap, drain late metrics and do not free its
|
||||
resources while it runs. Honor the supplied scrape budget in blocking APIs.
|
||||
`Build` has no budget: bound its MI probe queries with `mi.BuildQueryTimeout`,
|
||||
never `0` (no MI timeout), so one stalled provider cannot block startup.
|
||||
- Release resources after partial initialization and on error paths. A non-nil
|
||||
PDH collector returned with an error still belongs to the caller and must be
|
||||
closed. Sub-collector cleanup closures must read the initialized field when
|
||||
|
||||
Reference in New Issue
Block a user