Skip to content

Document or fix more potential ways the goCollector can take very long due to ReadMemStats. #551

@beorn7

Description

@beorn7

Even with #403 being only relevant for older Go versions, there is still golang/go#19812 , which apparently has (rare?) real-world implications as seen in cortexproject/cortex#1281 .

Easiest way is to document the possibility.

However, with the various ways ReadMemStats has bitten us in the past, we might want to consider alternative solutions. Something like keeping the previous result around and returning it if the call takes too long or something. Returning nothing in case it takes too long is problematic as metrics would be incomplete. On the other hand, failing the whole collection just because the mem stats don't arrive in time is also bad for those that aren't that much interested in the mem stats metrics. We could also allow creating a Go collector that collects all Go metrics except the mem stats one...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions