Skip to content

docs: OpenTelemetry design — upstream SDK survey + wrapper span plan - #50

Closed
shashikanth-gs wants to merge 9 commits into
mainfrom
cursor/otel-design-survey
Closed

shashikanth-gs wants to merge 9 commits into
mainfrom
cursor/otel-design-survey

Conversation

@shashikanth-gs

@shashikanth-gs shashikanth-gs commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

OpenTelemetry design docs for the roadmap item, now including a core-centric plumbing inventory across all providers.

Docs

  • docs/opentelemetry.md — architecture, de-dupe rules, collector/parent-child topology, §6 plumbing inventory (hooks A–F in @a2a-wrapper/core)
  • docs/otel-genai-attribute-matrix.md — GenAI attribute × emitter matrix
  • README roadmap links

Plumbing conclusion (short)

Shared OTel must attach in core at:

  1. createA2AServer executor decorator — a2a.task.execute / cancel for all wrappers
  2. AgentEventEmitter.emit — single chokepoint for sideband→OTel policy (all mappers already converge here)
  3. Shared helpers — extractA2ATraceContext, ALS, W3C carrier, usage→gen_ai.*

Wrappers only keep Hook F (Copilot telemetry / Claude env / etc.). No OTel in each EventMapper.

Packages touched

  • @a2a-wrapper/core
  • a2a-claude / a2a-codex / a2a-copilot / a2a-opencode / a2a-antigravity
  • examples / docs only

Checklist

  • npm run build && npm test pass
  • Added a changeset if a published package changed
  • Updated docs / README

Test plan

  • Plumbing survey against all five executors + core factory/emitter/session
  • Next: implement Phase 1 in packages/core/src/telemetry/*
Open in Web Open in Cursor 

cursoragent and others added 9 commits October 10, 2026 15:59
Capture the multi-layer plan for optional OTel in a2a-wrapper: reuse
backend SDK/CLI exporters where they exist (Copilot, Claude, Codex,
OpenCode), always emit wrapper-level a2a.* spans from core, and keep
A2A sideband trace artifacts as a parallel channel.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Spell out span ownership: when Copilot (or any backend) OTel is on,
wrapper keeps A2A task/session/delegation spans and sideband artifacts,
but must not mirror tool_call/trace.mcp into a second OTLP tool span.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Pull latest OpenTelemetry GenAI/MCP conventions from
semantic-conventions-genai and map each attribute to Claude, Codex,
Copilot, OpenCode, Antigravity, and planned a2a-wrapper emitters,
including A2A-only a2a.* fields and anti-duplication notes.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Document how wrapper and Copilot export to the same OTLP collector,
why HTTP 4318 is the Copilot-compatible default, and how Tempo/Langfuse
show one trace with separate spans rather than a merged span.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Map shared execute/emitter/session/factory hooks and designate core
attachment points (executor decorator, AgentEventEmitter, ALS) so OTel
is not reimplemented in each a2a-* wrapper.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Clarify that core peers optional @opentelemetry/api only, hosts/CLIs
own the SDK/exporter versions, and Copilot CLI OTel is out-of-process
so it cannot clash with Node transitive OpenTelemetry packages.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Claude Agent SDK is TypeScript but OTel runs in the spawned Claude Code
process (TRACEPARENT env). Antigravity has no backend OTel, so wrapper
core spans plus AgentEvent mirroring cover OTLP until Python supports it.

Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
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