diff --git a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py index 94cac68b70..30382b282a 100644 --- a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py @@ -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