client_java icon indicating copy to clipboard operation
client_java copied to clipboard

ExpositionFormats should be optional

Open turneand opened this issue 1 year ago • 1 comments

Our applications are deployed and make use of only the text based prometheus writers.

Is it possible to make the non-text based writers in ExpositionFormats optional (protobuf and openMetrics), and ideally flagged as optional dependencies? Protobuf binaries add on ~2mb to our deployable which we will never use, and also reduce the risk of any potential transitive vulnerabilities.

turneand avatar Oct 02 '24 16:10 turneand

PR is welcome :smile:

zeitlinger avatar Oct 07 '24 15:10 zeitlinger

this is possible for some time now https://prometheus.github.io/client_java/exporters/formats/#exclude-protobuf-exposition-format

zeitlinger avatar Apr 08 '25 10:04 zeitlinger