Repository navigation
Record full endpoint URLs on Agent365 execute-tool spans - #311
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 opt-in endpoint URL recording change, though reported validation was not independently rerun.
No open issues 🎉
What changed in this PR
Adds opt-in full endpoint URL recording to Agent365 execute-tool spans while preserving existing hostname/port endpoints and leaving other scopes unchanged.
Changes:
- Adds optional
ServiceEndpoint.urland afrom_url()constructor that derives hostname and port. - Emits
url.fullon execute-tool spans and tests URL parsing, port handling, IPv6, invalid inputs, and legacy behavior. - Documents caller-side sanitization and that URL recording is independent of
enable_sensitive_data.
No actionable findings. Reported validation results were not independently rerun.
| File | Description |
|---|---|
tests/a365/test_execute_tool_scope.py |
Adds URL recording, parsing, and backward-compatibility tests. |
src/microsoft/opentelemetry/a365/core/models/service_endpoint.py |
Adds the optional URL field and URL-based constructor. |
src/microsoft/opentelemetry/a365/core/execute_tool_scope.py |
Records explicitly supplied endpoint URLs on tool spans. |
src/microsoft/opentelemetry/a365/core/constants.py |
Defines the url.full attribute key. |
CHANGELOG.md |
Announces full endpoint URL support. |
A365_DOCUMENTATION.md |
Documents usage, compatibility, and privacy responsibilities. |
Review effort: Balanced
Link the changelog to the Python PR and cover empty and malformed endpoint URLs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 14661e89-86a3-4afe-a454-263eaeeba021
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dfa03945-cb0e-4471-ba78-5980a3098d0b
|
Copilot resolve the merge conflicts in this pull request |
# Conflicts: # CHANGELOG.md Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Resolved the conflict with |
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
Performance comparisonThreshold: regressions >15.0% on gating scenarios fail the build. Higher ops/s is better; positive Δ means the PR is slower.
|
Summary
Port microsoft/opentelemetry-distro-dotnet#170 with a backward-compatible Python endpoint API.
ServiceEndpoint.urlandServiceEndpoint.from_url(), deriving hostname and port from an absolute URL while retaining its full path/query.url.fullonly on execute-tool spans when explicitly supplied. Existing hostname/port endpoints remain unchanged; port 443 is still omitted.enable_sensitive_data.No dependencies, inference endpoint behavior, exporter configuration, or storage policy change.
Validation
Python 3.11, with this branch's
srconPYTHONPATH:python -m pytest tests/a365 --ignore=tests/a365/integration -q --tb=short: 649 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 three changed source files 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.