-
Notifications
You must be signed in to change notification settings - Fork 523
fix: respect the user-provided log options regardless of tracing configuration #1317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1317 +/- ##
===========================================
+ Coverage 70.45% 70.60% +0.15%
===========================================
Files 161 161
Lines 16214 16302 +88
===========================================
+ Hits 11423 11510 +87
- Misses 4791 4792 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where tracing configuration was overriding user-provided logging options in the response object. The change ensures that when tracing is enabled, comprehensive logging occurs internally for tracing purposes, but the returned response respects the user's original log configuration preferences.
- Stores original user log options before tracing modifications
- Filters response log data to match user's original preferences
- Updates tests to verify new behavior across all logging option combinations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
nemoguardrails/rails/llm/llmrails.py | Adds logic to preserve original log options and filter response data accordingly |
tests/test_tracing.py | Updates existing tests and adds comprehensive parametrized test for all log option combinations |
@RobGeada Great job! Thank you very much for this PR, it looks good! I think this PR is in a good shape to include it for 0.16.0 release. A minor note; please make sure all your commits are gpg signed following contributing guidelines. |
cdd83ae
to
5268250
Compare
5268250
to
008e17e
Compare
Hi @Pouyanpi, thanks for the review- I've addressed the comment and have rebased the branch onto a signed commit. |
Description
Using tracing overrides all user-provided logging configuration. While this is necessary to generate detailed logs, it should not require returning that new log information back to the user if they did not request it. See #1316 for more detail.
Changes:
Related Issue(s)
Checklist