client_java
client_java copied to clipboard
Can we set PROMETHEUS_DISABLE_CREATED_SERIES as true using java API instead of environment variables.
If we have many pods, we can't change environment variables / yamls for the same to set this variable. Is there any java api to set this PROMETHEUS_DISABLE_CREATED_SERIES
Reference
Environment variable PROMETHEUS_DISABLE_CREATED_SERIES=true for disabling _created metrics
https://github.com/prometheus/client_java/pull/791/files#diff-a3ff4db5a46bb0bba0d2bfa53335ab96214c125a51e1e3345a69f2f012f41a0d
I am not sure, if this will work - System.setProperty(“PROMETHEUS_DISABLE_CREATED_SERIES”, “true”); Better to provide something like a new api - Environment.forceDisableCreatedSeries();