Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-agenta committed Sep 10, 2024
1 parent 79afaa4 commit 6316562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agenta-cli/agenta/sdk/tracing/spans.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from json import loads, dumps
from typing import Optional, Any, Dict
from typing import Optional, Union, Any, Dict

from opentelemetry.sdk.trace import Span, Status, StatusCode
from opentelemetry.sdk.trace.export import ReadableSpan
Expand Down Expand Up @@ -42,7 +42,7 @@ def set_attributes(span: Span, namespace: str, attributes: Dict[str, Any]) -> No
)


def get_attributes(span: ReadableSpan | Span, namespace: str):
def get_attributes(span: Union[ReadableSpan, Span], namespace: str):
return {
_decode_key(namespace, key): _decode_value(value)
for key, value in span.attributes.items()
Expand Down

0 comments on commit 6316562

Please sign in to comment.