@@ -93,7 +93,7 @@ func (c *SplitClient) getEvaluationsResult(matchingKey string, bucketingKey *str
9393}
9494
9595// createImpression creates impression to be stored and used by listener 
96- func  (c  * SplitClient ) createImpression (featureFlag  string , bucketingKey  * string , evaluationLabel  string , matchingKey  string , treatment  string , changeNumber  int64 ) dtos.Impression  {
96+ func  (c  * SplitClient ) createImpression (featureFlag  string , bucketingKey  * string , evaluationLabel  string , matchingKey  string , treatment  string , changeNumber  int64 ,  disabled   bool ) dtos.Impression  {
9797	var  label  string 
9898	if  c .factory .cfg .LabelsEnabled  {
9999		label  =  evaluationLabel 
@@ -112,18 +112,12 @@ func (c *SplitClient) createImpression(featureFlag string, bucketingKey *string,
112112		Label :        label ,
113113		Treatment :    treatment ,
114114		Time :         time .Now ().UTC ().UnixNano () /  int64 (time .Millisecond ), // Convert standard timestamp to java's ms timestamps 
115- 	}
116- }
117- 
118- func  (c  * SplitClient ) createImpressionDecorated (featureFlag  string , bucketingKey  * string , matchingKey  string , evaluationResult  evaluator.Result ) dtos.ImpressionDecorated  {
119- 	return  dtos.ImpressionDecorated {
120- 		Impression : c .createImpression (featureFlag , bucketingKey , evaluationResult .Label , matchingKey , evaluationResult .Treatment , evaluationResult .SplitChangeNumber ),
121- 		Disabled :   evaluationResult .ImpressionsDisabled ,
115+ 		Disabled :     disabled ,
122116	}
123117}
124118
125119// storeData stores impression, runs listener and stores metrics 
126- func  (c  * SplitClient ) storeData (impressions  []dtos.ImpressionDecorated , attributes  map [string ]interface {}, metricsLabel  string , evaluationTime  time.Duration ) {
120+ func  (c  * SplitClient ) storeData (impressions  []dtos.Impression , attributes  map [string ]interface {}, metricsLabel  string , evaluationTime  time.Duration ) {
127121	// Store impression 
128122	if  c .impressions  !=  nil  {
129123		listenerEnabled  :=  c .impressionListener  !=  nil 
@@ -188,7 +182,7 @@ func (c *SplitClient) doTreatmentCall(key interface{}, featureFlag string, attri
188182	}
189183
190184	c .storeData (
191- 		[]dtos.ImpressionDecorated {c .createImpressionDecorated (featureFlag , bucketingKey , matchingKey , * evaluationResult )},
185+ 		[]dtos.Impression {c .createImpression (featureFlag , bucketingKey , evaluationResult . Label ,  matchingKey , evaluationResult . Treatment ,  evaluationResult . SplitChangeNumber ,  evaluationResult . ImpressionsDisabled )},
192186		attributes ,
193187		metricsLabel ,
194188		evaluationResult .EvaluationTime ,
@@ -229,7 +223,7 @@ func (c *SplitClient) generateControlTreatments(featureFlagNames []string, opera
229223}
230224
231225func  (c  * SplitClient ) processResult (result  evaluator.Results , operation  string , bucketingKey  * string , matchingKey  string , attributes  map [string ]interface {}, metricsLabel  string ) (t  map [string ]TreatmentResult ) {
232- 	var  bulkImpressions  []dtos.ImpressionDecorated 
226+ 	var  bulkImpressions  []dtos.Impression 
233227	treatments  :=  make (map [string ]TreatmentResult )
234228	for  feature , evaluation  :=  range  result .Evaluations  {
235229		if  ! c .validator .IsSplitFound (evaluation .Label , feature , operation ) {
@@ -238,7 +232,7 @@ func (c *SplitClient) processResult(result evaluator.Results, operation string,
238232				Config :    nil ,
239233			}
240234		} else  {
241- 			bulkImpressions  =  append (bulkImpressions , c .createImpressionDecorated (feature , bucketingKey , matchingKey , evaluation ))
235+ 			bulkImpressions  =  append (bulkImpressions , c .createImpression (feature , bucketingKey , evaluation . Label ,  matchingKey , evaluation . Treatment ,  evaluation . SplitChangeNumber ,  evaluation . ImpressionsDisabled ))
242236
243237			treatments [feature ] =  TreatmentResult {
244238				Treatment : evaluation .Treatment ,
0 commit comments