Repository navigation
Generic OpenTelemetry tracing: api-only instrumentor, GenAI attributes, LLM attempt spans - #324
Merged
Merged
Conversation
Co-Authored-By: Claude Code <noreply@anthropic.com>
Observability suite: 57 passed after updating imports. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Add typed tracing configuration, optional OpenInference attributes, privacy controls, payload truncation, suppression and error types. Focused observability regressions pass, including 12 assertion-failing negative controls. Changed-body complexity stays below 6; incomplete LCOV inventory measurements are tracked in SQ-145. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Replace tracer provider and config on re-instrumentation with a warning. Cover context isolation, plain-tracer parenting and provider replacement. Co-Authored-By: Claude Code <noreply@anthropic.com>
The lowest-versions job compiled only the observability extra, which no longer includes the OpenInference packages after the extras split, so test_tracing.py and test_opentelemetry_discovery.py failed at collection with ModuleNotFoundError: No module named 'openinference' (run 39577808157). Compile the phoenix extra too so those floors stay tested. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…eric-otel-tracing
Use model-visible tool names, collect descriptive attributes independently, filter absent values, cap error/schema text, map provider names and honor Atomic Agents visibility settings. Warn about unknown launcher options. Verified 112 observability tests, Pyright, Black and Flake8. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Keep tracing.py as the compatibility facade and move configuration, payloads, attributes, agent spans, tool spans, and installation into their own modules. Update test module references without changing assertions. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
… change SQ-149 made gen_ai.tool.name and the execute_tool span name use tool.tool_name (the input schema title), so the smoke script's lookup of "execute_tool SmokeTool" raised KeyError in run 39582225418. Look spans up by gen_ai.operation.name, assert the name against SmokeTool().tool_name and check the class under atomic_agents.tool.class. The extracted script passes locally with OpenInference keys forced off. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Exercise retry parentage, shared-client isolation and stream cleanup. Co-Authored-By: Claude Code <noreply@anthropic.com>
Both style checks pass for the hook module. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Phoenix becomes one backend section. Adds a backends list, attribute tables (GenAI, atomic_agents, optional OpenInference), LLM attempt spans, naming and conversations, privacy and size, and re-instrumentation. README gets an Observability section and the phoenix example README an install line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Defer run annotations to allow direct attempt-module imports. Remove unused method names from wrapper factories. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Add ATOMIC_AGENTS_TRACE_LLM_SPANS and use it in the Phoenix example instead of replacing the instrumentor configuration. Cover false, mixed-case false, zero and enabled defaults. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
Exercise retry exhaustion, Responses usage, validation attempt status, and bounded traceback payloads through offline Instructor transports. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
…limits Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Keep provider-default resolution at the installation boundary. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
…eric-otel-tracing
The observability package is now plain OpenTelemetry with GenAI attributes primary and OpenInference optional, split into nine modules, with the observability/phoenix extras, TracingConfig, using_conversation, AgentConfig.name, LLM attempt spans and the ATOMIC_AGENTS_TRACE_* variables. Eight map documents and the state manifest updated; CLAUDE.md untouched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Eigenwise
marked this pull request as ready for review
October 21, 2026 11:26
Keep cancelled tools unset, inherit environment settings with visibility configs, and exercise conversation attributes in the API-only smoke. Document the installed Instructor retry logger's privacy limits. Co-Authored-By: Claude Code <noreply@anthropic.com>
…eric-otel-tracing
This was referenced Oct 21, 2026
Merged
Eigenwise
added a commit
that referenced
this pull request
Oct 21, 2026
Bump the package and lockfile root version to 2.15.0, add the release notes for the generic OpenTelemetry tracing shipped in #324, and update the codebase map's package version. No production function bodies change. Co-authored-by: Kenny Vaneetvelde <kenny@eigenwise.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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
Tracing no longer depends on Phoenix or the OpenInference packages.
AtomicAgentsInstrumentorruns onopentelemetry-apialone and emits OpenTelemetry GenAI semantic-convention spans that any backend reads: a plain OTLP collector, Grafana Tempo, Sentry, Datadog, Honeycomb, PostHog, Jaeger, Arize Phoenix, Langfuse.invoke_agent {name}(AGENT),execute_tool {tool_name}(TOOL) and onechat {model}CLIENT span per Instructor attempt, driven by Instructor hooks: per-attempt and total usage (input, output, cached, reasoning tokens) for both chat-completion and Responses shapes,gen_ai.response.model, attempt count, validation errors as events,error.typeon failures. Spans always attach to the current context.gen_ai.*primary;atomic_agents.*for framework detail; OpenInference keys only whenopeninference-instrumentationis importable (newphoenixextra) orTracingConfig(openinference_attributes=True).TracingConfig(hide_inputs, hide_outputs, max_attribute_length=4096, openinference_attributes, llm_spans); envATOMIC_AGENTS_TRACE_HIDE_INPUTS/_OUTPUTS(fallbackOPENINFERENCE_HIDE_*),ATOMIC_AGENTS_TRACE_MAX_ATTRIBUTE_LENGTH,ATOMIC_AGENTS_TRACE_LLM_SPANS. Hide wins over truncation and is applied before serialization; underhide_outputsevery exception is reduced to<Type>: <N> attempts (__REDACTED__).AgentConfig(name=...)for stable span names;using_conversation(conversation_id)setsgen_ai.conversation.id; a secondinstrument()with different explicit values replaces in place with a WARNING,Nonekeeps the installed value;AtomicAgent.clear_hooks()removes only its own handlers; cancellation is recorded asatomic_agents.cancelled, never ERROR.atomic-agents[observability]is nowopentelemetry-apionly;atomic-agents[phoenix]adds the OpenInference packages. Phoenix users onregister(auto_instrument=True)keep working; setATOMIC_AGENTS_TRACE_LLM_SPANS=falsewhen a provider instrumentor also emits LLM spans.observability/split intotracing_config,span_payloads,span_attributes,agent_spans,tool_spans,installation,llm_attempt_spans, withtracing.pyas a thin facade.phoenixextra.Design reviewed and probed by the Contractify consumer (Ada general chat instrumentation, Sentry and Grafana Tempo targets): verdict adoptable on
d1c1bc8, 59 of 60 checks passing with real Instructor 1.17 + openai 2.53 and no OpenInference installed. Two should-fix items from that run (tool cancellation status,TraceConfigpath honoring the env switch) land in the last commit before merge.Verification
httpx.MockTransportacross TOOLS, JSON, JSON_SCHEMA and RESPONSES_TOOLS, a two-thread registration race, suppression, redaction on retry exhaustion.[observability]+opentelemetry-sdk, provesopeninferenceis absent, runs a real Instructor client over a mock transport and asserts GenAI keys and no OpenInference keys; lowest-versions job compiles both extras.🤖 Generated with Claude Code