Skip to content

fix(instrumentation-py): repair OpenAI, OpenAI Agents, and OpenInference OTel 2.x spans - #386

Merged
fran3cc merged 1 commit into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-openai-agents-openinference
Aug 21, 2026
Merged

fix(instrumentation-py): repair OpenAI, OpenAI Agents, and OpenInference OTel 2.x spans#386
fran3cc merged 1 commit into
respanai:mainfrom
Nightingalelyy:fix/otel2-py-openai-agents-openinference

Conversation

@Nightingalelyy

@Nightingalelyy Nightingalelyy commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • repair OpenAI 3.x create/parse, sync/async streaming, tool, usage, response-ID, error, lifecycle, and serialization behavior
  • repair OpenAI Agents 0.20 trace/task/turn/agent/chat/tool/handoff/guardrail semantics, lifecycle, streaming, metadata propagation, and privacy
  • make OpenInference translation canonical-only, lifecycle-safe, bounded/redacted, and verified through real OTel ReadableSpan/provider chains
  • add one patch release intent for all three packages; package versions are intentionally left to the release pipeline

Validation

  • package tests: OpenAI 27/27, OpenAI Agents 20/20, OpenInference 34/34

  • all three package Ruff/format checks pass

  • all three wheels build and pass isolated install/import/pip checks

  • exact marker otel2-fix-py-group-20-20260817T182331Z: 47 traces and all 269 displayed record details inspected, with unique IDs, resolved parents, bounded payloads, canonical tools/calls, and no credential leakage

  • the complete Agents live suite also passed earlier under otel2-fix-py-group-20-20260817T174131Z: 23 traces / 402 inspected records; the replacement marker proves the later metadata compatibility fix on every Agents record

  • Full 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

  • current ingestion still projects some native OTel errors as success/200, leaves convenience tool arrays empty, and has provider/stream/token-estimation gaps
  • canonical respan.metadata is retained; OpenAI Agents also emits the repository-supported bounded flattened compatibility form until ingest merges the aggregate bucket
  • shared Respan.log_batch_results() task typing, marker indexing, and synthetic-root behavior are recorded as a separate core gap and are not changed here
  • the repository credential remains valid, but the final Agents live phase was externally blocked after authentication by missing provider key/managed credits

Companion examples

@Nightingalelyy Nightingalelyy changed the title fix(instrumentation): repair OpenAI, OpenAI Agents, and OpenInference OTel 2.x spans fix(instrumentation-py): repair OpenAI, OpenAI Agents, and OpenInference OTel 2.x spans Aug 18, 2026
@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 19, 2026 15:59

@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 f204416 into respanai:main Aug 21, 2026
17 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