Repository navigation
Add device attributes to Logs in the MAUI SDK #4733
Copy link
Copy link
Open
Labels
.NETPull requests that update .net codePull requests that update .net codeFeatureNew feature or requestNew feature or requestLogs
Description
Activity
- addedFeatureNew feature or requestNew feature or request.NETPull requests that update .net codePull requests that update .net code
on Nov 13, 2025 As the customer that triggered support rasing this ticket I thought I'd had some background. As it currently stands the logs and more importantly the lack of supplementary data mean they really only work in the scope of a single developer with one maybe two devices.
As soon as QA or production gets involved we need to know what devices are triggering which logs and that is impossible at the moment.
As a workaround I haved changed SetBeforeSendLog to read the User details out of Scope and then apply them to Log with SetAttribute
options.Experimental.SetBeforeSendLog(log => { #if DEBUG SentryLogLevel minimumLevel = SentryLogLevel.Debug; #else SentryLogLevel minimumLevel = SentryLogLevel.Info; #endif log.SetAttribute("DeviceName", DeviceInfo.Name); log.SetAttribute("Manufacturer", DeviceInfo.Manufacturer); log.SetAttribute("OSVersion", DeviceInfo.VersionString); log.SetAttribute("DeviceModel", DeviceInfo.Model); SentryUser sentryUser = null; ; SentrySdk.ConfigureScope(scope => { if (scope.HasUser()) { sentryUser = scope.User; } }); if (sentryUser != null) { log.SetAttribute("UserId", sentryUser.Id); log.SetAttribute("UserName", sentryUser.Username); } if (log.Level < minimumLevel) { return null; } return log; });Reacted by James Crosswell, Stefan Pölz and Syed Hoque- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Dec 23, 2025
Metadata
Metadata
Assignees
Labels
.NETPull requests that update .net codePull requests that update .net codeFeatureNew feature or requestNew feature or requestLogs
Projects
- StatusShow more project fieldsNo status
- StatusShow more project fieldsNo status
Problem Statement
The Sentry MAUI SDK currently does not include device-specific attributes (such as device.model, device.platform, device.manufacturer, and device.brand) in structured logs, even though this information is collected and sent with error events and issues.
Solution Brainstorm
No response