[opentelemetry-util-genai] Add tests for tool invocation context property and explicit context - #747
Merged
lmolkova merged 3 commits intoSep 20, 2026
Conversation
…erty and explicit context
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Assertions should verify the exact invocation span and full trace context, not only recording status and span ID.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds unit coverage for ToolInvocation.context and explicit parent-context propagation, supporting the utility codegen work in #702.
Changes:
- Tests the invocation context property.
- Tests explicit context for
tool()andstart_tool().
| File | Description |
|---|---|
util/opentelemetry-util-genai/tests/test_toolcall.py |
Adds context and parent-span propagation tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pull request dashboard statusMerged · refreshed 2026-09-20 05:05 UTC Status above doesn't look right?
|
eternalcuriouslearner
approved these changes
Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this change do?
Adds unit tests validating
ToolInvocation.context,handler.tool(..., context=...), andhandler.start_tool(..., context=...).Why?
Ensures explicit parent context propagation and the active span context property are covered by unit tests, in preparation for codegen (#702).