Skip to content
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

fix: improve error logs for evaluation failure #276

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

Kavindu-Dodan
Copy link
Contributor

This PR

Fixes #275

Consider the following log entry with detailed logs explaining the underlying issue by logging stacktrace,

image

@@ -137,7 +137,7 @@ private <T> FlagEvaluationDetails<T> evaluateFlag(FlagValueType type, String key
details = FlagEvaluationDetails.from(providerEval, key);
hookSupport.afterHooks(type, hookCtx, details, mergedHooks, hints);
} catch (Exception e) {
log.error("Unable to correctly evaluate flag with key {} due to exception {}", key, e.getMessage());
log.error("Unable to correctly evaluate flag with key '{}'", key, e);
Copy link
Member

@toddbaert toddbaert Feb 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This simple change will really help, I agree. The message before sometimes came out very confusing.

@toddbaert toddbaert changed the title chore: improve error logs for evaluation failure fix: improve error logs for evaluation failure Feb 3, 2023
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@toddbaert toddbaert merged commit 9349997 into open-feature:main Feb 3, 2023
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.

Improve error logs when flag evaluation failed
2 participants