fix: changed log level of provider state change transition messages to debug#1987
fix: changed log level of provider state change transition messages to debug#1987jarebudev wants to merge 4 commits into
Conversation
Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesProvider state logging
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1987 +/- ##
============================================
+ Coverage 92.31% 92.87% +0.55%
- Complexity 706 712 +6
============================================
Files 60 60
Lines 1705 1712 +7
Branches 195 197 +2
============================================
+ Hits 1574 1590 +16
+ Misses 82 74 -8
+ Partials 49 48 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| providerName = delegate.getMetadata().getName(); | ||
| } | ||
| log.info("Provider {} transitioned from state {} to state {}", providerName, oldState, state); | ||
| log.debug("Provider {} transitioned from state {} to state {}", providerName, oldState, state); |
There was a problem hiding this comment.
Should we have a higher log level when we transition into and out of the error state?
There was a problem hiding this comment.
Yes I think it's reasonable to log transitions into ERROR and FATAL states at warn/error, and going from ERROR to READY at info. Everything else at debug?
That should reduce the amount of logging noise from every state change being at info, but still having visibility of the more important provider event transitions.
There was a problem hiding this comment.
I agree with this. I'm fine with debug for all state changes that do not involve ERROR.
Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java`:
- Around line 77-88: Update logProviderStateTransition to base severity on both
oldState and newState: log FATAL transitions at least at ERROR level, keep
ERROR-level transitions at ERROR, and log recoveries from ERROR or FATAL to a
non-failure state at INFO so they remain visible. Preserve DEBUG logging for
ordinary transitions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 91f9e087-2b8d-49a0-8a46-745e2c2f61f8
📒 Files selected for processing (1)
src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java
…e for logging level of state transition message Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com>
Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com>
|



This PR
Changes the logging level of provider state change transition messages from info to debug to reduce logging noise.
Related Issues
Fixes #1986