File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { TelemetryFlagMetadata } from './flag-metadata';
8
8
type EvaluationEvent = {
9
9
name : string ;
10
10
attributes : Record < string , string | number | boolean > ;
11
- data : Record < string , JsonValue > ;
11
+ body : Record < string , JsonValue > ;
12
12
} ;
13
13
14
14
const FLAG_EVALUATION_EVENT_NAME = 'feature_flag.evaluation' ;
@@ -28,12 +28,12 @@ export function createEvaluationEvent(
28
28
[ TelemetryAttribute . PROVIDER ] : hookContext . providerMetadata . name ,
29
29
[ TelemetryAttribute . REASON ] : ( evaluationDetails . reason ?? StandardResolutionReasons . UNKNOWN ) . toLowerCase ( ) ,
30
30
} ;
31
- const data : EvaluationEvent [ 'data ' ] = { } ;
31
+ const body : EvaluationEvent [ 'body ' ] = { } ;
32
32
33
33
if ( evaluationDetails . variant ) {
34
34
attributes [ TelemetryAttribute . VARIANT ] = evaluationDetails . variant ;
35
35
} else {
36
- data [ TelemetryEvaluationData . VALUE ] = evaluationDetails . value ;
36
+ body [ TelemetryEvaluationData . VALUE ] = evaluationDetails . value ;
37
37
}
38
38
39
39
const contextId =
@@ -62,6 +62,6 @@ export function createEvaluationEvent(
62
62
return {
63
63
name : FLAG_EVALUATION_EVENT_NAME ,
64
64
attributes,
65
- data ,
65
+ body ,
66
66
} ;
67
67
}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ describe('evaluationEvent', () => {
44
44
[ TelemetryAttribute . REASON ] : StandardResolutionReasons . STATIC . toLowerCase ( ) ,
45
45
[ TelemetryAttribute . CONTEXT_ID ] : 'test-target' ,
46
46
} ) ;
47
- expect ( result . data ) . toEqual ( {
47
+ expect ( result . body ) . toEqual ( {
48
48
[ TelemetryEvaluationData . VALUE ] : true ,
49
49
} ) ;
50
50
} ) ;
You can’t perform that action at this time.
0 commit comments