-
Notifications
You must be signed in to change notification settings - Fork 55
Log "unknown feature flag" as a warning instead of info #165
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
@eli-darkly @bwoskow-ld Just wanted to make sure this doesn't get lost. I'm looking forward to hearing your thoughts! Thanks! |
Hi - sorry for the delay, we received a bunch of SDK-related issues and have been working through them slowly. There are a few issues here. One is what log levels are most appropriate for what conditions. We try to apply that decision across all SDKs for consistency rather than on a per-SDK basis, so if we were going to change this it would not be only for the Ruby SDK. We also have to be very careful about making such changes in general, because even though the logging behavior is not technically an API that has to be kept consistent by semantic versioning rules, changing it can have significant impact on existing customers depending on how they've set up their monitoring. So when you say "those logs really make more sense as a warning (if not an error)"— we would definitely not want to change the level to Whether |
No worries! Thanks for your response. I see what you're getting at. Though, looking at the Go SDK, it seems like it logs at the I do understand why you might want to avoid lots of If the consensus on your side is to keep this an |
Yes, this is one area where the Go SDK is currently inconsistent with the other server-side SDKs. By default it does not log anything at all for evaluation errors, because applications can detect those by looking at the error return value from the Variation call— in other languages there's no such thing as an error return value, they would have to throw an exception which is much more disruptive. The
What is |
Sorry, I accidentally copied an internal method... 😅 Is that what you'd recommend? |
Yes, |
Ok, it sounds like at least for now, we should go that route. Feel free to close this PR. Thank you! |
…-builder Test data flag builder
Requirements
Related issues
We've been running LaunchDarkly logs with the
info
log level in all environments, so we can capture instances of "unknown feature flag" logs. The annoyance of working around the async event logs in our Rails console has reached the point that we'd really like to swap to thewarning
log level. However, that would mean we would not see instances of "unknown feature flag" logs. To us, those logs really make more sense as a warning (if not an error), thus, I'd like to propose changing it towarn
.I also noticed a few logs that are missing the
[LDClient]
prefix, so I added that. (I'm sure there are more missing.)Describe the solution you've provided
Log "unknown feature flag" as a warning instead of info.
Describe alternatives you've considered
An alternative would be to use
get_flag_state_relaxed
, and handle our own default fallback, but that does not seem ideal for this sort of thing.Additional context