Skip to content

Commit cd5aaa6

Browse files
committed
refactor: update relative imports to absolute imports
1 parent 465ca78 commit cd5aaa6

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

util/opentelemetry-util-genai/src/opentelemetry/util/genai/generators.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@
4848
Tracer,
4949
set_span_in_context,
5050
)
51-
52-
from .span_utils import (
51+
from opentelemetry.util.genai.span_utils import (
5352
_apply_error_attributes,
5453
_apply_finish_attributes,
5554
)
56-
from .types import Error, LLMInvocation
55+
from opentelemetry.util.genai.types import Error, LLMInvocation
5756

5857
# Type alias matching the token type expected by opentelemetry.context.detach
5958
ContextToken: TypeAlias = Token[otel_context.Context]

util/opentelemetry-util-genai/src/opentelemetry/util/genai/handler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@
5353

5454
from opentelemetry.semconv.schemas import Schemas
5555
from opentelemetry.trace import get_tracer
56-
57-
from .generators import SpanGenerator
58-
from .types import Error, LLMInvocation
59-
from .version import __version__
56+
from opentelemetry.util.genai.generators import SpanGenerator
57+
from opentelemetry.util.genai.types import Error, LLMInvocation
58+
from opentelemetry.util.genai.version import __version__
6059

6160

6261
class TelemetryHandler:

util/opentelemetry-util-genai/src/opentelemetry/util/genai/span_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@
2626
Span,
2727
)
2828
from opentelemetry.trace.status import Status, StatusCode
29+
from opentelemetry.util.genai.types import (
30+
Error,
31+
InputMessage,
32+
LLMInvocation,
33+
OutputMessage,
34+
)
2935
from opentelemetry.util.genai.utils import (
3036
ContentCapturingMode,
3137
get_content_capturing_mode,
3238
is_experimental_mode,
3339
)
3440

35-
from .types import Error, InputMessage, LLMInvocation, OutputMessage
36-
3741

3842
def _apply_common_span_attributes(
3943
span: Span, invocation: LLMInvocation

0 commit comments

Comments
 (0)