From 190213a6cbbbc94548b6816e111a8bddbd0701b6 Mon Sep 17 00:00:00 2001
From: Tobias Persson <tobiaspn@axis.com>
Date: Thu, 21 Nov 2024 11:46:55 +0100
Subject: [PATCH] Fix import of opentelemetry.trace

---
 src/environment_provider/environment_provider.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/environment_provider/environment_provider.py b/src/environment_provider/environment_provider.py
index 6516939..f622d23 100644
--- a/src/environment_provider/environment_provider.py
+++ b/src/environment_provider/environment_provider.py
@@ -37,7 +37,7 @@
 from etos_lib.kubernetes.schemas import EnvironmentRequest as EnvironmentRequestSchema
 from jsontas.jsontas import JsonTas
 from packageurl import PackageURL
-import opentelemetry
+from opentelemetry import trace
 from opentelemetry.trace import SpanKind
 
 from execution_space_provider.execution_space import ExecutionSpace
@@ -94,7 +94,7 @@ def __init__(self, suite_runner_ids: Optional[list[str]] = None) -> None:
         self.suite_id = self.environment_provider_config.requests[0].spec.identifier
 
         self.logger.info("Initializing EnvironmentProvider.")
-        self.tracer = opentelemetry.trace.get_tracer(__name__)  # type:ignore
+        self.tracer = trace.get_tracer(__name__)
 
         self.suite_runner_ids = suite_runner_ids