Skip to content

feat(datafabric): add OTEL span instrumentation and error classification#968

Open
UIPath-Harshit wants to merge 1 commit into
mainfrom
feat/datafabric-telemetry-spans
Open

feat(datafabric): add OTEL span instrumentation and error classification#968
UIPath-Harshit wants to merge 1 commit into
mainfrom
feat/datafabric-telemetry-spans

Conversation

@UIPath-Harshit

Copy link
Copy Markdown
Contributor

Summary

  • Add OpenTelemetry span around Data Fabric SQL query execution with entity metadata (native/federated counts), success/error attributes, and structured error codes
  • Integrate DataFabricError classification from uipath-platform for richer error diagnostics (category, code, trace_id) on spans
  • Propagate error category and detail to parent graph state for termination messaging
  • Bump uipath upper bound to <2.13.0 and upgrade uipath-platform lockfile to 0.1.90

Test plan

  • 34 unit tests added in test_datafabric_subgraph.py covering:
    • QueryExecutor success/error paths with and without OTEL spans
    • Entity attribute computation (native vs federated)
    • DataFabricError classification and structured error detail formatting
    • Graph routing (router, tool_router), tool_node, termination_node, llm_node
  • 98.77% coverage on datafabric_subgraph.py
  • mypy, ruff, and httpx lint all pass

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 3, 2026 04:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds OpenTelemetry span instrumentation around Data Fabric SQL execution and enriches failure handling by classifying EnrichedException instances into DataFabricError details that are propagated into the subgraph state and surfaced in termination messaging.

Changes:

  • Instrument QueryExecutor with an OTEL span (attributes for SQL + entity metadata; success/error attributes).
  • Add DataFabricError-based error classification and propagate last error category/detail through DataFabricSubgraphState and termination output.
  • Update dependency constraints/lockfile (uipath upper bound, uipath-core + uipath-platform lock updates) and add a comprehensive new unit test suite for the subgraph.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/uipath_langchain/agent/tools/datafabric_tool/datafabric_subgraph.py Adds OTEL span wrapping, structured error classification, and state propagation for termination messaging.
tests/agent/tools/test_datafabric_subgraph.py Introduces extensive unit tests for success/error paths, OTEL behavior, routing, and termination messaging.
pyproject.toml Relaxes the uipath upper bound to allow <2.13.0.
uv.lock Locks updated uipath-core and uipath-platform versions and reflects the new uipath bound.

Comment thread src/uipath_langchain/agent/tools/datafabric_tool/datafabric_subgraph.py Outdated
Comment thread src/uipath_langchain/agent/tools/datafabric_tool/datafabric_subgraph.py Outdated
@UIPath-Harshit UIPath-Harshit force-pushed the feat/datafabric-telemetry-spans branch from 876e253 to af535e0 Compare July 3, 2026 04:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 876e253ffb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/uipath_langchain/agent/tools/datafabric_tool/datafabric_subgraph.py Outdated
…ion for SQL queries

- Add OpenTelemetry span around Data Fabric SQL query execution with
  entity metadata, success/error attributes, and structured error codes
- Integrate DataFabricError classification from uipath-platform for
  richer error diagnostics (category, code, trace_id) on spans
- Propagate error category and detail to parent graph state for
  termination messaging
- Bump uipath upper bound to <2.13.0 and uipath-platform to 0.1.90
- Add comprehensive unit tests for datafabric_subgraph (98% coverage)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@UIPath-Harshit UIPath-Harshit force-pushed the feat/datafabric-telemetry-spans branch from af535e0 to d9d4896 Compare July 3, 2026 04:33
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants