Add comprehensive logging and tracing observability with OpenTelemetry#6
Draft
ryanhill4L wants to merge 1 commit intomainfrom
Draft
Add comprehensive logging and tracing observability with OpenTelemetry#6ryanhill4L wants to merge 1 commit intomainfrom
ryanhill4L wants to merge 1 commit intomainfrom
Conversation
… tracing - Introduce structured logging with configurable levels and formats - Integrate OpenTelemetry tracing with support for Jaeger, Zipkin, OTLP, and console exporters - Add context propagation for trace and request IDs - Enhance providers (OpenAI, Anthropic, Gemini) with detailed logging and tracing - Implement tracing spans for agent, provider, and tool operations - Add observability example with detailed README and Docker Compose setup - Update runner to include tracing and logging context - Provide environment variable configuration for observability features - Add new logging and tracing packages with console and structured loggers - Support graceful tracer shutdown and error handling This enables detailed monitoring, debugging, and performance analysis for the Agents SDK. Co-authored-by: terragon-labs[bot] <terragon-labs[bot]@users.noreply.github.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.
Summary
Changes
Observability Example
examples/observabilitydirectory with:main.go: Demonstrates logging, tracing, error handling, and environment variable configurationREADME.md: Detailed guide on observability features, setup, and best practicesdocker-compose.yml: Services for Jaeger, OTEL Collector, Prometheus, and Grafanaotel-collector-config.yamlandprometheus.yml: Configuration files for metrics and tracingLogging Enhancements
pkg/loggingpackage:Tracing Integration
pkg/tracingpackage:Provider Updates
Agent Runner
Basic Example Update
Module and Dependency Updates
Test plan
examples/observability/main.gowith different environment variable settingsThis PR significantly improves the observability capabilities of the Agents SDK, enabling developers to monitor, debug, and analyze agent behavior and provider interactions effectively.
🌿 Generated by Terry
ℹ️ Tag @terragon-labs to ask questions and address PR feedback
📎 Task: https://www.terragonlabs.com/task/53fedd2e-6d19-46e0-98c1-bccce25b1f85