fix(instrumentation-py): repair AgentScope and AgentSpec OTel 2.x spans - #372
Merged
fran3cc merged 1 commit intoAug 21, 2026
Conversation
Nightingalelyy
marked this pull request as ready for review
August 19, 2026 06:28
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
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.
Summary
AgentOps was validated in the same three-gap group, but its only change is in
respan-example-projects; because this Respan PR has no AgentOps source diff, the source PR title intentionally names only AgentScope and AgentSpec.Root cause.
AgentScope examples created multiple same-name instrumentors, and Respan activated only the first lifecycle; the scripted model also lacked the formatter required by current AgentScope. AgentSpec patched a callback base class that the current LLM handler overrides, inherited an upstream 64-bit trace-ID conversion, and exported indexed message content without canonical boundary reconstruction. Its workflow root is created before child propagation, so late identifiers and custom metadata also needed explicit root promotion.
Impact.
The locally linked examples now expose the intended direct-model, agent, tool, multi-agent, failure, and propagation paths. AgentSpec traces preserve 128-bit identity, exact provider usage, meaningful workflow/agent content, and root-level propagated fields without duplicate aliases.
Validation
AgentOps tests: 4/4
AgentScope tests: 13/13
AgentSpec tests: 14/14
AgentScope and AgentSpec wheels built, installed into a clean Python 3.11 environment, and imported successfully
all eight corresponding examples completed with marker
otel2-fix-py-group-01-final2-20260815T182131ZRespan MCP: 11 traces and 30 unique full records; one root per tree, exact counts, resolved parents, no duplicates/orphans, complete content/tools/errors/propagation
release-intent validation, missing-intent coverage, example compilation, and
git diff --checkpassedFull source and paired-example diffs were audited against every applicable document under
contribution/; canonical span fields, OTel attribute shapes, release-intent/version ownership, and package boundaries have no remaining package-owned violation.External follow-ups
Companion examples