Skip to content

Record input_data on logs produced by logfire.instrument_pydantic(record='failure') - #2352

Merged
alexmojaki merged 3 commits into
mainfrom
alex/pydantic-input-data
Sep 4, 2026
Merged

Record input_data on logs produced by logfire.instrument_pydantic(record='failure')#2352
alexmojaki merged 3 commits into
mainfrom
alex/pydantic-input-data

Conversation

@alexmojaki

Copy link
Copy Markdown
Contributor

No description provided.

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 potential issue.

Devin Review

Comment thread logfire/integrations/pydantic.py
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 4d71b79b-7eff-48b1-9f5b-15385345bfe8

📥 Commits

Reviewing files that changed from the base of the PR and between ccdd7f4 and d8ca816.

📒 Files selected for processing (2)
  • logfire/integrations/pydantic.py
  • tests/test_pydantic_plugin.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • pydantic/logfire (manual)
  • pydantic/pydantic-ai (manual)

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Failure-only Pydantic validation logging now passes the original input_data to validation-error and unexpected-exception log helpers. Both helpers record the input in emitted attributes. Plugin snapshots now verify the input data and its JSON schema metadata across validation failures, dataclass failures, exceptions, and environment-variable failures.

Merge Risk: ⚪ Minimal · up to d8ca8

Failure-only Pydantic validation logs now include the original input data for validation errors and unexpected exceptions. The covered failure paths preserve existing behavior, with no current merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so its relevance to the changeset cannot be assessed. Add a short description stating that failure-only Pydantic logs now include input_data for validation errors and unexpected exceptions, and that the related snapshots were updated.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: recording input_data on failure logs from instrumented Pydantic validation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alex/pydantic-input-data

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread tests/test_pydantic_plugin.py Outdated
Comment thread logfire/integrations/pydantic.py
Comment thread logfire/integrations/pydantic.py
@alexmojaki
alexmojaki added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 17ae1ca Sep 4, 2026
20 checks passed
@alexmojaki
alexmojaki deleted the alex/pydantic-input-data branch September 4, 2026 10:16
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.

1 participant