Skip to content

Scoped attributes are not being sent w/ logs #5209

@derekoakley

Description

@derekoakley

Package

Sentry

.NET Flavor

.NET

.NET Version

10.0.203

OS

Any (not platform specific)

OS Version

26.4.1 (25E253)

Development Environment

Visual Studio Code (macOS)

Other Error Monitoring Solution

No

Other Error Monitoring Solution Name

No response

SDK Version

6.5.0

Self-Hosted Sentry Version

No response

Workload Versions

Workload version: 10.0.200

Installed Workload Id Manifest Version Installation Source
ios 26.2.10217/10.0.100 SDK 10.0.200
maui 10.0.20/10.0.100 SDK 10.0.200

UseSentry or SentrySdk.Init call

.UseSentry(options =>
{
    options.Dsn = "...";
    options.EnableLogs = true;
#if DEBUG
    options.Environment = "Development";
    options.Debug = true;
#else
    options.Environment = "Production";
    options.Debug = false;
#endif
    options.AutoSessionTracking = true;
    options.IsGlobalModeEnabled = true;
    options.AttachScreenshot = true;
    options.IncludeTextInBreadcrumbs = true;
    options.IncludeTitleInBreadcrumbs = true;
    options.IncludeBackgroundingStateInBreadcrumbs = true;
    options.SetBeforeBreadcrumb(FilterNoisyBreadcrumbs);
})

Steps to Reproduce

  1. Configure scope:
SentrySdk.ConfigureScope(scope =>
{
    scope.User = new SentryUser
    {
        Id = id,
        Username = username,
        Other = other,
    };
});
  1. Create log:
SentrySdk.Logger.LogInfo(
    log =>
    {
        log.SetAttribute("...", ...);
        log.SetAttribute("...", ...);
        log.SetAttribute("...", ...);
    },
    "Recording started"
);

Expected Result

Log contains user attributes automatically as mentioned here in the MAUI Sentry Set Up Logs guide.

Actual Result

No user attributes appear in the log

Metadata

Metadata

Labels

.NETPull requests that update .net codeBugSomething isn't workingLogs
No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions