getsentry / getsentry/sentry-dotnet
Sync `Environment` via `IScopeObserver` in Hybrid SDK scenarios (sentry-java)
- Dominant language
- C#
- Stars
- 770
- Forks
- 248
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 51
Description
Follow-up to getsentry/sentry-dotnet#5385 to cover `sentry-java`.
Sync `SentryOptions.Environment` during hybrid-SDK **Init**.
Sync `Scope.Environment` with the hybrid SDK via `IScopeObserver`.
For `sentry-java` (Android).
The equivalent work for `sentry-native` and `sentry-cocoa` was tracked in getsentry/sentry-dotnet#5385 and delivered in:
* getsentry/sentry-dotnet#5365 — `feat: sync `environment `to the native layers`
* getsentry/sentry-dotnet#5376 — `fix: fetch default attributes from `Scope `first`
This issue tracks the remaining `sentry-java` layer, which was explicitly deferred in that work.
> [!NOTE]
This is needed by the gaming SDKs since the 'environment' for gaming SDKs can change after the user logs in... a bit weird but something we need to accommodate.
Contributor guide
Research direction
Start by reviewing getsentry/sentry-dotnet#5365 and #5376 for the equivalent native-layer behavior, then inspect the sentry-java Android hybrid SDK integration. Trace hybrid SDK Init and IScopeObserver handling. Done means SentryOptions.Environment is synchronized during Init and Scope.Environment changes are synchronized through IScopeObserver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100