Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assignment logging callback #16

Merged
merged 2 commits into from
Jun 27, 2022
Merged

Assignment logging callback #16

merged 2 commits into from
Jun 27, 2022

Conversation

ploomiz
Copy link
Contributor

@ploomiz ploomiz commented Jun 23, 2022


labels: mergeable

Motivation and Context

Design Doc: https://www.notion.so/eppo/SDK-Assignment-Logging-7219d14b29cb497d80fa5515de3b229b

Problem: It's not clear when or how to log assignment events with the SDK.

Description

The goal of this PR is to improve assignment logging by 1) providing a standardized assignment event schema and 2) having the SDK determine when or if to log assignments. Consumers pass an AssignmentLogger implementation to the SDK during initialization. The SDK invokes the logger after assigning a subject to a variation. The logger is not invoked if no variation is assigned (for example, because the subject is not part of the sample population).

How has this been tested?

Unit tests.

@ploomiz ploomiz requested review from vpai and petzel June 23, 2022 23:10
@ploomiz ploomiz self-assigned this Jun 23, 2022
@@ -1,55 +0,0 @@
<!---
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the changelog because prefer to use GitHub releases for release documentation.

variation: assignedVariation,
timestamp: new Date().toISOString(),
subject: subjectKey,
...subjectAttributes,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here (from the python SDK review) re: having a separate property for subject attributes.

@ploomiz ploomiz merged commit b46936c into main Jun 27, 2022
@ploomiz ploomiz deleted the assignment-logging branch June 27, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants