Skip to content

Commit 73ef818

Browse files
committed
Log format
1 parent f91cf75 commit 73ef818

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/assignment-logger.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ export interface IAssignmentEvent {
4949

5050
metaData?: Record<string, unknown>;
5151

52+
/**
53+
* The format of the flag.
54+
*/
55+
format: string;
56+
5257
/**
5358
* The flag evaluation details. Null if the flag was precomputed.
5459
*/

src/client/eppo-client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,12 +1036,13 @@ export default class EppoClient {
10361036
}
10371037

10381038
private logAssignment(result: FlagEvaluation) {
1039-
const { flagKey, subjectKey, allocationKey, subjectAttributes, variation } = result;
1039+
const { flagKey, format, subjectKey, allocationKey, subjectAttributes, variation } = result;
10401040
const event: IAssignmentEvent = {
10411041
...(result.extraLogging ?? {}),
10421042
allocation: allocationKey ?? null,
10431043
experiment: allocationKey ? `${flagKey}-${allocationKey}` : null,
10441044
featureFlag: flagKey,
1045+
format,
10451046
variation: variation?.key ?? null,
10461047
subject: subjectKey,
10471048
timestamp: new Date().toISOString(),

0 commit comments

Comments
 (0)