You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, "_created" series can be disabled by setting PROMETHEUS_DISABLE_CREATED_SERIES environment variable. If one wants to set it from python, he needs to do it before importing prometheus_client, because the value is calculated on import.
Like this:
I was looking into doing this and see two options:
Allow access to the global variable, probably a function like disable_created_series() that sets _use_created to false.
Allow each registry to have _created series enabled/disabled.
Do we know of use cases where some collectors would like to have _created series and others do not? My thought is that a global setting is probably good enough since your system will either understand _created or not.
At the moment, "_created" series can be disabled by setting PROMETHEUS_DISABLE_CREATED_SERIES environment variable. If one wants to set it from python, he needs to do it before importing prometheus_client, because the value is calculated on import.
Like this:
That is not very pythonic, style checkers complain on imports not being at top of the file, etc.
Please add an ability to set this option from code, from function call, of just make
_use_created
variable inmetrics.py
public.The text was updated successfully, but these errors were encountered: