Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: extra process spans
  • Loading branch information
cristipufu committed Nov 26, 2025
commit 621f4272c124781c16aef397efde1fd42b23d3f2
9 changes: 3 additions & 6 deletions src/uipath/tracing/_otel_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class Status:
def __init__(
self,
trace_id: Optional[str] = None,
extra_process_spans: Optional[bool] = False,
**kwargs,
):
"""Initialize the exporter with the base URL and authentication token."""
Expand All @@ -108,7 +107,6 @@ def __init__(
"Content-Type": "application/json",
"Authorization": f"Bearer {self.auth_token}",
}
self._extra_process_spans = extra_process_spans

client_kwargs = get_httpx_client_kwargs()

Expand All @@ -132,10 +130,9 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult:

url = self._build_url(span_list)

# Process spans in-place if needed - work directly with dict
if self._extra_process_spans:
for span_data in span_list:
self._process_span_attributes(span_data)
# Process spans in-place - work directly with dict
for span_data in span_list:
self._process_span_attributes(span_data)

# Serialize attributes once at the very end
for span_data in span_list:
Expand Down
2 changes: 1 addition & 1 deletion tests/tracing/test_otel_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def test_send_with_retries_success():

class TestLangchainExporter(unittest.TestCase):
def setUp(self):
self.exporter = LlmOpsHttpExporter(extra_process_spans=True)
self.exporter = LlmOpsHttpExporter()

def test_process_span_with_dict_attributes(self):
"""
Expand Down
Loading