Logging/traceability - #149
Open
Prajna1999 wants to merge 7 commits into
Open
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…y' into logging/traceability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Target issue is #123 #124
Adds end-to-end traceability to run_guardrails: every call now records which validators ran, in what order, against which stage, and with what config and result — and every failure path finalizes the request log and leaves an error log line instead of dying silently or getting stuck at PROCESSING.
How: each request stores the payload it arrived with, and each validator run is written to the DB with its execution position, the stage it checked, its type and family, and the exact configuration it executed with — so a single request id reconstructs the whole run after the fact.
Passing validators are now logged by default (not just failures), errors along the way are caught, logged, and turned into normal failure responses rather than exceptions, and a DB hiccup while writing one trace row can't take down the response or the rest of the trace.
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.