fhemberger / prometheus-formatter

Browser extension which makes plain Prometheus/OpenMetrics endpoints easier to read
126 stars 10 forks source link

hide metrics with 0 value #21

Closed yarda7 closed 3 weeks ago

yarda7 commented 3 weeks ago

Hi @fhemberger Thanks for the great extension, it's my favorite...

I am writing to you not about accessibility issues, but a great idea for improvement. Any chance to easily hide(or filter) metrics with 0 value? Hope you find this idea as useful.

Thanks. Best Regards, Jarda

fhemberger commented 3 weeks ago

Hi Jarda,

thanks for your feedback. I don't plan to add metric filtering, it would be too complex to handle various cases/filter queries and the extension is solely meant to quickly check metric endpoints. Instead, I'd recommend to temporarily add the metric endpoint to a Prometheus instance and use PromQL for filtering.

However, feel free to fork this extension for your use case, the code for the metric output is here. You can run the modified code directly in your browser: