Skip to content

fix(instrumentation-js): repair OpenAI Agents and OpenRouter OTel 2.x spans - #368

Merged
fran3cc merged 1 commit into
respanai:mainfrom
Nightingalelyy:fix/otel2-js-agents-openrouter
Aug 21, 2026
Merged

fix(instrumentation-js): repair OpenAI Agents and OpenRouter OTel 2.x spans#368
fran3cc merged 1 commit into
respanai:mainfrom
Nightingalelyy:fix/otel2-js-agents-openrouter

Conversation

@Nightingalelyy

@Nightingalelyy Nightingalelyy commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • map noncanonical OpenAI Agents trace/span IDs to deterministic full-width OTel IDs, preserve trace grouping/marker context, expose agent tool/handoff/output configuration in canonical metadata, and source the instrumentation version from the package manifest
  • apply the OpenRouter package instrumentation scope to chat and embedding spans and preserve embedding vectors in canonical output
  • add focused identity, configuration, scope, and embedding-output coverage plus patch release intent

Validation

  • package builds: OpenAI Agents, OpenInference, OpenRouter

  • focused tests: 12/12, 6/6, 6/6 (24/24 total)

  • npm pack --dry-run: all three packages

  • corresponding locally linked examples: 13/13 under otel2-fix-js-group-03-20260815T085421Z

  • Respan MCP: 13 complete trees and all 46 full records inspected; one real root per tree, exact span counts, all parents resolved, no duplicate IDs, expected content and package provenance preserved

  • example typechecks, release inventory, release intents, and git diff --check

  • 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

  • The unchanged OpenInference package passed its success-path translation checks. Its deliberate provider rejection retains the exact error but is still displayed by platform ingestion as success/200; that residual platform-status gap is documented in the cumulative audit record.

Companion examples

@Nightingalelyy
Nightingalelyy marked this pull request as ready for review August 15, 2026 14:41

@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.

@Nightingalelyy Nightingalelyy changed the title fix(instrumentations): repair OpenAI Agents and OpenRouter spans fix(instrumentation): repair OpenAI Agents and OpenRouter OTel 2.x spans Aug 17, 2026
@Nightingalelyy Nightingalelyy changed the title fix(instrumentation): repair OpenAI Agents and OpenRouter OTel 2.x spans fix(instrumentation-js): repair OpenAI Agents and OpenRouter OTel 2.x spans Aug 18, 2026
@fran3cc
fran3cc merged commit 8039ace into respanai:main Aug 21, 2026
5 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