Skip to content

Send the device name only with SendDefaultPii - #2932

Draft
bitsandfoxes wants to merge 3 commits into
mainfrom
snek/sentry-unity-device-name-gate
Draft

bitsandfoxes wants to merge 3 commits into
mainfrom
snek/sentry-unity-device-name-gate

Conversation

@bitsandfoxes

Copy link
Copy Markdown
Contributor

The device name (device.name, from SystemInfo.deviceName) is set only when SendDefaultPii is enabled, the same way device.device_unique_identifier is. Users often name their device after themselves, e.g. "Jane's iPhone", so it can identify them.

The gate sits where the scope's device context is filled in, so it covers native crashes too: on desktop and consoles, Unity copies that context into sentry-native's scope, and sentry-native doesn't collect a device name itself. On Android and iOS, Unity doesn't pass the name on to sentry-java or sentry-cocoa.

This changes what is sent by default, so the CHANGELOG lists it under Behavioral Changes.

Tests cover the scope with and without SendDefaultPii, and that the native context writer gets no name without it.

🤖 Generated with Claude Code

@bitsandfoxes
bitsandfoxes force-pushed the snek/sentry-unity-device-name-gate branch from 51037a7 to eb3731a Compare November 4, 2026 15:47
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