PostHog / posthog

đŸ¦” PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.68k stars 1.3k forks source link

Change log level to `warn` when experience continuity is enabled #17420

Open tim-golioth opened 1 year ago

tim-golioth commented 1 year ago

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:

Thanks for all the hard work you all put into Posthog!

neilkakkar commented 1 year ago

makes a lot of sense, thanks @tim-golioth