@@ -17,7 +17,7 @@ import {
17
17
import { decodePrecomputedFlag } from '../decoding' ;
18
18
import { FlagEvaluationWithoutDetails } from '../evaluator' ;
19
19
import FetchHttpClient from '../http-client' ;
20
- import { PrecomputedFlag } from '../interfaces' ;
20
+ import { FormatEnum , PrecomputedFlag } from '../interfaces' ;
21
21
import { getMD5Hash } from '../obfuscation' ;
22
22
import initPoller , { IPoller } from '../poller' ;
23
23
import PrecomputedRequestor from '../precomputed-requestor' ;
@@ -151,6 +151,7 @@ export default class EppoPrecomputedClient {
151
151
152
152
const result : FlagEvaluationWithoutDetails = {
153
153
flagKey,
154
+ format : this . precomputedFlagStore . getFormat ( ) ?? '' ,
154
155
subjectKey : this . precomputedFlagsRequestParameters ?. precompute . subjectKey ?? '' ,
155
156
subjectAttributes : this . precomputedFlagsRequestParameters ?. precompute . subjectAttributes ?? { } ,
156
157
variation : {
@@ -225,19 +226,21 @@ export default class EppoPrecomputedClient {
225
226
eventsToFlush . forEach ( ( event ) => {
226
227
try {
227
228
logFunction ( event ) ;
229
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
228
230
} catch ( error : any ) {
229
231
logger . error ( `[Eppo SDK] Error flushing event to logger: ${ error . message } ` ) ;
230
232
}
231
233
} ) ;
232
234
}
233
235
234
236
private logAssignment ( result : FlagEvaluationWithoutDetails ) {
235
- const { flagKey, subjectKey, allocationKey, subjectAttributes, variation } = result ;
237
+ const { flagKey, subjectKey, allocationKey, subjectAttributes, variation, format } = result ;
236
238
const event : IAssignmentEvent = {
237
239
...( result . extraLogging ?? { } ) ,
238
240
allocation : allocationKey ?? null ,
239
241
experiment : allocationKey ? `${ flagKey } -${ allocationKey } ` : null ,
240
242
featureFlag : flagKey ,
243
+ format,
241
244
variation : variation ?. key ?? null ,
242
245
subject : subjectKey ,
243
246
timestamp : new Date ( ) . toISOString ( ) ,
@@ -272,6 +275,7 @@ export default class EppoPrecomputedClient {
272
275
allocationKey : allocationKey ?? '__eppo_no_allocation' ,
273
276
variationKey : variation ?. key ?? '__eppo_no_variation' ,
274
277
} ) ;
278
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
275
279
} catch ( error : any ) {
276
280
logger . error ( `[Eppo SDK] Error logging assignment event: ${ error . message } ` ) ;
277
281
}
0 commit comments