Skip to content

Scoped attributes are not being sent w/ logs #5209

Closed

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

Activity

  1. added
    Bug
    .NET
    on May 8, 2026
  2. linear-code commented on May 8, 2026

    @linear-code
  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 8, 2026
  4. jamescrosswell commented on May 11, 2026

    @jamescrosswell
    Collaborator

    This should be supported (per our docs):
    https://docs.sentry.io/platforms/dotnet/logs/#user-attributes

    However currently only the SDK attributes are being set:

    var scope = _hub.GetScope();
    log.SetDefaultAttributes(_options, scope?.Sdk ?? SdkVersion.Instance);

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETBugLogs

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions