Skip to content

Commit 8e5ad0f

Browse files
committed
Update docs for skeleton span removal
1 parent 1c96128 commit 8e5ad0f

3 files changed

Lines changed: 3 additions & 30 deletions

File tree

contributingGuides/LOADING_STATE.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ const shouldShowLoadingIndicator = isAppLoadPending && !isOffline;
5757

5858
// ...
5959
{shouldShowLoadingIndicator ? (
60-
<ActivityIndicator
61-
reasonAttributes={{context: 'WorkspacesListPage', isOffline} satisfies SkeletonSpanReasonAttributes}
62-
/>
60+
<ActivityIndicator />
6361
) : (
6462
<WorkspaceListTable workspaces={workspaceRows} />
6563
)}
@@ -172,5 +170,3 @@ Keep `HAS_LOADED_APP` and the cold-restart fallback. The queue hook is the prima
172170
Report skeleton consumers use `useIsReportLoadPending(reportID)` wherever pending `OpenReport` work is part of the loading decision. They keep existing readiness checks, including `hasOnceLoadedReportActions`, report data completeness, and offline behavior. A stranded `isLoadingInitialReportActions` value without a matching queue request or in-memory latch must not show a skeleton.
173171

174172
Do not remove the legacy fields as part of this migration. `IS_LOADING_APP` and report loading state still support recovery, report positioning, navigation guards, and the deferred-flush bridge. Skeleton consumers should use the public hooks. Full flag deletion is outside this plan.
175-
176-
**Keep telemetry for a terminal request that still shows a skeleton.** `useSkeletonSpan` in `src/libs/telemetry/useSkeletonSpan.ts` and the `reasonAttributes` prop on `ActivityIndicator` record a span while a skeleton is mounted. They flag skeletons that remain past `CONST.TELEMETRY.CONFIG.SKELETON_MIN_DURATION`. Pass `SkeletonSpanReasonAttributes` with a `context` for the screen and any state that explains the render, such as `isOffline`. This makes the case queryable under the `skeleton.` namespace.

contributingGuides/OBSERVABILITY.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,6 @@ Minimum set of parameters required to create a span:
3737

3838
**Span configuration**: Set of parameters passed to `Sentry.startInteractiveSpan`. See the [Sentry docs](https://docs.sentry.io/platforms/react-native/tracing/instrumentation/custom-instrumentation/#starting-inactive-spans-startinactivespan) for more details.
3939

40-
Additional parameters can be added as a config object (third parameter):
41-
42-
**Minimum Duration**: what's the minimum duration of a span. Spans shorter than this duration are discarded.
43-
44-
```typescript
45-
startSpan(CONST.TELEMETRY.SPAN_SKELETON, {
46-
name: CONST.TELEMETRY.SPAN_SKELETON,
47-
op: CONST.TELEMETRY.SPAN_SKELETON,
48-
}, {minDuration: CONST.TELEMETRY.CONFIG.SKELETON_MIN_DURATION});
49-
```
50-
5140
#### Finishing a Span
5241

5342
There are two ways to finish a span:
@@ -72,7 +61,7 @@ Defined in `src/CONST/index.ts` under `CONST.TELEMETRY`:
7261
- Span names: `SPAN_OPEN_REPORT`, `SPAN_SEND_MESSAGE`
7362
- Tag names: `TAGS.ACTIVE_POLICY`, `TAGS.AUTHENTICATION_ERROR_TYPE`
7463
- Attribute names: `ATTRIBUTE_REPORT_ID`, `ATTRIBUTE_MESSAGE_LENGTH`
75-
- Configuration: `CONFIG.SKELETON_MIN_DURATION`
64+
- Configuration: `CONFIG.MEMORY_TRACKING_INTERVAL`
7665

7766
#### Naming Conventions
7867

@@ -86,7 +75,7 @@ Defined in `src/CONST/index.ts` under `CONST.TELEMETRY`:
8675
### Middleware
8776

8877
Process events before sending to Sentry:
89-
- **minDurationFilter** - Discards spans shorter than a specified duration
78+
- **maxDurationFilter** - Discards spans longer than a specified duration
9079
- **scopeTagsEnricher** - Adds cohort and policy tags
9180
- **emailDomainFilter** - Removes accounts we don't want to send telemetry for
9281

@@ -115,7 +104,6 @@ Error conditions tracked for trend analysis:
115104

116105
- **ANRs**: number of "Application Not Responding" errors
117106
- **404 pages**: number of user actions other than deep links that result in 404
118-
- **Infinite skeletons**: Skeleton visible 10+ seconds
119107
- **Authentication failures**: number of authentication errors other than wrong credentials
120108

121109
### Feature Health

contributingGuides/OBSERVABILITY_METRICS.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -172,17 +172,6 @@ This document lists all implemented telemetry metrics in the Expensify App.
172172
**End**: Immediately after start (tracking occurrence, not duration) ([`src/libs/telemetry/useAbsentPageSpan.ts`](https://github.com/Expensify/App/blob/8f123f449f1a4533830b18a1040c9a5f1949821d/src/libs/telemetry/useAbsentPageSpan.ts#L39))
173173
**Attributes**: `url`, `navigationSource: 'deeplink' | 'button'`
174174

175-
### Infinite Skeletons
176-
177-
**Constant**: `CONST.TELEMETRY.SPAN_SKELETON`
178-
**Sentry Name**: `ManualSkeleton`
179-
**Threshold**: 10s minimum duration (only sent if visible 10+ seconds)
180-
**What's Measured**: Number of skeleton components visible longer than expected
181-
**Start**: Skeleton component mounted ([`src/libs/telemetry/useSkeletonSpan.ts`](https://github.com/Expensify/App/blob/8f123f449f1a4533830b18a1040c9a5f1949821d/src/libs/telemetry/useSkeletonSpan.ts#L13))
182-
**End**: Component unmounts ([`src/libs/telemetry/useSkeletonSpan.ts`](https://github.com/Expensify/App/blob/8f123f449f1a4533830b18a1040c9a5f1949821d/src/libs/telemetry/useSkeletonSpan.ts#L24))
183-
**Span ID**: `${CONST.TELEMETRY.SPAN_SKELETON}_${component}_${reactId}`
184-
**Minimum Duration**: `CONST.TELEMETRY.CONFIG.SKELETON_MIN_DURATION` (10s)
185-
186175
### Authentication Failures
187176

188177
**Constants**: `CONST.TELEMETRY.TAGS.AUTHENTICATION_FUNCTION`, `CONST.TELEMETRY.TAGS.AUTHENTICATION_ERROR_TYPE`, `CONST.TELEMETRY.TAGS.AUTHENTICATION_JSON_CODE` ([`src/CONST/index.ts`](https://github.com/Expensify/App/blob/8f123f449f1a4533830b18a1040c9a5f1949821d/src/CONST/index.ts#L1700-L1702))

0 commit comments

Comments
 (0)