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

Add a helper function to register all Collectors in a struct #712

Closed
wants to merge 1 commit into from

Commits on Feb 12, 2020

  1. Add a helper function to register all Collectors in a struct

    This is reflection based, but registration is not time-critical.
    
    Example where this is would come in handy:
    https://github.com/prometheus/prometheus/blob/92f31c3ec290fa744e167c0cb2daebfabae6c82b/tsdb/compact.go#L132-L140
    
    Note that the fields in compactorMetrics needed to be exported (but
    not compactorMetrics itself).
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Feb 12, 2020
    Configuration menu
    Copy the full SHA
    1cead68 View commit details
    Browse the repository at this point in the history