Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath"
version = "2.5.4"
version = "2.5.5"
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
6 changes: 4 additions & 2 deletions src/uipath/tracing/_otel_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,12 @@ def _get_base_url(self) -> str:
def _should_drop_span(self, span: ReadableSpan) -> bool:
"""Check if span is marked for dropping.
Spans with telemetry.filter="drop" are skipped by this exporter.
Spans with telemetry.filter="drop" or run_type="uipath" are skipped.
"""
attrs = span.attributes or {}
return attrs.get("telemetry.filter") == "drop"
return (
attrs.get("run_type") == "uipath" or attrs.get("telemetry.filter") == "drop"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break all coded agents tracing. All the SDK traces have run_type uipath

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right 🙈 , will close this PR... will find some other way to do this.

)


class JsonLinesFileExporter(SpanExporter):
Expand Down
12 changes: 12 additions & 0 deletions tests/tracing/test_otel_exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,18 @@ def test_passes_spans_with_other_filter_values(self, exporter_with_mocks):
span.attributes = {"telemetry.filter": "keep"}
assert exporter_with_mocks._should_drop_span(span) is False

def test_filters_spans_with_uipath_run_type(self, exporter_with_mocks):
"""Span with run_type=uipath → filtered out."""
span = MagicMock(spec=ReadableSpan)
span.attributes = {"run_type": "uipath"}
assert exporter_with_mocks._should_drop_span(span) is True

def test_passes_spans_with_other_run_types(self, exporter_with_mocks):
"""Span with other run_type values → passes through."""
span = MagicMock(spec=ReadableSpan)
span.attributes = {"run_type": "agent"}
assert exporter_with_mocks._should_drop_span(span) is False

def test_export_filters_marked_spans(self, exporter_with_mocks):
"""export() should filter out spans marked for drop."""
# Create mixed batch: 1 marked for drop, 1 unmarked
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.