Skip to content

fix(platform): use LLMOps span ID in trace header#1547

Merged
cfauchere merged 2 commits intomainfrom
fix/trace-header-use-llmops-span-id
Apr 8, 2026
Merged

fix(platform): use LLMOps span ID in trace header#1547
cfauchere merged 2 commits intomainfrom
fix/trace-header-use-llmops-span-id

Conversation

@cfauchere
Copy link
Copy Markdown
Contributor

@cfauchere cfauchere commented Apr 7, 2026

Summary

  • _inject_trace_context now prefers the external (LLMOps) span over the raw OTEL span when building the x-uipath-traceparent-id header
  • This ensures the span ID in the header matches what's visible in the LLMOps trace UI, enabling end-to-end correlation between agent traces and downstream services (ECS / Context Grounding)
  • Previously the header carried @traced SDK span IDs which are not in the LLMOps trace, making correlation impossible

Test plan

  • Local validation: ran agent with CG tool, verified header span ID 95eb5d6c5cec2544 matches the test (contextGroundingTool) span in the LLMOps trace
  • Trace ID matches across all headers
  • No Failed to detach context errors
  • Agent completes successfully with CG search results

Validation

  contextgrounding_unified_search  span=22196e2e852ae856  parent=72345458d68098f9
  ├── contextgrounding_retrieve    span=c59f6793ad7ec559  parent=22196e2e852ae856
  │   ├── folder_retrieve_key      span=1257f581d112efd0  parent=c59f6793ad7ec559
  │   │   └── GET (folders)        span=50b5af2c58e2bad1  parent=1257f581d112efd0
  │   └── GET (indexes)            span=0db3fdbe58f0b31c  parent=c59f6793ad7ec559
  └── POST (search)                span=71d8fe76755ccea9  parent=22196e2e852ae856 

🤖 Generated with Claude Code

@github-actions github-actions bot added the test:uipath-langchain Triggers tests in the uipath-langchain-python repository label Apr 7, 2026
The trace header now prefers the external (LLMOps) span over the raw OTEL
span, so the span ID in the header matches what's visible in the LLMOps
trace UI. This enables end-to-end correlation between agent traces and
downstream service logs (e.g. Context Grounding / ECS).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cfauchere cfauchere force-pushed the fix/trace-header-use-llmops-span-id branch from d1d9b0d to 143ac18 Compare April 7, 2026 23:11
@cfauchere cfauchere merged commit d52bcf1 into main Apr 8, 2026
117 checks passed
@cfauchere cfauchere deleted the fix/trace-header-use-llmops-span-id branch April 8, 2026 14:37
cfauchere pushed a commit to UiPath/uipath-langchain-python that referenced this pull request Apr 8, 2026
Bump minimum uipath-platform dependency to pick up the trace header
fix (UiPath/uipath-python#1547) which uses the LLMOps span ID in
x-uipath-traceparent-id for end-to-end correlation.

Note: uipath-platform minimum kept at >=0.1.20 until 0.1.22 is
published. Must be updated to >=0.1.22 before release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cfauchere pushed a commit to UiPath/uipath-langchain-python that referenced this pull request Apr 8, 2026
Bump minimum uipath-platform dependency to pick up the trace header
fix (UiPath/uipath-python#1547) which uses the LLMOps span ID in
x-uipath-traceparent-id for end-to-end correlation.

Note: uipath-platform minimum kept at >=0.1.20 until 0.1.22 is
published. Must be updated to >=0.1.22 before release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cfauchere pushed a commit to UiPath/uipath-langchain-python that referenced this pull request Apr 8, 2026
Bump minimum uipath-platform dependency to pick up the trace header
fix (UiPath/uipath-python#1547) which uses the LLMOps span ID in
x-uipath-traceparent-id for end-to-end correlation.

Note: uipath-platform minimum kept at >=0.1.20 until 0.1.22 is
published. Must be updated to >=0.1.22 before release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cfauchere pushed a commit to UiPath/uipath-langchain-python that referenced this pull request Apr 8, 2026
Bump minimum uipath-platform dependency to pick up the trace header
fix (UiPath/uipath-python#1547) which uses the LLMOps span ID in
x-uipath-traceparent-id for end-to-end correlation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants