Skip to content

fix(amplitude-session): use eventSessionId in insertSession + remove debug logs#1165

Closed
abueide wants to merge 1 commit intomasterfrom
amp/fix-insert-session
Closed

fix(amplitude-session): use eventSessionId in insertSession + remove debug logs#1165
abueide wants to merge 1 commit intomasterfrom
amp/fix-insert-session

Conversation

@abueide
Copy link
Contributor

@abueide abueide commented Mar 12, 2026

Summary

  • Fix insertSession to use eventSessionId instead of sessionId for event enrichment, preserving the dual-ID concept from fix: Amplitude session_id fix #1104
  • Remove 3 stale console.log debug statements left from the v0.4.2 rewrite
  • Add test verifying eventSessionId is used during mid-transition enrichment

Context

Customer escalation: AmplitudeSessionPlugin v0.4.2 produces 0-second sessions on iOS. This is PR 1/4 in a fix stack.

Branch stack:

master
  amp/fix-insert-session        ← this PR
    amp/ios-inactive-state      ← PR 2
      amp/transition-promise    ← PR 3
        amp/persistence-cleanup ← PR 4

Test plan

  • yarn jest packages/plugins/plugin-amplitudeSession — 22 tests pass
  • yarn jest — 66 suites, 362 tests pass, no regressions
  • Verify no console.log statements remain in source

🤖 Generated with Claude Code

…debug logs

insertSession was using sessionId instead of eventSessionId for event
enrichment, defeating the dual-ID concept from #1104. During session
transitions, events could be tagged with the new session ID before
session_start was emitted. Also removes 3 stale console.log statements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@abueide
Copy link
Contributor Author

abueide commented Mar 12, 2026

Superseded by a single combined PR.

@abueide abueide closed this Mar 12, 2026
@abueide abueide deleted the amp/fix-insert-session branch March 12, 2026 20:22
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.

1 participant