Sentry.Maui sends the user's device name with no PII gate

オープン
#5,956 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
backend

調査の方向性

Start by reading MauiDeviceData.ApplyMauiDeviceData and its caller, SentryMauiEventProcessor, then review how SendDefaultPii is applied to device data and the related discussion in #5932. Decide how device names should interact with DataCollection; done means device names are gated consistently with the agreed option and covered by tests for the relevant settings.

索引モデルが issue の本文から書いたものです。

説明

Framework: MAUI State: Needs Discussion

Sentry.Maui sends the name of the user's device on every event, with no option gating it. MauiDeviceData.ApplyMauiDeviceData (called from SentryMauiEventProcessor) sets:

device.Name ??= deviceInfo.Name;

SendDefaultPii doesn't gate it, and no DataCollection option does either. It has been this way since #1713 (2022).

On the platforms MAUI targets, DeviceInfo.Name is often the user's own name for their device:

Platform MAUI's DeviceInfo.Name Typical value
Android Settings.Global device_name (API 25+), falling back to Model The name the user gave the phone, e.g. "Jane's Pixel"
iOS UIDevice.CurrentDevice.Name Generic ("iPhone") on iOS 16+ unless the app has Apple's user-assigned device name entitlement; the user's name for it before that
Windows EasClientDeviceInformation.FriendlyName The computer name
macOS SCDynamicStoreCopyComputerName The computer name, e.g. "Jane's MacBook Pro"
Other SDKs
  • sentry-cocoa doesn't send a device name. The device context has model and model_id only.
  • sentry-java (Android) doesn't set a device name.
  • sentry-dart sets device.name from the hostname, and only when sendDefaultPii is on.

So MAUI is the only mobile SDK we found that sends it unconditionally.

Data collection

The data collection spec puts "Device and environment context (OS, runtime, non-PII identifiers)" in technical context, which no dataCollection option gates, and puts "Identity (name, …)" under PII. A user-chosen device name is closer to the second. No dataCollection option covers it, the same gap as the hostname sent as server_name, discussed in #5932.

To decide
  • Gate it on SendDefaultPii now, as Dart does. This changes what existing MAUI apps send by default.
  • What gates it once DataCollection is configured. If .NET adds a top-level AttachServerName that defaults to false on Android and iOS (the shape #5932 discusses for the hostname), device name could follow the same switch or get its own.

Part of #5420.

主要言語
C#
スター
775
フォーク
262
平均マージ
1日 16時間
マージ済み PR(30日)
118

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-dotnet のほかの issue

getsentry/sentry-dotnet の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。