Skip to content

The SetDefaultAttributes call in CaptureLog overwrites user-set attributes from the configureLog callback #5351

Open

Description

@jamescrosswell

This is not a new problem, but existing behavior, that we now add more default attributes that potentially overwrite user-defined attributes. Previously, we would overwrite

  • sentry.environment

  • sentry.release

  • sentry.sdk.name

  • sentry.sdk.version

We could open a follow-up to change this behavior.

This is technically a change in behavior, so we might want to do this in the next major (v7.0.0).

But we probably do want to do this, because with Metrics we did get it right where user-attributes might overwrite default-attributes.

Originally posted by @Flash0ver in #5216

Activity

  1. linear-code commented on Jul 6, 2026

    @linear-code
  2. added
    Feature
    .NET
    on Jul 6, 2026
  3. Flash0ver commented on Jul 7, 2026

    @Flash0ver
    Contributor

    Not sure yet if bug fix (patch) or breaking change (major).
    In Metrics, we got the precedence right (first apply SDK default attributes, then apply user-defined attributes).

  4. added
    Breaking Change
    Next Major
    on Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETBreaking ChangeFeatureLogsNext Major

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions