diff --git a/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py b/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py index da03f79f1..e224d008e 100644 --- a/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py +++ b/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py @@ -2,7 +2,7 @@ from typing import Any, Callable, Dict, Optional, Union from opentelemetry import trace -from opentelemetry.trace import Link, Span, SpanContext, Status, StatusCode +from opentelemetry.trace import Link, SpanContext, Status, StatusCode from autogen import ConversableAgent # type: ignore @@ -34,7 +34,6 @@ def wrapped_generate( sender: Optional[str] = None, **kwargs: Any, ) -> Any: - span: Optional[Span] = None try: current_span = trace.get_current_span() current_context: SpanContext = current_span.get_span_context() @@ -76,7 +75,6 @@ def wrapped_generate( def wrapped_initiate_chat( agent_self: ConversableAgent, recipient: Any, *args: Any, **kwargs: Any ) -> Any: - span: Optional[Span] = None try: message = kwargs.get("message", args[0] if args else None) current_span = trace.get_current_span() @@ -128,7 +126,6 @@ def wrapped_execute_function( call_id: Optional[str] = None, verbose: bool = False, ) -> Any: - span: Optional[Span] = None try: current_span = trace.get_current_span() current_context: SpanContext = current_span.get_span_context()