Skip to content

Commit fa5617d

Browse files
nirgaclaude
andauthored
fix(openai-agents): switch to hook-based instrumentation (#3283)
Co-authored-by: Claude <[email protected]>
1 parent 50be41d commit fa5617d

26 files changed

+13167
-5520
lines changed

CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@ Store API keys only in environment variables/secure vaults; never in code or cas
6363
Typical record modes you may use: once, new_episodes, all, none (choose per test needs).
6464
Creating new cassettes requires valid API keys (OpenAI, Anthropic, etc.); ask the user to provide them if needed.
6565

66+
## Debugging with Console Span Exporter
67+
For debugging OpenTelemetry spans and hierarchy issues, use the console exporter:
68+
69+
```python
70+
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
71+
from traceloop.sdk import Traceloop
72+
73+
Traceloop.init(
74+
app_name="debug-app",
75+
exporter=ConsoleSpanExporter(),
76+
# other config...
77+
)
78+
```
79+
80+
This outputs all spans to console in JSON format, showing trace IDs, span IDs, parent relationships, and attributes for debugging span hierarchy issues.
81+
6682
## Semantic Conventions
6783
The semantic convention package follows the OpenTelemetry GenAI specification:
6884
https://opentelemetry.io/docs/specs/semconv/gen-ai/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

0 commit comments

Comments
 (0)