Affected: All SDKs
Overview
LaunchDarkly processes and retains aggregated metrics of all SDK events received, but the context information associated with the evaluation is disposed of. For example, the Evaluations menu at the flag level records the count of evaluations per variation, but to see the context feature event data you would require the Data Export feature.
Solution
Data Export is available as an add-on. LaunchDarkly currently supports the following output destinations for the event data:
- Amazon Kinesis
- Azure Event Hubs
- Google Cloud Pub/Sub
- mParticle
- Segment
- Snowflake
You must configure the output destination data by following the documentation linked above. Once configured, if your SDK is sending events (enabled by default), they will automatically be sent to the output destination.
Example exported feature event:
{"project":"62fxxxxxxxxxxxxxx","environment":"62fxxxxxxxxxxxx","event":{"kind":"feature","id":"63843c40xxxxxxxxxxxx","userKey":"{USER-KEY}","creationDate":1669610559830,"key":"{FLAG-KEY}","value":"{VARIATION-VALUE}","default":false,"version":3,"variation":1,"variationName":"{NAME-OF-VARIATION}","reason":{"kind":"RULE_MATCH","ruleIndex":0,"ruleId":"d5b69278-8b6e-XXXX-XXXXXXXXXXX"}},"version":1}
Example feature event schema for Data Export:
// this example is from Data Export event schema version 2
{
"kind": "feature",
"creationDate": 1462220944000,
"contextKeys": {
"user": "context-key-123abc"
},
"context": {
"key": "context-key-123abc",
"kind": "user",
"name": "Sandy"
},
"key": "flag-key",
"value": ["evaluation", "result"],
"default": null,
"version": 1,
"variation": 0,
"prereqOf": "upstream-key",
"reason": {
"kind": "RULE_MATCH",
"ruleIndex": 0,
"ruleId": "id",
"inExperiment": true,
"bigSegmentsStatus": "HEALTHY"
},
"samplingRatio": 10
}
Note: The feature event format schema can vary depending on the output destination.