Apologies for asking about a really boring topic.
I noticed in the README, metrics stored globally with upper case naming:
|
REQUEST_TIME = Summary('request_processing_seconds', 'Time spent processing request') |
This is a bit confusing for many readers because across multiple languages (including python) UPPER_CASE names are use to denote a constant (a value that does not change) and lower_case names are used for variables (that do change).
Likewise in the code base there are things like REGISTRY that are uppercase for non-constant items:
|
REGISTRY = CollectorRegistry(auto_describe=True) |
Is there a specific reason that these examples a reusing upper case names even though it conflicts with common standard and doesn't match the metric name?
I'm just asking because if there is a good reason, this might actually be worth documenting.
Apologies again for the trollish sounding question.
Apologies for asking about a really boring topic.
I noticed in the README, metrics stored globally with upper case naming:
client_python/README.md
Line 19 in d6e08e3
This is a bit confusing for many readers because across multiple languages (including python)
UPPER_CASEnames are use to denote a constant (a value that does not change) andlower_casenames are used for variables (that do change).Likewise in the code base there are things like
REGISTRYthat are uppercase for non-constant items:client_python/prometheus_client/registry.py
Line 168 in d6e08e3
Is there a specific reason that these examples a reusing upper case names even though it conflicts with common standard and doesn't match the metric name?
I'm just asking because if there is a good reason, this might actually be worth documenting.
Apologies again for the trollish sounding question.