Skip to content

Support kwargs in ProxyLogger emit()#1561

Merged
alexmojaki merged 6 commits into
pydantic:mainfrom
qianl15:qian/fix-proxylogger
Dec 4, 2025
Merged

Support kwargs in ProxyLogger emit()#1561
alexmojaki merged 6 commits into
pydantic:mainfrom
qianl15:qian/fix-proxylogger

Conversation

@qianl15
Copy link
Copy Markdown
Contributor

@qianl15 qianl15 commented Dec 4, 2025

This PR fixes an issue where logger.emit() throws TypeError: ProxyLogger.emit() got an unexpected keyword argument 'timestamp' when it uses the new interface from OpenTelemetry 1.38.0. The related breaking change is from open-telemetry/opentelemetry-python#4737

The fix is to add an overload for the emit() function to accept kwargs as well as LogRecord.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alexmojaki alexmojaki enabled auto-merge (squash) December 4, 2025 15:42
@alexmojaki
Copy link
Copy Markdown
Collaborator

Thanks!

@alexmojaki alexmojaki merged commit 9874779 into pydantic:main Dec 4, 2025
12 checks passed
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