Support runtime environment changes via scope (sync to native Scope.setEnvironment)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- android, ios, javascript, react-native, typescript
研究方向
This work is parked until @sentry/core gains a scope-level setEnvironment API. First check the linked sentry-javascript proposal and implementation status; if the API exists, trace the scope-sync path on Android and iOS for both architectures, including the bridge spec and its older-binary fallback. Done means runtime environment changes reach native events, logs, and profiles on both platforms.
由索引模型根據 Issue 內容生成。
描述
Context
sentry-java 8.63.0 added Scope.setEnvironment/getEnvironment (sentry-java#5772, proposal sentry-java#5769). It is applied to events, the DSC, logs, metrics and profiles. sentry-cocoa already has -[SentryScope setEnvironment:], and sentry-native has sentry_set_environment.
Problem
In RN, environment can only be set at init (options.environment). That value goes to native once, in RNSentryStart and on iOS. If an app changes environment at runtime, native-captured events (native crashes, ANRs, app-exit/NDK events, native logs and profiles) keep the init-time value.
Blocker
JS @sentry/core's Scope has no environment API, so there's nothing on the JS side to sync over the bridge.
Proposal
- Upstream: ask sentry-javascript for a scope-level
setEnvironment(or find out whether they plan one). - Once that exists: sync it to native through the scope-sync path on both platforms (Android
Scope.setEnvironment, iOSSentryScope setEnvironment:), on both architectures. This adds a bridge spec method, so it needs a fallback for older native binaries.
Until then, this is parked.
- 主要語言
- TypeScript
- 星號
- 1.8k
- 分支
- 371
- 平均合併
- 22 小時 3 分鐘
- 30 天內合併 PR
- 106
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-react-native 的其他 Issue
-
React-Native
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-react-native#7073 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement React-Native
難度 2/5 1-3 小時 新手友好度 80/100
getsentry/sentry-react-native#7055 · 1 則留言 ·
維護者通常 1 天內回覆
-
React-Native Replays Task
難度 2/5 1-3 小時 新手友好度 88/100
getsentry/sentry-react-native#6680 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement React-Native
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-react-native#6143 · 2 則留言 ·
維護者通常 1 天內回覆
-
React-Native Task User Feedbacks
難度 2/5 1-3 小時 新手友好度 84/100
getsentry/sentry-react-native#5932 · 2 則留言 ·
維護者通常 1 天內回覆
查看 getsentry/sentry-react-native 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
MetaMask/eth-phishing-detect#317371 ·
維護者通常 1 天內回覆
-
android:player ios:player
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 92/100
erkamyaman/rust-anything#963 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
維護者通常 1 天內回覆
-
bug(worker): detector run is marked failed and never retried when span download fails可能已有人在做 @jagrutgarg 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 72/100
traceroot-ai/traceroot#3434 · 1 則留言 ·
維護者通常 1 天內回覆