Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-gtokernliang committed Jan 9, 2025
1 parent af18dde commit f3c9e22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/trulens/experimental/otel_tracing/core/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from inspect import signature
import logging
from typing import Any, Callable, Dict, Optional, Union

from opentelemetry.baggage import get_baggage
from opentelemetry.trace.span import Span
from trulens.core.utils import signature as signature_utils
Expand Down Expand Up @@ -152,7 +153,7 @@ def set_main_span_attributes(
func: Callable,
args: tuple,
kwargs: dict,
ret,
ret: Any,
exception: Optional[Exception],
) -> None:
span.set_attribute(
Expand All @@ -162,7 +163,7 @@ def set_main_span_attributes(
if exception:
span.set_attribute(SpanAttributes.MAIN.MAIN_ERROR, str(exception))

elif ret is not None:
if ret is not None:
span.set_attribute(
SpanAttributes.MAIN.MAIN_OUTPUT,
signature_utils.main_output(func, ret),
Expand Down

0 comments on commit f3c9e22

Please sign in to comment.