-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add exposure service #60
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new exposure service to track exposure events while deprecating the existing assignment service. The exposure service provides similar functionality to assignments but with a modernized API and improved structure.
- Added new
ExposureServiceinterface andAmplitudeExposureServiceimplementation for tracking exposure events - Deprecated
AssignmentServiceand related classes in favor of the new exposure tracking system - Added
tracksExposureoption toEvaluateOptionsto enable exposure event tracking
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/node/src/exposure/exposure.ts | Defines core Exposure class and interfaces for the exposure tracking system |
| packages/node/src/exposure/exposure-service.ts | Implements AmplitudeExposureService with event conversion logic |
| packages/node/src/exposure/exposure-filter.ts | Implements in-memory caching filter to prevent duplicate exposure tracking |
| packages/node/src/types/config.ts | Adds ExposureConfig type and deprecates AssignmentConfig |
| packages/node/src/local/client.ts | Integrates exposure service and adds tracksExposure option to evaluate methods |
| packages/node/src/assignment/assignment.ts | Adds deprecation notices to assignment tracking interfaces |
| packages/node/src/assignment/assignment-service.ts | Adds deprecation notices to assignment service implementation |
| packages/node/src/assignment/assignment-filter.ts | Adds deprecation notice to assignment filter |
| packages/node/test/local/exposure/exposure-service.test.ts | Tests for exposure service event conversion and tracking |
| packages/node/test/local/exposure/exposure-filter.test.ts | Tests for exposure filter deduplication logic |
| packages/node/test/local/client.test.ts | Integration test for tracksExposure option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
📝 Documentation updates detected! New suggestion: Document exposure tracking for Node.js Experiment SDK local evaluation |
Co-authored-by: Copilot <[email protected]>
Summary
Adding exposure service, deprecating assignment service, and adding tracksExposure to evaluate options.
Checklist