Allow disabling session events for the AmplitudeSessionPlugin
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- react-native, typescript
- Domain
- mobile
Research direction
Start at the AmplitudeSessionPlugin entry point and its configuration type. Preserve session_id enrichment while making session_start and session_end conditional on disableSessionEvents, with false as the default; verify behavior with the option enabled and disabled.
Written by the indexing model from the issue text.
Description
Summary
The AmplitudeSessionPlugin currently emits session_start and session_end track events in addition to enriching all events with session_id.
According to Amplitude's documentation, the session_id property is the primary
mechanism for session tracking, while the start/end events are optional. Amplitude staff has
confirmed that sessions work correctly without these events.
For high-volume applications, these events can represent a big chunk of total Segment API calls. I'd like the ability to disable the event emission while retaining session_id enrichment.
Proposed Solution
Add a disableSessionEvents configuration option:
interface AmplitudeSessionPluginConfig {
/**
* When true, suppresses 'session_start' and 'session_end' track events.
* The session_id will still be attached to all events via integrations.
*
* @default false
*/
disableSessionEvents?: boolean;
}
// Usage
segmentClient.add({
plugin: new AmplitudeSessionPlugin({ disableSessionEvents: true })
});
- Dominant language
- TypeScript
- Stars
- 383
- Forks
- 206
- Avg merge
- 14h 45m
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from segmentio/analytics-react-native
-
bug investigate
Difficulty 1/5 Under an hour Newbie friendliness 72/100
segmentio/analytics-react-native#1145 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 68/100
segmentio/analytics-react-native#1328 ·
-
bug investigate
Difficulty 3/5 1-2 days Newbie friendliness 78/100
segmentio/analytics-react-native#1309 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
segmentio/analytics-react-native#1124 · 3 comments ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
segmentio/analytics-react-native#1114 ·
All issues in segmentio/analytics-react-native
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·