Change log level to `warn` when experience continuity is enabled
Is your feature request related to a problem?
The current SDK (we're using the Go SDK) logs a message at the level of ERROR when a flag has experience continuity enabled. The log message looks like this:
posthog 2023/09/13 15:20:25 ERROR: Unable to compute flag locally - Flag has experience continuity enabled
Unless I'm reading the docs incorrectly, or misunderstanding the experience continuity feature, an actual error did not occur. Rather, the log statement is simply noting that flags are not being evaluated locally, but being evaluated by 1 or more calls to Posthog. Thus, depending on the number of flags defined, the application could experience performance issues.
Describe the solution you'd like
The problem with logging the above statement at the ERROR level is that it gives the false impression that some kind of error occurred. It'd be helpful to change this statement to be more accurate. Some options that I can think of:
- change the log level to
WARN - if this statement is indicative of an error condition being present, rephrase the message to include more specifics about the actual error
- add more context to the message to say something like, "...Flag has experience continuity enabled and may cause performance issues in flag evaluation"
Thanks for all the hard work you all put into Posthog!
makes a lot of sense, thanks @tim-golioth
Maybe related I'm getting lots of in my logs
Unable to compute flag locally (myflag) - Can't determine if feature flag is enabled or not with given properties
Not 100% sure this is an error, or just that it's making another api call to check the flag.
This particular feature flag has Release Conditions based on Person Properties. My backend doesn't know the person properties. So there's no way to do local evaluation.