-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add exposure service #40
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 experiment exposures, deprecates the existing assignment service, and introduces a TracksExposure option for evaluations. The exposure service provides similar functionality to the assignment service but with updated naming and improved design patterns.
Key Changes
- Introduced new
ExposureServicewith filtering and tracking capabilities for experiment exposures - Added
TracksExposureoption toEvaluateOptionsfor explicit exposure tracking control - Deprecated
AssignmentService,AssignmentConfig, and related types in favor of the new exposure service
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| exposure.go | Defines the exposure struct and canonicalization logic for deduplication |
| exposure_filter.go | Implements LRU cache-based filtering to prevent duplicate exposure tracking |
| exposure_service.go | Core exposure tracking service that converts exposures to Amplitude events |
| exposure_filter_test.go | Comprehensive test suite for exposure filter functionality |
| exposure_service_test.go | Tests for exposure event generation and tracking logic |
| config.go | Adds ExposureConfig and deprecates AssignmentConfig |
| evaluate_options.go | Introduces TracksExposure option for evaluation control |
| client.go | Integrates exposure service into client initialization and evaluation flow |
| client_test.go | Adds integration test for exposure tracking |
| assignment.go | Adds deprecation documentation |
| assignment_filter.go | Adds deprecation documentation |
| assignment_service.go | Adds deprecation documentation and comments |
| assignment_filter_test.go | Updates import formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
📝 Documentation updates detected! New suggestion: Document exposure tracking for Go Experiment SDK local evaluation |
Summary
Adding exposure service, deprecating assignment service, and adding tracksExposure to evaluate options.
Checklist