Default OpenAI and Anthropic instrumentation to new version=2 - #2363
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 8 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughOpenAI and Anthropic instrumentation now default to semantic convention version 2. Version Merge Risk: ⚪ Minimal · up to OpenAI and Anthropic instrumentation now defaults to semantic-convention version 2 while retaining version 1 and dual emission. No material current-head merge-readiness risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
| ```python skip-run="true" skip-reason="migration configuration example" | ||
| import logfire | ||
|
|
||
| logfire.instrument_anthropic(version=[1, 2]) |
There was a problem hiding this comment.
| ```python skip-run="true" skip-reason="migration configuration example" | |
| import logfire | |
| logfire.instrument_anthropic(version=[1, 2]) | |
| ```python | |
| import logfire | |
| logfire.configure() | |
| logfire.instrument_anthropic(version=[1, 2]) |
There was a problem hiding this comment.
why are you still skipping running
|
|
||
| ### Keep legacy attributes during migration | ||
|
|
||
| Logfire uses instrumentation version 2 by default. If your queries or dashboards still depend |
There was a problem hiding this comment.
revert to the previous naming to match the types
version=2
Default OpenAI and Anthropic instrumentation to new `version=2` (pydantic#2363)
Summary
latesttelemetry behavior as version 2 and normalizelatestto it internallylogfire-apigenerated signature surfaceTests
uv run pytest tests/otel_integrations/test_openai.py tests/otel_integrations/test_anthropic.pyuv run pytest tests/test_docs.py::test_formatting