Skip to content

Conversation

@saksharthakkar
Copy link
Contributor

@saksharthakkar saksharthakkar commented Jan 15, 2026

Summary

  • Filter internal UiPath SDK spans (run_type="uipath") from LLM Ops export
  • Add run_type check to _should_drop_span() in LlmOpsHttpExporter
  • Add tests for new filtering condition

Why move from uipath-agents-python?

The run_type="uipath" filtering was previously in uipath-agents-python span_processor.py#L29, but this approach has timing issues:

  • At span start: run_type attribute is not yet set, so we can't filter
  • At span end: spans are immutable, so we can't add telemetry.filter="drop"

Moving the filter to the exporter level in uipath-python:

  • Filters spans at export time when all attributes are available
  • Centralizes all span filtering logic in one place (_should_drop_span)
  • Ensures filtering works regardless of which SDK creates the spans

Test plan

  • Verify spans with run_type="uipath" are not exported to LLM Ops
  • Verify spans with other run_type values pass through
  • Verify existing telemetry.filter="drop" filtering still works
  • Run unit tests: pytest tests/tracing/test_otel_exporters.py -k TestSpanFiltering

🤖 Generated with Claude Code

@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 15, 2026
@saksharthakkar saksharthakkar force-pushed the fix/sdks-span-filtering branch 3 times, most recently from 883fb7c to 8555ff9 Compare January 16, 2026 00:06
@saksharthakkar saksharthakkar changed the title (wip) fix: filter spans with run_type=uipath from LLM Ops export fix: filter spans with run_type=uipath from LLM Ops export Jan 16, 2026
Add filtering for internal UiPath SDK spans to prevent them from being
exported to LLM Ops. Spans with run_type="uipath" are now dropped
alongside spans with telemetry.filter="drop".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@saksharthakkar saksharthakkar force-pushed the fix/sdks-span-filtering branch from 8555ff9 to cff6360 Compare January 16, 2026 00:12
@saksharthakkar saksharthakkar marked this pull request as ready for review January 16, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant