Skip to content

Conversation

@alexmojaki
Copy link
Contributor

The events SDK has been deprecated.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Docs Preview

commit: a01e90b
Preview URL: https://fc7ac29a-pydantic-ai-previews.pydantic.workers.dev

@alexmojaki alexmojaki requested a review from Copilot December 4, 2025 15:18
Copilot finished reviewing on behalf of alexmojaki December 4, 2025 15:19
Copy link
Contributor

Copilot AI left a 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._events imports with opentelemetry._logs equivalents
  • Updated Event references to LogRecord with attributes={'event.name': ...} pattern
  • Changed parameter names from event_logger_provider to logger_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants