Skip to content

Contexts set via setContext are ignored when they contain the string "context"Β #13750

@wouterdewinter

Description

@wouterdewinter

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

8.31.0

Framework Version

No response

Link to Sentry event

https://elanza-eu.sentry.io/issues/8109038/events/a822fb8979f84e61891652df46f5567c/?project=4507531780227152

Reproduction Example/SDK Setup

Sentry init code:

Sentry.init({
    dsn: ...,
    environment: ...,
  });

Steps to Reproduce

We're setting some custom context before capturing an exception:

    Sentry.withScope((scope: Sentry.Scope) => {
      scope.setContext("Error Context", { a: "123", b: 2 });
      scope.setContext("Error Contekt", { a: "123", b: 2 });
      Sentry.captureException(error);
    });

Expected Result

We expect both contexts to appear in the Sentry user interface.

Actual Result

The context containing the string "context" does not appear in the UI, the other one with an intentional typo does appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPackage: browserIssues related to the Sentry Browser SDK

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions