Skip to content

Align with upstream changes for filtering out non-genai spans#95

Merged
rads-1996 merged 2 commits intomicrosoft:mainfrom
rads-1996:align-with-247
Apr 29, 2026
Merged

Align with upstream changes for filtering out non-genai spans#95
rads-1996 merged 2 commits intomicrosoft:mainfrom
rads-1996:align-with-247

Conversation

@rads-1996
Copy link
Copy Markdown
Member

@rads-1996 rads-1996 commented Apr 29, 2026

Aligns with upstream changes - microsoft/Agent365-python#247

Fixes #86

Copilot AI review requested due to automatic review settings April 29, 2026 23:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Aligns the Agent365 exporter behavior with upstream by filtering out non-genAI spans (based on gen_ai.operation.name) before partitioning and exporting, ensuring only supported genAI operations are sent to the ingest service.

Changes:

  • Added gen_ai.operation.name eligibility filtering (supported operation-name allowlist) as part of span grouping logic.
  • Updated Agent365 exporter to use the new filter+partition helper and adjusted the “nothing to export” log message.
  • Updated/expanded unit tests to include gen_ai.operation.name and validate filtering behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/a365/test_utils.py Updates tests to call filter_and_partition_by_identity and ensures mock spans include gen_ai.operation.name.
tests/a365/test_payload_chunking.py Adds gen_ai.operation.name to mock spans so chunking/export tests remain eligible after filtering.
tests/a365/test_exporter.py Extends span factory to include gen_ai.operation.name and adds new test coverage for filtering behavior.
src/microsoft/opentelemetry/a365/core/exporters/utils.py Introduces GEN_AI_OPERATION_NAMES allowlist and implements filtering in filter_and_partition_by_identity.
src/microsoft/opentelemetry/a365/core/exporters/agent365_exporter.py Switches exporter to the new filter+partition helper and updates the “no eligible spans” message.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/a365/test_utils.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rads-1996 rads-1996 merged commit fc05a66 into microsoft:main Apr 29, 2026
8 checks passed
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.

Console exporter outputs all spans — should filter to A365 observability scopes only

3 participants