Skip to content

Commit 7017386

Browse files
committed
sometimes Python OOP escapes me
1 parent 1f59da8 commit 7017386

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

relay/metric.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,16 @@ class Neo4j5Metric:
179179
"""
180180
Represents a metric emitted by Neo4j v5.
181181
"""
182-
key: str
183-
value: Union[int, float]
184-
origin: Origin
185-
seen_at: Union[int, float]
186-
187-
kind: MetricKind = MetricKind.GAUGE
188-
value_type: ValueType = ValueType.INT
189-
system: MetricSystem = MetricSystem.DBMS
190-
labels: List[Label] = []
182+
def __init__(self):
183+
self.key: str = ""
184+
self.value: Union[int, float] = 0
185+
self.origin: Origin = Origin()
186+
self.seen_at: Union[int, float] = 0
187+
188+
self.kind: MetricKind = MetricKind.GAUGE
189+
self.value_type: ValueType = ValueType.INT
190+
self.system: MetricSystem = MetricSystem.DBMS
191+
self.labels: List[Label] = []
191192

192193

193194
@staticmethod

0 commit comments

Comments
 (0)