Skip to content

fix: handle optional args in logfire.instrument - #1337

Merged
alexmojaki merged 2 commits into
pydantic:mainfrom
stevenh:fix/optional_args
Aug 27, 2025
Merged

alexmojaki merged 2 commits into
pydantic:mainfrom
stevenh:fix/optional_args

Conversation

@stevenh

@stevenh stevenh commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Allow optional arguments to be specified in both the msg_template and the extract_args parameter of the logfire.instrument decorator.

Fixes #1333

@codecov

codecov Bot commented Aug 20, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@stevenh
stevenh marked this pull request as ready for review August 22, 2025 16:29
Comment thread logfire/_internal/instrument.py Resolved
@stevenh
stevenh force-pushed the fix/optional_args branch from 44b7d2e to d4734a1 Compare August 27, 2025 18:30
Allow optional arguments to be specified in both the `msg_template`
and the `extract_args` parameter of the `logfire.instrument` decorator.

Fixes pydantic#1333
@stevenh
stevenh force-pushed the fix/optional_args branch from d4734a1 to 549d869 Compare August 27, 2025 18:32

@alexmojaki alexmojaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexmojaki
alexmojaki enabled auto-merge (squash) August 27, 2025 18:38
@alexmojaki
alexmojaki merged commit c95b662 into pydantic:main Aug 27, 2025
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.

Extracting optional args results in a warning

2 participants