Repository navigation
Add explicit Agent365 execute-tool transfers - #309
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dfa03945-cb0e-4471-ba78-5980a3098d0b
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the typed transfer-metadata change.
No open issues 🎉
What changed in this PR
Adds explicit, typed transfer metadata to Agent365 execute-tool spans, keeping target-agent identity separate from source-agent attributes. This extends telemetry without changing dependencies or storage.
Changes:
- Introduces public transfer types and an optional trailing
ToolCallDetails.transfer_detailsfield, preserving existing positional calls. - Records explicit transfer mode, target type, and five supported target-agent fields; rejects invalid enum values and agent details for non-agent targets.
- Adds regression coverage, usage/privacy documentation, and a changelog entry.
No actionable findings. No additional validation commands were run.
| File | Description |
|---|---|
| tests/a365/test_execute_tool_scope.py | Tests transfer attributes, validation, opt-in behavior, and disabled telemetry. |
| src/microsoft/opentelemetry/a365/core/transfer_details.py | Defines transfer enums and a validated, frozen metadata model. |
| src/microsoft/opentelemetry/a365/core/tool_call_details.py | Appends optional transfer metadata to tool-call details. |
| src/microsoft/opentelemetry/a365/core/execute_tool_scope.py | Emits explicit transfer attributes and supported target identity fields. |
| src/microsoft/opentelemetry/a365/core/constants.py | Defines transfer telemetry attribute keys. |
| src/microsoft/opentelemetry/a365/core/__init__.py | Exports the new public transfer types. |
| CHANGELOG.md | Announces typed execute-tool transfer support. |
| A365_DOCUMENTATION.md | Documents transfer usage, validation, and privacy boundaries. |
Review effort: Balanced
|
Copilot resolve the merge conflicts in this pull request |
…-parity # Conflicts: # CHANGELOG.md Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Resolved the |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dfa03945-cb0e-4471-ba78-5980a3098d0b
Performance comparisonThreshold: regressions >15.0% on gating scenarios fail the build. Higher ops/s is better; positive Δ means the PR is slower.
|
Select the released OpenAIChatCompletionClient instead of the Responses client and pass the configured Azure API version explicitly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 14661e89-86a3-4afe-a454-263eaeeba021
…-parity # Conflicts: # A365_DOCUMENTATION.md # CHANGELOG.md # src/microsoft/opentelemetry/a365/core/execute_tool_scope.py # tests/a365/test_execute_tool_scope.py Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Preserve transfer telemetry and its regression tests alongside the merged request-session correlation changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 14661e89-86a3-4afe-a454-263eaeeba021
Summary
Port microsoft/opentelemetry-distro-dotnet#157 using Python-native typed contracts.
TransferDetails,TransferModeandTransferTargetTypetypes and an optional trailingToolCallDetails.transfer_detailsfield, preserving existing positional calls.gen_ai.agent.*identity unchanged.Validation
Python 3.11, with this branch's
srconPYTHONPATH:python -m pytest tests/a365 --ignore=tests/a365/integration -q --tb=short: 654 passed, 8 skipped, 41 subtests passed.python -m pylint --output-format=parseable: passed (10/10).python -m mypy --python-version 3.10 --show-error-codes --ignore-missing-imports --check-untyped-defs --follow-imports=silent: passed.git diff --check: passed.python -m build --no-isolation: wheel and source distribution built; all five changed source files, including the new transfer module, verified byte-for-byte in both artifacts.The unit run emits one exporter worker warning (
enriching_span_processor.py:449, cannot release un-acquired lock). The exact warning reproduces on unchanged main (640 passed, 8 skipped, 41 subtests passed); this PR does not change exporters.Full tox environments, Python 3.10/3.12-3.14 execution, live integration tests, Sphinx docs, and .NET/JavaScript execution were not run. No live telemetry was used.
This is an independent main-based PR. Existing Python storage work remains in #300.