Skip to content

Commit

Permalink
chore: Dont import Span from deprecated module
Browse files Browse the repository at this point in the history
  • Loading branch information
eirsyl committed Jun 27, 2024
1 parent 389ff5f commit 342e82e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
23 changes: 1 addition & 22 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions troncos/tracing/_span.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Any

from ddtrace import constants, ext
from ddtrace.span import Span as DDSpan
from ddtrace import Span as DDSpan, constants, ext
from opentelemetry.attributes import BoundedAttributes # type: ignore
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from opentelemetry.sdk.trace import (
Expand Down
2 changes: 1 addition & 1 deletion troncos/tracing/_writer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any

from ddtrace import Span
from ddtrace.internal.writer.writer import TraceWriter
from ddtrace.span import Span
from opentelemetry.sdk.resources import Resource

from ._exporter import Exporter
Expand Down
3 changes: 1 addition & 2 deletions troncos/tracing/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from typing import Awaitable, Callable, ParamSpec, Type, TypeVar, cast, overload

import ddtrace
from ddtrace.span import Span

_TRACE_IGNORE_ATTR = "_trace_ignore"

Expand All @@ -26,7 +25,7 @@ def trace_block(
service: str | None = None,
span_type: str | None = None,
attributes: dict[str, str] | None = None,
) -> Generator[Span, None, None]:
) -> Generator[ddtrace.Span, None, None]:
"""
Trace a code block using a with statement. Example:
Expand Down

0 comments on commit 342e82e

Please sign in to comment.