Skip to content

Sync Environment via IScopeObserver in Hybrid SDK scenarios #5385

Description

@Flash0ver

Tracking issue for :

Problem

Per #5376: the SDK has drifted into keeping the Scope largely unpopulated and relying on the Enricher to lazily backfill values like Environment/Release, plus a second pipeline (SetDefaultAttributes) living outside both mechanisms... meaning a user-set Environment on the scope could simply be ignored.

  1. At Init: SentryOptions.Environment isn't being pushed into the native SDK, so events originating natively (e.g. a native crash) could carry the wrong/default environment while managed events carried the user's value — inconsistent tagging on the same app.
  2. After Init: The scope lets a user overwrite Environment at runtime, but that change isn't propagated.

Note

This issue relates to sentry-native and sentry-cocoa only. sentry-java is addressed separately via:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions