-
Notifications
You must be signed in to change notification settings - Fork 378
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
Report data from custom collectors #241
Comments
I would actually like if prom-client had support for custom collections since it's been requested before too. But for this it might be better to take then more simple approach.. @SimenB, @zbjornson what do you think? |
Any update here? |
Sorry about the late response.. After giving it some more thought I actually prefer your first suggestion, even if it's more work. I have concerns that if a set function is added to Counters it will be misused and also confusing. I, however, do not know the requirements specially for custom collectors so I will not be much of help other than code reviewing if anyone is willing to do some work on it! |
See also #197 |
Hi !
This is Mayur from OpenCensus team. Recently we've been working on adding already aggregated metrics data to (
Counter
,Gauge
andHistogram
) prom-client. As data is already aggregated it does not make sense to report them usingcounter.inc(val)
andhistogram.observe(val);
. This client doesn't seem to support custom collectors.Is it possible to add new APIs similar to https://github.com/prometheus/client_python/blob/624bb61e6f15e0c3739fec853edaea2b91d1674f/prometheus_client/metrics_core.py#L178 and https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/Collector.java#L75 to report data from custom collectors?
OR
In order to record already aggregated data with
Counter
andHistogram
, we should includeset()/addMetric()
method. I think this would be simpler and straight-forward approach.Let me know your views, I can help you to send PR.
The text was updated successfully, but these errors were encountered: