Skip to content

Releases: launchdarkly/go-server-sdk

4.12.0

12 Sep 21:50

Choose a tag to compare

[4.12.0] - 2019-09-12

Added:

  • The Go SDK now has log levels, similar to the logging frameworks used in the other LaunchDarkly SDKs. Log messages can have a level of Debug, Info, Warn, or Error; by default, Debug is hidden. The new package ldlog defines these levels, and you can use Config.Loggers.SetMinLevel() and Config.Loggers.SetBaseLogger() to control the behavior. The old property Config.Logger still works but is deprecated.
  • The SDK will produce very detailed output if you call Config.Loggers.SetMinLevel(ldlog.Debug). This includes information about when and how it connects to LaunchDarkly, and a full dump of all analytics event data it is sending. Since the debug logging is very verbose, and the event data includes user properties, you should not normally enable this log level in production unless advised to by LaunchDarkly support.
  • There is now a different property for specifying a feature store mechanism: Config.FeatureStoreFactory, which takes a factory method, rather than Config.FeatureStore, which takes an implementation instance. Using a factory method allows the implementation to access Config properties such as the logging configuration. The new methods NewInMemoryFeatureStoreFactory, redis.NewRedisFeatureStoreFactory, consul.NewConsulFeatureStoreFactory, and dynamodb.NewDynamoDBFeatureStoreFactory work with this mechanism.
  • The SDK's CI build now verifies compatibility with Go 1.11 and 1.12.

Deprecated:

  • Config.SamplingInterval: the intended use case for the SamplingInterval feature was to reduce analytics event network usage in high-traffic applications. This feature is being deprecated in favor of summary counters, which are meant to track all events.
  • Config.Logger: use Config.Loggers for more flexible configuration.
  • NewInMemoryFeatureStore, redis.NewRedisFeatureStoreWithDefault, consul.NewConsulFeaturStore, dynamodb.NewDynamoDBFeatureStore: see above.

4.11.0

20 Aug 01:38

Choose a tag to compare

[4.11.0] - 2019-08-19

Added:

  • Added support for upcoming LaunchDarkly experimentation features. See LDClient.TrackWithMetric.

4.10.0

31 Jul 02:44

Choose a tag to compare

[4.10.0] - 2019-07-30

Added:

  • In the redis subpackage, the new option DialOptions allows configuration of any connection option supported by Redigo, such as setting a password or enabling TLS. (Thanks, D-Raiser!) Note that it was already possible to specify a password or TLS as part of the Redis URL.
  • The new Config property LogUserKeyInErrors, if set to true, causes error log messages that are related to a specific user to include that user's key. This is false by default since user keys could be considered privileged information.

Changed:

  • If an error occurs during JSON serialization of user data in analytics events, previously all of the events that were going to be sent to LaunchDarkly at that point would be lost. Such an error could occur if a) the user's map of custom attributes was being modified by another goroutine, causing a concurrent modification panic, or b) a custom attribute value had a custom JSON marshaller that returned an error or caused a panic. The new behavior in these cases is that the SDK will log an error ("An error occurred while processing custom attributes ... the custom attributes for this user have been dropped from analytics data") and continue sending all of the event data except for the custom attributes for that user.

4.9.0

23 Jul 22:57

Choose a tag to compare

[4.9.0] - 2019-07-23

Added:

  • The new Config property LogEvaluationErrors, if set to true, causes the client to output a WARN: log message whenever a flag cannot be evaluated because the flag does not exist, the user key was not specified, or the flag rules are invalid. The error message is the same as the message in the error object returned by the evaluation method. This may be useful in debugging if you are unexpectedly seeing default values instead of real values for a flag. Most of the other LaunchDarkly SDKs already log these messages by default, but since the Go SDK historically did not, this has been made an opt-in feature. It may be changed to be true by default in the next major version.
  • The new ldhttp package provides helper functions for setting custom HTTPS transport options, such as adding a root CA.
  • The new ldntlm package provides the ability to connect through a proxy server that uses NTLM authentication.

Fixed:

  • The SDK was not respecting the standard proxy server environment variable behavior (HTTPS_PROXY) that is normally provided by http.ProxyFromEnvironment. (Thanks, mightyguava!)
  • Under conditions where analytics events are being generated at an extremely high rate (for instance, if an application is evaluating a flag repeatedly in a tight loop on many goroutines), a thread could be blocked indefinitely within the Variation methods while waiting for the internal event processing logic to catch up with the backlog. The logic has been changed to drop events if necessary so application code will not be blocked (similar to how the SDK already drops events if the size of the event buffer is exceeded). If that happens, this warning message will be logged once: "Events are being produced faster than they can be processed; some events will be dropped". Under normal conditions this should never happen; this change is meant to avoid a concurrency bottleneck in applications that are already so busy that goroutine starvation is likely.

4.8.2

02 Jul 22:02

Choose a tag to compare

[4.8.2] - 2019-07-02

Added:

  • Logging a message when failing to establish a streaming connection.

4.8.1

13 Jun 01:04

Choose a tag to compare

[4.8.1] - 2019-06-12

Fixed:

  • A bug introduced in the 4.8.0 release was causing stream connections to restart frequently. (#3)

4.8.0

11 Jun 20:24

Choose a tag to compare

[4.8.0] - 2019-06-11

Added:

  • The HTTPClientFactory property in Config allows you to customize the HTTP client instances used by the SDK. This could be used, for instance, to support a type of proxy behavior that is not built into the Go standard library, or for compatibility with frameworks such as Google App Engine that require special networking configuration.

Fixed:

  • When using a custom attribute for rollout bucketing, the SDK now treats numeric values the same regardless of whether they are stored as int or float64, as long as the actual value is an integer. This is necessary to ensure consistent behavior because of the default behavior of JSON encoding in Go, which causes all numbers to become float64 if they have been marshaled to JSON and then unmarshaled. As described in the documentation for this feature, any floating-point value that has a fractional component is still disallowed.

4.7.4

06 May 16:08

Choose a tag to compare

[4.7.4] - 2019-05-06

Fixed:

  • Version in ldclient.go is now correctly reported as 4.7.4.

4.7.3

29 Apr 22:07
a71cb05

Choose a tag to compare

[4.7.3] - 2019-04-29

Changed:

  • Import paths in subpackages and tests have been changed from gopkg.in/launchdarkly/go-client.v4 to gopkg.in/launchdarkly/go-server-sdk.v4. Users of this SDK should update their import paths accordingly.
  • This is the first release from the new launchdarkly/go-server-sdk repository.