Add AttachServerName and stop gating the server name on SendDefaultPii
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 46/100
Direzione di ricerca
Read the four named sites: MainSentryEventProcessor, SentryLog.SetDefaultAttributes, AspNetCoreEventProcessor and SystemWebRequestEventProcessor, plus SentryOptions and BindableSentryOptions. Trace how DataCollection configuration affects the legacy SendDefaultPii behavior, then check platform defaults for Android and iOS. Done means the new option controls all four sites, explicit ServerName still wins, and the mobile defaults and migration behavior match the proposal.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The core SDK sends Environment.MachineName as the server name only when SendDefaultPii is on. #5428 listed these sites for migration to DataCollection.UserInfo, but #5932 leaves them out, because userInfo doesn't cover server name in the spec. This issue tracks them instead.
Sites:
MainSentryEventProcessor:@event.ServerName = Environment.MachineNamewhenSendDefaultPiiis on andServerNameisn't set.SentryLog.SetDefaultAttributes: theserver.addressattribute, under the same conditions.AspNetCoreEventProcessorandSystemWebRequestEventProcessoralways set it, with no gate. A comment in the first says the core gate exists "since the SDK can be used in desktop apps".
The spec doesn't cover it
Data collection spec 0.17.0 has no option for server name or hostname, and userInfo "does not affect any other data category". The nearest category is technical context ("Device and environment context (OS, runtime, non-PII identifiers)"), which SDKs SHOULD collect and which no dataCollection option gates. The one open spec PR, getsentry/sentry-docs#20856, doesn't touch it either.
Other SDKs
| SDK | Default | Switch |
|---|---|---|
| Java | hostname, not gated by sendDefaultPii or userInfo |
SentryOptions.attachServerName, default true; SentryAndroidOptions sets it to false |
| JavaScript (Node) | SENTRY_NAME or os.hostname(), not gated |
includeServerName on ServerRuntimeOptions, documented for CLI and Electron apps where the hostname may be PII |
| Python, Go, Ruby, PHP | hostname, not gated | override server_name |
| Cocoa | never set | — |
| Dart | never set as server_name; the hostname goes in device.name only with sendDefaultPii |
— |
Java's and Node's switches both predate dataCollection, and neither moved into it when those SDKs adopted it.
The pattern is server versus client, not a data category. On a server the hostname names a machine you run. On a phone, laptop or CLI it names the user's device, and often includes their name.
Proposal
- Add a top-level
SentryOptions.AttachServerName(with itsBindableSentryOptionscounterpart). It defaults totrue, and tofalseon .NET for Android and .NET for iOS, which covers MAUI on those platforms. - An explicitly set
ServerNamealways wins. - Respect it in all four sites above, including ASP.NET Core and ASP.NET.
- Keep the legacy behaviour while
DataCollectionisn't configured, per the spec's migration rules. Once it is,AttachServerNamedecides instead ofSendDefaultPii.
Open questions:
- Mac Catalyst: desktop hardware, but shares the iOS code paths.
- Mobile behaviour change: .NET for Android and iOS apps with
SendDefaultPii = truesend the machine name today. DefaultingAttachServerNametofalsethere changes that, so it needs a changelog note or a place in #5437 / #5438. On Android, .NET already sets the native SDK'sAttachServerName = false(Platforms/Android/SentrySdk.cs), so only the managed layer sends it. - Spec: we could instead propose a
dataCollectionkey in the spec. We went with top-level to match Java and Node.
Related: #5956 (MAUI sends the device name with no gate) may want the same switch.
Part of #5420.
- Lingua principale
- C#
- Stelle
- 775
- Fork
- 262
- Merge medio
- 1g 16h
- PR unite (30g)
- 118
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-dotnet
-
chore: remove stale IL3050/IL3053 workaround from the iOS sampleForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaState: Needs Discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-dotnet#6071 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"Forse già presa @pcbeingused33 l’ha presa oggi. ApertaState: Needs Discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
getsentry/sentry-dotnet#6039 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
.NET Platform: Android Task
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/sentry-dotnet#6020 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Move the Blazor WebAssembly sample off the deprecated DevServerForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta.NET Framework: Blazor
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
getsentry/sentry-dotnet#5906 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Docs MSBuild Needs Docs Update
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-dotnet#5691 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/sentry-dotnet
Issue simili
-
In-car displays show 0 km/h and P while the AV drivesForse già presa @bazilinskyy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
bazilinskyy/coupled-sim#366 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
BaryoDev/umbraco-pwa#196 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
microsoft/fluentui-blazor#5688 ·
I maintainer di solito rispondono entro 1 giorno
-
bug flaky lsp-transport small
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno