go-grpc-prometheus icon indicating copy to clipboard operation
go-grpc-prometheus copied to clipboard

Option to reduce cardinality of grpc_server_handled_total

Open glukasiknuro opened this issue 4 years ago • 4 comments

For each method the grpc_server_handled_total exposes currently ~17 labels, per each status code. In most cases having just SUCCESS / FAILURE distinction would be enough, and would reduce amount of exported labels, which maybe an issue in case of multiple rpc methods.

For a single data point, imagine a server with 20 RPC methods, each replica will then exports about 400 labels just for RPC statuses.

This 17 labels looks like on par with histrogram metric, that has option to disable it because of the cardinality issue.

glukasiknuro avatar Jun 05 '20 14:06 glukasiknuro

Are you asking for lazy initialization or the ability to add/remove labels?

brancz avatar Jun 09 '20 12:06 brancz

Option to change grpc_server_handled_total - or something similar - to expose binary SUCCESS / FAILURE status instead of having one label per status.

glukasiknuro avatar Jun 09 '20 15:06 glukasiknuro

Got it. I think that request is reasonable, however, keep in mind that we are in the process of reworking this project (RE: https://github.com/grpc-ecosystem/go-grpc-prometheus/issues/91), and as a result we are unlikely to accept PRs that are not bug fixes. That said I think this would be an amazing addition to the reworked version! :) cc @bwplotka

brancz avatar Jun 09 '20 15:06 brancz

Yes! We are looking for some help as well on that (:

bwplotka avatar Jun 09 '20 16:06 bwplotka