Rules targeting users by attribute are not working
Everything works as expected when you target users individually, and users appear to be receiving the correct variation based on the default rule. So why aren't your rules targeting users by attribute working as expected?
The SDK will only evaluate flags using the user object you provide it. The SDK does not use the attributes shown on the dashboard, and user attributes are not synchronized across SDK instances. The only information that is synchronized is flag configuration related data. You will need to provide all applicable user attributes for your configured targeting rules to apply.
Java SDK: How do I use the SDK behind a HTTP/HTTPS proxy?
The following example shows how to configure your SDK to connect to LaunchDarkly through a HTTP/HTTPS proxy.
LDConfig config = new LDConfig.Builder() .proxyHost("https://PROXYURL") .proxyPort(8080) .proxyUsername("USERNAME") // OPTIONAL .proxyPassword("PASSWORD") // OPTIONAL
.build(); LDClient ldClient = new LDClient("YOUR_SDK_KEY", config);
Rest assured that this does not impact your user evaluations - your users will continue to receive the correct variation for the requested flags. This only impacts the ability to send information back to LaunchDarkly.
Does the LD SDK support using Postgres to cache feature flag configurations?
Not currently, though we have a store abstraction that you can extend with your own storage backend like Postgres. You can read more about what caches we support here: https://docs.launchdarkly.com/docs/using-a-persistent-feature-store
I am getting a JSON parsing exception with the Java client
Json parsing exception: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was….ExceptionType: com.google.gson.JsonSyntaxException
Make sure your build tool is bringing in the proper version of Gson. The LaunchDarkly SDK may have problems with versions earlier than 2.2.4. To enforce the proper version add this dependency:
I am getting SSL exceptions when calling variation() in the Java client
Make sure your build tool is bringing in the proper version of the Apache http client. The LaunchDarkly SDK may have problems with versions earlier than 3.3.6. To enforce the proper version add this dependency: