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';
88type EvaluationEvent = {
99 name : string ;
1010 attributes : Record < string , string | number | boolean > ;
11- data : Record < string , JsonValue > ;
11+ body : Record < string , JsonValue > ;
1212} ;
1313
1414const FLAG_EVALUATION_EVENT_NAME = 'feature_flag.evaluation' ;
@@ -28,12 +28,12 @@ export function createEvaluationEvent(
2828 [ TelemetryAttribute . PROVIDER ] : hookContext . providerMetadata . name ,
2929 [ TelemetryAttribute . REASON ] : ( evaluationDetails . reason ?? StandardResolutionReasons . UNKNOWN ) . toLowerCase ( ) ,
3030 } ;
31- const data : EvaluationEvent [ 'data ' ] = { } ;
31+ const body : EvaluationEvent [ 'body ' ] = { } ;
3232
3333 if ( evaluationDetails . variant ) {
3434 attributes [ TelemetryAttribute . VARIANT ] = evaluationDetails . variant ;
3535 } else {
36- data [ TelemetryEvaluationData . VALUE ] = evaluationDetails . value ;
36+ body [ TelemetryEvaluationData . VALUE ] = evaluationDetails . value ;
3737 }
3838
3939 const contextId =
@@ -62,6 +62,6 @@ export function createEvaluationEvent(
6262 return {
6363 name : FLAG_EVALUATION_EVENT_NAME ,
6464 attributes,
65- data ,
65+ body ,
6666 } ;
6767}
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ describe('evaluationEvent', () => {
4444 [ TelemetryAttribute . REASON ] : StandardResolutionReasons . STATIC . toLowerCase ( ) ,
4545 [ TelemetryAttribute . CONTEXT_ID ] : 'test-target' ,
4646 } ) ;
47- expect ( result . data ) . toEqual ( {
47+ expect ( result . body ) . toEqual ( {
4848 [ TelemetryEvaluationData . VALUE ] : true ,
4949 } ) ;
5050 } ) ;
You can’t perform that action at this time.
0 commit comments