Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we set PROMETHEUS_DISABLE_CREATED_SERIES as true using java API instead of environment variables. #831

Open
muthuveerappan opened this issue Dec 14, 2022 · 1 comment

Comments

@muthuveerappan
Copy link

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

@muthuveerappan
Copy link
Author

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();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant