-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Replace OTel events with logs #3641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Docs Preview
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces the deprecated OpenTelemetry events SDK with the logs SDK. The changes update imports, class names, and method calls throughout the codebase to use LogRecord and LoggerProvider instead of Event and EventLoggerProvider.
Key changes:
- Replaced
opentelemetry._eventsimports withopentelemetry._logsequivalents - Updated
Eventreferences toLogRecordwithattributes={'event.name': ...}pattern - Changed parameter names from
event_logger_providertologger_provider
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/models/test_instrumented.py | Updated imports and test assertions to reflect LogRecord changes; severity_number now None instead of 9 |
| tests/models/test_fallback.py | Added logfire.exception.fingerprint to test expectations |
| pydantic_ai_slim/pydantic_ai/models/instrumented.py | Replaced Event with LogRecord, updated InstrumentationSettings to use Logger/LoggerProvider |
| pydantic_ai_slim/pydantic_ai/messages.py | Updated message parts to return LogRecord instead of Event with event.name in attributes |
| docs/logfire.md | Updated documentation references from EventLoggerProvider to LoggerProvider |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The events SDK has been deprecated.