jupp0r / prometheus-cpp

Prometheus Client Library for Modern C++
Other
936 stars 330 forks source link

How to disable "meta" metrics about the endpoint itself? #480

Closed kuvaldini closed 3 years ago

gjasny commented 3 years ago

Right now there is no such functionality. Would you like to do a PR?

jupp0r commented 3 years ago

I'm also curious about your reason for disabling them. Having these metrics is pretty common in other client libraries as well as in the prometheus server itself.

gjasny commented 3 years ago

The prometheus guideline suggest that users SHOULD be able to disable these: https://prometheus.io/docs/instrumenting/writing_clientlibs/#standard-and-runtime-collectors

kuvaldini commented 3 years ago

@jupp0r somebody of the users of our app asked to disable because this is uninteresting text.

I simply commented the lines of code to reach the feature. I do not think people really need to disable self-metrics.

kuvaldini commented 3 years ago

@gjasny, no I would not. I do not think this has any real-world sense.