Skip to content

feat(platform): promote verbosityLevel attribute to top-level VerbosityLevel field#1627

Draft
cotovanu-cristian wants to merge 6 commits into
mainfrom
feat/span-verbosity-level
Draft

feat(platform): promote verbosityLevel attribute to top-level VerbosityLevel field#1627
cotovanu-cristian wants to merge 6 commits into
mainfrom
feat/span-verbosity-level

Conversation

@cotovanu-cristian
Copy link
Copy Markdown
Collaborator

@cotovanu-cristian cotovanu-cristian commented May 13, 2026

Summary

  • Adds verbosity_level: Optional[int] to UiPathSpan, output as "VerbosityLevel" in to_dict().
  • _SpanUtils.otel_span_to_uipath_span promotes a verbosityLevel OTEL span attribute to the new top-level field — same shape as the existing executionType / agentVersion / referenceId promotions.
  • Enables producers to tag a span as internal-only (e.g. VerbosityLevel=OFF=6) so LLMOps can filter it out of user-facing trace UIs.
  • Bumps uipath-platform 0.1.480.1.49.

Test plan

  • pytest packages/uipath-platform/tests/services/test_span_utils.py — 20 passed, includes two new tests covering populated and absent verbosityLevel.
  • pytest packages/uipath/tests/tracing/test_otel_exporters.py — 25 passed, no regression on the existing exporter pipeline.
  • No change to the wire format for spans that don't set verbosityLevel: to_dict()["VerbosityLevel"] is null (consistent with ExecutionType / AgentVersion).

🤖 Generated with Claude Code

…tyLevel field

Add a `verbosity_level: Optional[int]` field on `UiPathSpan` that surfaces
as `"VerbosityLevel"` in `to_dict()`. `_SpanUtils.otel_span_to_uipath_span`
now promotes a `verbosityLevel` OTEL span attribute into this top-level
field, following the same pattern as `executionType`, `agentVersion`,
and `referenceId`.

Lets producers tag a span as internal-only (e.g. VerbosityLevel=OFF=6) so
LLMOps can filter it from user-facing trace UIs.

Bumps uipath-platform 0.1.48 -> 0.1.49.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels May 13, 2026
cotovanu-cristian and others added 4 commits May 13, 2026 13:24
Add `VerbosityLevel` IntEnum (Verbose=0, Trace=1, Information=2, Warning=3,
Error=4, Critical=5, Off=6) in `uipath.platform.common._span_utils`, and
re-export it via `uipath.tracing` for public consumption — same pattern
as `AttachmentDirection`, `AttachmentProvider`, `SpanAttachment`.

Values match the C# `UiPath.LLMOps.DataAccess.Models.VerbosityLevelEnum`.
Producers can now set `verbosityLevel=VerbosityLevel.OFF` on a span
attribute to keep it out of user-facing trace UIs.

Bumps uipath 2.10.63 -> 2.10.64, tightens uipath-platform lower bound
to 0.1.49 so the new uipath release also pulls the field plumbing in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n test

Replace the tautological `test_values_match_backend_enum` (which just
read back source values) and the two verbosity-specific promotion tests
with a single table-driven test in `TestVerbosityLevel` that documents
which OTEL attributes are promoted to top-level `UiPathSpan` fields.

The test serves as both regression guard and documentation: adding a row
means the attribute is newly promoted, removing one signals a contract
break for downstream consumers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The class checks promotion of all attributes (executionType,
agentVersion, referenceId, verbosityLevel), not just verbosity level.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Names the test class after the conversion function it exercises
(`_SpanUtils.otel_span_to_uipath_span`). Drops "promotion" terminology
in favour of "OTel attribute -> UiPathSpan field mapping".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cotovanu-cristian cotovanu-cristian marked this pull request as draft May 13, 2026 11:29
Backwards compat: pre-existing spans never emitted a VerbosityLevel
field on the wire — the LLMOps backend applies its own default
(Information=2) for spans that don't carry it. Unconditionally adding
`"VerbosityLevel": null` to every span's JSON would change the wire
format for every existing span in every existing agent.

Make the key conditional in `UiPathSpan.to_dict()`: emit only when the
producer explicitly opted in (e.g. AgentDefinition span with
VerbosityLevel.OFF). Spans that don't set it produce byte-for-byte
identical JSON to pre-change, leaving the backend's default path
untouched.

Adds `test_verbosity_level_omitted_when_unset` to lock the contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@github-actions
Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant