-
Notifications
You must be signed in to change notification settings - Fork 337
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
more flexibility desired from Registry interface #420
Comments
Hey, would |
No, the problem is the registry rather than the family. We want to be able to add metric families with the same name but different sets of labels. We can't use the non-standard-append insert behavior for the reasons mentioned above. The registry insert behavior we want is:
I you approve of the idea, I'm happy to submit a patch. |
I may have a similar requirement, was looking for functionality similar to GoLang's client library, 'CounterVec' and 'GaugeVec' metrics, where based on the labels supplied with .WithLabel() an existing counter or new counter was created and then updated. |
@danevandyck I can see what you want, but it would introduce some inconsistencies into the API, which makes me reluctant to make changes to better support your use case:
I think you can accomodate your use case by having one family with the intersection set of your two families, then create metrics on this family with the appropriate labels applied to them. You'd need to share these labels outside of Does that work for you? Thanks! |
Hello, hope this finds you well. We're using this library and are happy with its interface and performance in general.
The Registry's interface doesn't support the following usecase, which seems valid.
Add
ing its name / labelsWell, I guess it supports it, but only through the NonStandardAppend insert behavior. That behavior isn't suitable for our use since it seems to result in unbounded growth of the set of families absent de-registration.
Functionally, a Family instance provides a convenient way of passing labels through to a component. For example, consider a usecase where I update the same metric (http_request_seconds) in two different components. Ideally, I'd be able to allocate a Family instance with the component name as a label of each. So each metric added to each family instance gets that component label.
The text was updated successfully, but these errors were encountered: