You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributingGuides/OBSERVABILITY.md
+37-3Lines changed: 37 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ When users encounter issues in live sessions that we can't reproduce locally, bu
18
18
## Tools & implementation
19
19
20
20
We use **Sentry** for observability across all platforms (Web, iOS, Android) and environments (production, staging, development). Sentry collects traces, spans, and contextual data from user sessions to identify and diagnose issues. For a better understanding of Sentry visit [Sentry docs](https://docs.sentry.io/).
21
-
For testing Sentry locally remember to set env variable `ENABLE_SENTRY_ON_DEV=true` in your local .env file.
21
+
For testing Sentry locally, remember to see the section [Debugging Spans](#debugging-spans) below.
The difference is that the latter adds a `canceled` attribute to the span indicating that it was canceled.
64
64
65
+
### Debugging Spans
66
+
67
+
Sentry is disabled in development by default. To enable it, add `ENABLE_SENTRY_ON_DEV=true` to your `.env` file. This activates an internal debug transport that logs span data locally instead of sending it to Sentry.
68
+
69
+
To view spans in the DevConsole, go to **Account → Troubleshoot → Log Sentry requests to console**.
70
+
71
+
In rare cases where you need to inspect spans directly in the Sentry dashboard, comment out the `transport` line in [`src/setup/telemetry/index.ts`](../src/setup/telemetry/index.ts):
This sends spans to the real Sentry project instead of the local console.
82
+
65
83
### Constants
66
84
67
85
Defined in `src/CONST/index.ts` under `CONST.TELEMETRY`:
@@ -181,6 +199,22 @@ Add metrics when:
181
199
- Debugging requires operation visibility
182
200
183
201
Don't add metrics for:
184
-
- Internal operations invisible to users
202
+
- Internal operations, invisible to users
185
203
- Operations already covered by parent spans
186
-
- Operations too granular to be actionable
204
+
- Operations too granular to be actionable
205
+
206
+
## Working with Sentry Dashboard
207
+
208
+
### Filtering Spans
209
+
210
+
When debugging our manual spans, always filter out canceled spans to avoid noise. Use the following query (you can copy & paste it into the filter bar):
0 commit comments