Skip to content

Commit

Permalink
* move Instance variables to class variables. Since the object in que…
Browse files Browse the repository at this point in the history
…stion will be a singelton. This will resolve open-telemetry#2029 where multiple calls to the instrumentation will assign Null values.
  • Loading branch information
reiktar committed Mar 11, 2024
1 parent 937c9f7 commit ae97898
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ def keys(self, carrier):


class CeleryInstrumentor(BaseInstrumentor):
metrics = None
task_id_to_start_time = {}

def __init__(self):
super().__init__()
self.metrics = None
self.task_id_to_start_time = {}

def instrumentation_dependencies(self) -> Collection[str]:
return _instruments
Expand Down

0 comments on commit ae97898

Please sign in to comment.