-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add assignment and exposure events tracking options #73
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
Conversation
|
📝 Documentation updates detected! New suggestion: Document FetchOptions for Ruby Experiment SDK |
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 support for fetch options to control tracking behavior in the Amplitude Experiment SDK. The changes allow clients to specify whether to track assignment and exposure events via HTTP headers when fetching variants.
- Introduces
FetchOptionsclass withtracks_assignmentandtracks_exposureproperties - Updates client methods (
fetch_v2,fetch_async_v2) to accept optionalFetchOptionsparameter - Adds logic to set tracking headers based on fetch options
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lib/experiment/remote/fetch_options.rb | New class to encapsulate tracking options for fetch requests |
| lib/experiment/remote/client.rb | Updates fetch methods to accept and process fetch options, sets HTTP headers based on options |
| lib/amplitude-experiment.rb | Adds require statement for the new FetchOptions class |
| spec/experiment/remote/client_spec.rb | Adds test coverage for fetch options behavior and fixes async test synchronization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
LGTM just address the copilot nit. The timeouts are fine to me as long as they pass. |
# [1.8.0](v1.7.1...v1.8.0) (2025-12-15) ### Features * add assignment and exposure events tracking options ([#73](#73)) ([6b6bb2c](6b6bb2c))
|
🎉 This PR is included in version 1.8.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary
Adds tracking options for assignment and exposure events for fetch calls.
Checklist