Skip to content

Commit dc8d631

Browse files
committed
fix: use typing.Dict for 3.8 compatibility and resolve failing tests
1 parent 36c9a97 commit dc8d631

File tree

1 file changed

+2
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore

1 file changed

+2
-1
lines changed

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def response_hook(span, service_name, operation_name, result):
112112
from opentelemetry.semconv.trace import SpanAttributes
113113
from opentelemetry.trace import get_tracer
114114
from opentelemetry.trace.span import Span
115+
from opentelemetry.util.types import AttributeValue
115116

116117
logger = logging.getLogger(__name__)
117118

@@ -407,7 +408,7 @@ def _safe_invoke(function: Callable, *args):
407408
)
408409

409410

410-
def _get_server_attributes(endpoint_url: str) -> dict[str, str]:
411+
def _get_server_attributes(endpoint_url: str) -> Dict[str, AttributeValue]:
411412
"""Extract server.* attributes from AWS endpoint URL."""
412413
parsed = urlparse(endpoint_url)
413414
attributes = {}

0 commit comments

Comments
 (0)