Add device and OS attributes to metrics on mobile, as the native SDKs do
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
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- backend-api-design, observability
Direzione di ricerca
Read the metrics spec linked in the issue and compare its default attribute guidance with the native SDK behavior described for sentry-java and sentry-cocoa. If the SDK and ingest teams decide .NET should match the native SDKs, inspect SentryOptions.DeviceLogAttributes and SentryMetric.Factory.cs, where SetDefaultAttributes is called. Done means the decision is reflected consistently in the metrics attributes and, if needed, the spec.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem Statement
#6028 adds device and OS attributes (os.name, os.version, device.brand, device.model, device.family) to structured logs on Android, iOS and Mac Catalyst, as the logs spec asks of mobile SDKs. Metrics don't get them.
The native SDKs we wrap do add them to metrics:
- sentry-java (8.66.0):
DefaultAndroidEventProcessor.process(SentryMetricsEvent, Hint)sets the same five attributes it sets on logs. - sentry-cocoa (9.35.0):
TelemetryScopeApplieradds the OS and device attributes to every telemetry item, metrics included.
So a metric emitted from .NET on Android or iOS carries fewer attributes than one emitted from the native SDK in the same app.
Why this needs a decision first
The metrics spec doesn't list device or OS attributes. It also says SDKs SHOULD minimize default attributes because of cardinality, and that new defaults SHOULD only be added after discussion with the SDK and ingest teams. The native SDKs go beyond that.
The question is whether .NET should match the native SDKs or follow the spec as written, and whether the spec should be updated.
Solution Brainstorm
If we match the native SDKs, the work is small. #6028 adds an internal SentryOptions.DeviceLogAttributes hook, filled by the Android and Cocoa integrations and applied in SentryLog.SetDefaultAttributes. Metrics would apply the same hook in SentryMetric.Factory.cs, where SetDefaultAttributes is already called. The hook would then want a name that isn't specific to logs.
- 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