Skip to content

RUNE-87: Warn when a game sends an event name the SDK always sends itself - #838

Merged
nattb8 merged 1 commit into
mainfrom
feat/rune-87-builtin-name-warning
Dec 2, 2026
Merged

nattb8 merged 1 commit into
mainfrom
feat/rune-87-builtin-name-warning

Conversation

@nattb8

@nattb8 nattb8 commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Why

The SDK always sends a few events with no switch to turn them off: launch, sessions, the tracking permission change and the install referrer. A game that sends one of these names itself gets two, and session and new player numbers drift. The autocapture names already warn. These did not.

What changes

  • Track logs one warning per name per run for these six names, and still sends the event.
  • The SDK's own launch, install referrer and tracking permission events moved off the public Track onto an internal send, so they never warn about themselves. Session events already enqueued directly.
  • The names live in one list (BuiltInEvents) next to the autocapture group names, and the send sites use its constants.
Name Sent by the SDK
game_launch every Init
session_start, session_end, session_heartbeat each session
tracking_authorization_changed iOS, when the tracking permission changes
install_referrer_received Android, once per install

Warning text: Track("<name>") uses an event name the SDK always sends itself, and it cannot be switched off, so it will arrive twice. Use a different event name.

Testing

  • Dotnet suite: 603 passed, 1 skipped.
  • New tests cover each name warning once (string and typed overloads), names warning separately, consent None never warning, other names never warning, and the SDK's own launch, session, install referrer and tracking permission events never warning. Ten mutation checks each broke a test.
  • Not covered end to end: the heartbeat timer itself. It shares the session send path with start and end, which are covered.

🤖 Generated with Claude Code

…s itself

The launch, session, tracking permission and install referrer events cannot
be switched off, so a game that sends one of those names gets two. Track now
logs one warning per name and still sends the event.

The SDK's own launch, install referrer and tracking permission events moved
off the public Track onto an internal send, so they never warn about
themselves. The built-in names live in one list next to the autocapture
group names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nattb8
nattb8 requested review from a team as code owners December 2, 2026 02:46
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Audience SDK — Build Size

Platform SDK Size Change
Android 0.54 / 20.00 MB +0.18 MB ✅
Windows 0.32 / 20.00 MB +0.16 MB ✅
iOS 9.45 / 20.00 MB +0.93 MB ✅
macOS 1.53 / 20.00 MB +0.63 MB ✅

SDK Size = build minus empty app. Change = vs baseline. Fails if any platform exceeds its absolute size limit.

@nattb8
nattb8 merged commit f40437f into main Dec 2, 2026
55 of 58 checks passed
@nattb8
nattb8 deleted the feat/rune-87-builtin-name-warning branch December 2, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants