Repository navigation
feat(otel): Phases 1–5 + Phoenix BYOK cookout (mock Ollama) - #51
Closed
shashikanth-gs wants to merge 10 commits into
Closed
shashikanth-gs wants to merge 10 commits into
shashikanth-gs wants to merge 10 commits into
Conversation
Add optional peer @opentelemetry/api and core hooks so createA2AServer wraps executors with a2a.task.* spans. Hosts register TracerProvider / OTLP exporters; without them instrumentation is a no-op. Align factory A2AExecutor with executor/types so instrumentExecutor typechecks. Ship OSS docs/observability.md (not research notes). Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Hook E applies task usage to a2a.task.execute as a2a.task.usage.* always, and gen_ai.usage.* only when backend OTel is off — so Copilot/Claude/Codex LLM spans do not double-count with the parent in Tempo SUMs. Also adds createExecutionObservability (Hook B), session span attrs, injectW3cTraceHeaders, wires Copilot/Antigravity, migrates all wrappers, and documents the anti-dupe rules. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Default model is ~99% one a2a.task.execute per inbound request — not a multi-span factory. When the orchestrator calls again (resume/retry), still one new span with the same conversation/task ids plus a2a.task.invocation(_kind) and a2a.message.id for platform joins. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Wire Copilot telemetry + onGetTraceContext, Claude subprocess OTel/TRACEPARENT, and Codex otel configOverrides via core helpers. Activate real OTel context in withSpan so parent-link works. Document OpenCode/Antigravity limits. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
createCli dynamically bootstraps NodeSDK when otel.exporter.endpoint is set (optional peers). Continue/retry invocations get span links. Ship examples/otel-stack (Jaeger OTLP) and fix withSpan not to re-run on errors. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Document who owns which attrs vs draft GenAI A2A #254. Stamp gen_ai.operation.name, session.id, a2a.method.name, and a2a.gateway.* from orchestrator metadata. Claude/Codex now apply per-request usage rollups. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Drop the Jaeger-required compose stack for a lightweight Arize Phoenix demo (pip/uv; optional Docker). CLI bootstrap defaults to OTLP protobuf (`exporter-trace-otlp-proto`) so Phoenix ingest works. Stamp a2a.wrapper.core.version plus a2a.wrapper.sdk / .sdk.version on task spans and wire every wrapper server with its package identity. Add otel.taskUsageRollup (default on) and otel.annotateUsageCalls (default off; Claude/Codex call applyUsageCallToActiveSpan). Verified live against phoenix serve in this environment. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
Add examples/otel-stack/smoke-providers.mjs that drives a2a-copilot and a2a-claude executors under instrumentExecutor against a live Phoenix collector. Backends are faked (this environment has no Copilot policy access / Claude login); wrapper spans still show sdk identity + usage. 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>
Add a fake Ollama (OpenAI Responses + Anthropic Messages) and cookout-byok that boots real a2a-copilot / a2a-claude CLIs against it into Phoenix — no cloud keys or GPU. Wire bootstrapOtelSdkFromConfig into all hand-rolled wrapper CLIs (they were skipping SDK start) and use SimpleSpanProcessor for reliable short-lived export. Co-authored-by: Shashi Kanth G S <shashikanth-gs@users.noreply.github.com>
shashikanth-gs
marked this pull request as ready for review
October 10, 2026 19:52
6 tasks done
|
Superseded by #52 on branch |
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.
What and why
Optional OpenTelemetry for
a2a-*with a realistic local cookout: fake Ollama BYOK → real Copilot/Claude CLIs → Phoenix. No cloud keys, no GPU, no Jaeger requirement.Phases
Verified in agent env
wireApi: responses)POST /v1/responsesa2a.wrapper.sdk=a2a-copilot, usage 12/5ANTHROPIC_BASE_URLPOST /v1/messagesa2a.wrapper.sdk=a2a-claude, usage 12/5Also fixed: hand-rolled wrapper CLIs were not calling
bootstrapOtelSdkFromConfig(only the unusedcreateCliscaffold did). All five CLIs now bootstrap + flush OTel. CLI bootstrap usesSimpleSpanProcessor+ protobuf exporter (Phoenix rejects JSON with 415).Why mock Ollama (agree with review)
copilot.provider.baseUrl)ANTHROPIC_BASE_URL)message/sendPackage identity
a2a.wrapper.core.version+a2a.wrapper.sdk/.sdk.versionon every task span.Checklist
examples/otel-stack)