Contexts not appearing in LD Dashboard without explicit identify call since 2024-03-06
czende opened this issue · 2 comments
Is this a support request?
No.
Describe the bug
I have been using the official LaunchDarkly PHP SDK snippet provided by LD when setting up an account for several years on several environments without issues. The evaluation of feature flags works fine. However, since March 6, 2024, the user key context does not appear in the LaunchDarkly UI anymore. All user keys disappeared since default 30 days period was reached.
To reproduce
<?php
require 'vendor/autoload.php';
# Create a new LDClient with your environment-specific SDK key:
$client = new LaunchDarkly\LDClient('sdk-xxxxxxxxxxxxxxxxxx');
# Set up the evaluation context. This context should appear on your LaunchDarkly
# contexts dashboard soon after you run the demo.
$context = LaunchDarkly\LDContext::builder("example-user-key")
->name("Sandy")
->build();
$flagValue = $client->variation("test-ff-ld", $context, false);
$flagValueStr = $flagValue ? 'true' : 'false';
echo "*** Feature flag 'test-ff-ld' is {$flagValueStr} for this context\n\n";
Expected behavior
The expected behavior is that once a user context is created (or FF is evaluated for this user) and identified to LaunchDarkly, it should be visible in the LaunchDarkly dashboard.
SDK version
3.6/5/6.1
Language version, developer tools
PHP 5.6/7.4/8.3
OS/platform
Ubuntu 18-22, MacOS, multiple Docker environments, LD Relay as well.
Additional context
I figured out workaround that explicitly calling the $client->identify($context); method after setting up the context but before evaluating the flag value properly send user key and it is available in LD dashboard. But SDK documentation and even SDK code above identify() method says "The variation call automatically creates contexts on the Contexts list for you, using the context you pass to each variation call.". All our user keys on all environments were last seen on March 6. But we did not make any changes on our end. I believe it is related to incident reported on status.launchdarkly.com on March 11 that mentioned that something happened on March 6.
@czende thank you for raising this issue and my apologies for the problems this has caused! We have made some changes to our event ingestion service which I am told should resolve this issue for you.
Can you please confirm whether or not you are still experiencing this problem?
Thank you @keelerm84 the issue has been resolved. It's surprising that this went unnoticed for over a month 🤔