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

feat: add integration plugin #126

Merged
merged 22 commits into from
Oct 10, 2024
Merged

feat: add integration plugin #126

merged 22 commits into from
Oct 10, 2024

Conversation

bgiori
Copy link
Collaborator

@bgiori bgiori commented Sep 17, 2024

Summary

  • Add ExperimentPlugin modeled after analytics plugin interface.
  • Add addPlugin method to ExperimentClient.
  • New plugin, IntegrationPlugin handles getting user identity and tracking exposures
    • initializeWithAmplitudeAnalytics now installs the AmplitudeIntegrationPlugin instead of ConnectorUserProvider and ConnectorExposureTrackingProvider.
  • IntegrationManager handles managing IntegrationPlugins for the client.
    • Adds event persistence to experiment SDK
    • Re-implements experiment deduping using session storage rather than in-memory storage.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: NO

}
this.integration = integration;
if (integration.setup) {
this.integration.setup(this.config, this.client).then(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can plugins make modifications to config, or do we want to pass in a copy of config?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm, interesting thought. I'm actually not quite sure what the right answer is. I kind of like the flexibility that they could change config.

@bgiori bgiori merged commit 58446e2 into main Oct 10, 2024
6 checks passed
@bgiori bgiori deleted the integration-plugin branch October 10, 2024 16:59
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.

3 participants