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

Add status code label to handled_latency_seconds histogram

Open ashamukov opened this issue 2 years ago • 5 comments

Hello! I'd like to add status code label to the handled_latency_seconds histogram, to distinguish timings by this criteria. To activate this feature, a boolean flag could be added to Configuration. Looks like pretty obvious enhancement, but may be you see some drawbacks? What do you think?

If this is good idea, could you also please tell, how much time is required to publish a new release (after potential commit)? Thanks!

ashamukov avatar Oct 28 '21 15:10 ashamukov

This sounds reasonable to me. The only concern would be the potential blowup of the amount of data due to the cardinality of the code enum combined with the already quite-large histogram metric. That said, if it's opt-in (as you're proposing), I don't see any issues. Feel free to send me a PR.

As for releasing, I'm maintaining this library in my free time so releases tend to happen on-demand and subject to my available bandwidth. That said, the amount of work required for each release has recently dropped significantly, so I'd be happy to cut a new one once the feature has landed.

dinowernli avatar Oct 29 '21 09:10 dinowernli

Hi Dino! Thanks for the answer! Sounds great, hope I'll come back soon with PR! 🙏

ashamukov avatar Oct 29 '21 12:10 ashamukov

Hi Dino! It's me again) Just would like to say, that if some of release-cutting work is "forkable", I could also help)

ashamukov avatar Nov 29 '21 01:11 ashamukov

Hi, I was looking at this issue and realised the PR was merged but a new release wasn't cut. I'd also be happy to help out if there's anything you want to offload.

andreweacott avatar Nov 23 '22 11:11 andreweacott

I've just cut release 0.6.0 with this change and have pushed it to maven. According to the docs, it should be available in the next 24h.

dinowernli avatar Nov 26 '22 11:11 dinowernli