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

Expose bandit logger types #65

Merged
merged 4 commits into from
Jul 9, 2024
Merged

Conversation

aarsilv
Copy link
Contributor

@aarsilv aarsilv commented Jul 8, 2024

Eppo Internal:
🎟️ Ticket: FF-2584 - Export common bandit logger types

Users may want to use the bandit logger types when defining loggers, just as they do with assignment logging

IAssignmentLogger,
IBanditEvent,
IBanditLogger,
} from '@eppo/js-client-sdk-common';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder if we also want to expose any of the following:

  • Attributes - used for subject attributes
  • ContextAttributes - used with bandits when explicitly separating out numerical and categorical attributes
  • `BanditSubjectAttributes - used with bandits
  • BanditActions - used with bandits

Link to types: https://github.com/Eppo-exp/js-client-sdk-common/blob/main/src/types.ts

Example method signatures:

getBanditAction(
  flagKey: string,
  subjectKey: string,
  subjectAttributes: BanditSubjectAttributes,
  actions: BanditActions,
  defaultValue: string,
): { variation: string; action: string | null };

Copy link
Member

Choose a reason for hiding this comment

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

sounds like yes, if those are part of the public API!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are my thoughts as well.

Note this requires a change to the common SDK. Pr for that here: Eppo-exp/js-sdk-common#114

@aarsilv aarsilv self-assigned this Jul 9, 2024
@aarsilv aarsilv merged commit 7801cc6 into main Jul 9, 2024
2 checks passed
@aarsilv aarsilv deleted the aaron/ff-2584/expose-bandit-logger-types branch July 9, 2024 04:28
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