Skip to content

Conversation

@alexmojaki
Copy link
Contributor

@alexmojaki alexmojaki commented Oct 9, 2025

This way our docs and signatures can reflect the latest parameters while remaining backward and forward compatible.

@alexmojaki alexmojaki changed the title Update logfire.instrument_pydantic_ai() arguments Update logfire.instrument_pydantic_ai() parameters Oct 9, 2025
@alexmojaki alexmojaki requested a review from Copilot October 9, 2025 13:41
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

Updates the logfire.instrument_pydantic_ai() function to include additional parameters for better control over Pydantic AI instrumentation while maintaining backward and forward compatibility.

  • Added new parameters: include_content, version, and made event_mode optional
  • Reordered parameter definitions and improved documentation with detailed explanations
  • Enhanced parameter handling using introspection to support different Pydantic AI versions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
logfire/_internal/main.py Updated function signatures and documentation for the new parameters
logfire/_internal/integrations/pydantic_ai.py Refactored parameter handling with introspection-based compatibility
tests/otel_integrations/test_pydantic_ai.py Added comprehensive test for all new parameters

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@alexmojaki alexmojaki requested a review from Kludex October 9, 2025 13:44
@alexmojaki alexmojaki merged commit 5bb4bbc into main Oct 9, 2025
14 checks passed
@alexmojaki alexmojaki deleted the alex/pydai-args branch October 9, 2025 17:19
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.

3 participants