We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3906ce commit f8e6216Copy full SHA for f8e6216
comps/cores/mega/orchestrator.py
@@ -28,15 +28,13 @@
28
29
30
class OrchestratorMetrics:
31
- # Need an instance ID for metric prefix because:
32
- # - Orchestror instances are not named
33
- # - CI creates several orchestrator instances
+ # Need an static class-level ID for metric prefix because:
34
# - Prometheus requires metrics (their names) to be unique
35
_instance_id = 0
36
37
def __init__(self) -> None:
38
- self._instance_id += 1
39
- if self._instance_id > 1:
+ OrchestratorMetrics._instance_id += 1
+ if OrchestratorMetrics._instance_id > 1:
40
self._prefix = f"megaservice{self._instance_id}"
41
else:
42
self._prefix = "megaservice"
0 commit comments