@@ -17,7 +17,7 @@ import {
1717import { decodePrecomputedFlag } from '../decoding' ;
1818import { FlagEvaluationWithoutDetails } from '../evaluator' ;
1919import FetchHttpClient from '../http-client' ;
20- import { PrecomputedFlag } from '../interfaces' ;
20+ import { FormatEnum , PrecomputedFlag } from '../interfaces' ;
2121import { getMD5Hash } from '../obfuscation' ;
2222import initPoller , { IPoller } from '../poller' ;
2323import PrecomputedRequestor from '../precomputed-requestor' ;
@@ -151,6 +151,7 @@ export default class EppoPrecomputedClient {
151151
152152 const result : FlagEvaluationWithoutDetails = {
153153 flagKey,
154+ format : this . precomputedFlagStore . getFormat ( ) ?? '' ,
154155 subjectKey : this . precomputedFlagsRequestParameters ?. precompute . subjectKey ?? '' ,
155156 subjectAttributes : this . precomputedFlagsRequestParameters ?. precompute . subjectAttributes ?? { } ,
156157 variation : {
@@ -225,19 +226,21 @@ export default class EppoPrecomputedClient {
225226 eventsToFlush . forEach ( ( event ) => {
226227 try {
227228 logFunction ( event ) ;
229+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
228230 } catch ( error : any ) {
229231 logger . error ( `[Eppo SDK] Error flushing event to logger: ${ error . message } ` ) ;
230232 }
231233 } ) ;
232234 }
233235
234236 private logAssignment ( result : FlagEvaluationWithoutDetails ) {
235- const { flagKey, subjectKey, allocationKey, subjectAttributes, variation } = result ;
237+ const { flagKey, subjectKey, allocationKey, subjectAttributes, variation, format } = result ;
236238 const event : IAssignmentEvent = {
237239 ...( result . extraLogging ?? { } ) ,
238240 allocation : allocationKey ?? null ,
239241 experiment : allocationKey ? `${ flagKey } -${ allocationKey } ` : null ,
240242 featureFlag : flagKey ,
243+ format,
241244 variation : variation ?. key ?? null ,
242245 subject : subjectKey ,
243246 timestamp : new Date ( ) . toISOString ( ) ,
@@ -272,6 +275,7 @@ export default class EppoPrecomputedClient {
272275 allocationKey : allocationKey ?? '__eppo_no_allocation' ,
273276 variationKey : variation ?. key ?? '__eppo_no_variation' ,
274277 } ) ;
278+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
275279 } catch ( error : any ) {
276280 logger . error ( `[Eppo SDK] Error logging assignment event: ${ error . message } ` ) ;
277281 }
0 commit comments