feat: Add OpenTelemetry Spans Across Server, LLM, and Tool - #16
Open
ThomasHartDev wants to merge 2 commits into
Open
feat: Add OpenTelemetry Spans Across Server, LLM, and Tool#16ThomasHartDev wants to merge 2 commits into
ThomasHartDev wants to merge 2 commits into
Conversation
Real TracerProvider with parent/child spans across agent.turn → agent.llm → agent.tool. OTLP HTTP export stays off unless OTEL_EXPORTER_OTLP_ENDPOINT is set so local and CI stay quiet.
Pin sdk-trace-base/node/resources to 2.0.1 with exporter 0.203.0 so only one sdk-trace-base is installed. Call trace.disable() and context.disable() on shutdown so a second initTracing registers a live provider. Tighten the no-tool hierarchy test and cover re-init plus otlpEnabled when an endpoint is set.
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.
Adds @agent/telemetry with process-wide TracerProvider, parent/child agent.turn → agent.llm/agent.tool spans via withAgentTurn + SpanTelemetry, and env-gated OTLP HTTP export. Server wires default SpanTelemetry and turn wrapping. OTel packages are pinned to one release train (sdk-trace-base/node/resources 2.0.1 + exporter 0.203.0). Shutdown clears the global provider/context so re-init works in-process.