Skip to content

fix(instrumentation-py): repair Agno, Aleph Alpha, and Anthropic OTel 2.x spans - #373

Merged
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-agno-aleph-anthropic
Aug 21, 2026
Merged

fix(instrumentation-py): repair Agno, Aleph Alpha, and Anthropic OTel 2.x spans#373
fran3cc merged 2 commits into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-agno-aleph-anthropic

Conversation

@Nightingalelyy

@Nightingalelyy Nightingalelyy commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve the enclosing workflow name across Agno agent, team, chat, tool, and event spans, and retain tool calls in structured entity output
  • classify Aleph Alpha evaluate and explain as non-generative task spans without fabricated model usage, while retaining structured results and chat tool-call output
  • preserve Anthropic provider HTTP status codes and active workflow names on chat, tool, and error spans
  • add focused regressions and patch release intent for all three packages

Why.

The OTel compatibility audit found that these packages split logical workflows, misclassified Aleph Alpha analytical operations, and flattened real Anthropic provider failures to generic 500 records.

Root cause.

  • native Agno spans replaced or omitted the active workflow context
  • Aleph Alpha treated every non-chat/non-embedding method as a completion
  • Anthropic error export ignored status fields carried by SDK exceptions, and injected spans did not read the active workflow context

Validation

  • focused tests: Agno 14 passed / 1 opt-in skipped; Aleph Alpha 7 passed; Anthropic 15 passed

  • all three wheels built, installed together in a clean Python 3.11 environment, and imported from the wheel artifacts

  • all 15 corresponding examples passed against locally linked packages under marker otel2-fix-py-group-08-20260815T201000Z

  • Respan MCP exact-marker audit: 15/15 trace trees and 51/51 full records inspected; exact span counts, connected hierarchy, workflow grouping, content, usage, tools, and expected 404 status passed

  • release inventory, release-intent, missing-intent, and git diff --check validation passed

  • Contribution re-audit against every current document under contribution/ passed after 77f1b68: Aleph Alpha text completion uses canonical chat request type; Anthropic automatic span-kind and deprecated tool aliases are absent; definitions/calls and tool execution I/O use canonical JSON.

  • Fresh correction validation: Agno 14 passed / 1 skipped, Aleph Alpha 7 passed, Anthropic 15 passed; corrected-package wheels, release inventory/intents, formatting/import, and diff checks passed; marker otel2-pr-contract-corrections-20260818T133300Z produced 2 representative traces / 6 full records for Aleph Alpha and Anthropic, all inspected.

External follow-ups

  • The platform currently retains Agno/Aleph canonical tool attributes and structured message content but does not project them into its top-level tool arrays; this is recorded as a backend follow-up rather than addressed with prohibited compatibility aliases.

Companion examples

@Nightingalelyy Nightingalelyy changed the title fix(instrumentations): repair Agno, Aleph Alpha, and Anthropic tracing fix(instrumentation): repair Agno, Aleph Alpha, and Anthropic OTel 2.x spans Aug 17, 2026
@Nightingalelyy Nightingalelyy changed the title fix(instrumentation): repair Agno, Aleph Alpha, and Anthropic OTel 2.x spans fix(instrumentation-py): repair Agno, Aleph Alpha, and Anthropic OTel 2.x spans Aug 18, 2026
@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 19, 2026 07:00

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@fran3cc
fran3cc merged commit 08f16bc into respanai:main Aug 21, 2026
6 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.

2 participants