Skip to content

Commit a7d05c7

Browse files
authored
include missing fields in eppo assignment logger event (#239)
1 parent 9dfebeb commit a7d05c7

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eppo/js-client-sdk-common",
3-
"version": "4.13.2",
3+
"version": "4.13.3",
44
"description": "Common library for Eppo JavaScript SDKs (web, react native, and node)",
55
"main": "dist/index.js",
66
"files": [

src/eppo-assignment-logger.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ describe('EppoAssignmentLogger', () => {
4646
subject: 'user-123',
4747
experiment: 'experiment-abc',
4848
variation: 'variation-1',
49+
allocation: 'allocation-1',
50+
feature_flag: 'feature-flag-1',
4951
entity_id: 456,
5052
holdout: 'holdout-xyz',
5153
holdout_variation: 'holdout-variant-1',
@@ -76,6 +78,8 @@ describe('EppoAssignmentLogger', () => {
7678
subject: 'user-123',
7779
experiment: 'experiment-abc',
7880
variation: 'variation-1',
81+
allocation: 'allocation-1',
82+
feature_flag: 'feature-flag-1',
7983
entity_id: 789,
8084
holdout: undefined,
8185
holdout_variation: undefined,

src/eppo-assignment-logger.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ export class EppoAssignmentLogger implements IAssignmentLogger {
1111
logAssignment(event: IAssignmentEvent): void {
1212
const {
1313
entityId: entity_id,
14+
featureFlag: feature_flag,
1415
experiment,
16+
allocation,
1517
// holdout and holdout_variant come from `extraLogging` in FlagEvaluation
1618
holdoutKey: holdout,
1719
holdoutVariation: holdout_variation,
@@ -27,6 +29,8 @@ export class EppoAssignmentLogger implements IAssignmentLogger {
2729
const payload = {
2830
entity_id,
2931
experiment,
32+
feature_flag,
33+
allocation,
3034
holdout_variation,
3135
holdout,
3236
subject,

0 commit comments

Comments
 (0)