Skip to content

Commit

Permalink
Improve a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
idrissneumann committed Feb 28, 2024
1 parent b0f0056 commit 30b1e3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.0
3.6.1
9 changes: 3 additions & 6 deletions src/utils/gauge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
_current_gauge_values = {}

def create_gauge(name, description):
_current_gauge_values[name] = {
'val': 0.0,
'desc': description
}
_current_gauge_values[name] = 0.0

def observable_gauge_func(_):
yield Observation(_current_gauge_values[name]['val'])
yield Observation(_current_gauge_values[name])

get_otel_meter().create_observable_gauge(
name = name,
Expand All @@ -34,4 +31,4 @@ def set_gauge(gauge, value):
if match:
val = float(match.group())
gauge.set(val)
_current_gauge_values[gauge._name]['val'] = val
_current_gauge_values[gauge._name] = val

0 comments on commit 30b1e3d

Please sign in to comment.