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
In src/decisionengine/framework/engine/DecisionEngine.py, there are a number of metrics that are declared like this that have labels specified, like this one:
@vitodb , @mambelli , and I did some tests and believe this will cause the DE to error out (probably crashing the DE) if the affected command (de-client --set_channel_log_level in this case) is run.
Please correct this and all other metrics as necessary so that if they are declared initially to have a label, that the label is set at measurement time.
Note that in some cases, this might require not using a decorator (since, for example, for the above case, you won't have the source name outside of the function, but you do INSIDE the function), and rather using the context manager as shown here:
In
src/decisionengine/framework/engine/DecisionEngine.py
, there are a number of metrics that are declared like this that have labels specified, like this one:decisionengine/src/decisionengine/framework/engine/DecisionEngine.py
Line 460 in 0a38b17
However, later on in the module, the metric is measured without a label:
decisionengine/src/decisionengine/framework/engine/DecisionEngine.py
Line 1205 in 0a38b17
@vitodb , @mambelli , and I did some tests and believe this will cause the DE to error out (probably crashing the DE) if the affected command (
de-client --set_channel_log_level
in this case) is run.Please correct this and all other metrics as necessary so that if they are declared initially to have a label, that the label is set at measurement time.
Note that in some cases, this might require not using a decorator (since, for example, for the above case, you won't have the source name outside of the function, but you do INSIDE the function), and rather using the context manager as shown here:
https://prometheus.github.io/client_python/instrumenting/gauge/
Let me know if you have any questions about this issue.
The text was updated successfully, but these errors were encountered: