Skip to content

Commit 630559a

Browse files
committed
Remove infinite-skeleton Sentry span tracking
1 parent ec619e1 commit 630559a

301 files changed

Lines changed: 251 additions & 2028 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎src/CONST/index.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,6 @@ const CONST = {
22112211
SPAN_GEOLOCATION_WAIT: 'ManualGeolocationWait',
22122212
SPAN_SEND_MESSAGE: 'ManualSendMessage',
22132213
SPAN_NOT_FOUND_PAGE: 'ManualNotFoundPage',
2214-
SPAN_SKELETON: 'ManualSkeleton',
22152214
SPAN_ODOMETER_TO_CONFIRMATION: 'ManualOdometerToConfirmation',
22162215
SPAN_ODOMETER_IMAGE_STITCH: 'ManualOdometerImageStitch',
22172216
SPAN_ODOMETER_IMAGE_CAPTURE: 'ManualOdometerImageCapture',
@@ -2255,7 +2254,6 @@ const CONST = {
22552254
ATTRIBUTE_CANCELED_BY_SKELETON: 'canceled_by_skeleton',
22562255
ATTRIBUTE_ROUTE_FROM: 'route_from',
22572256
ATTRIBUTE_ROUTE_TO: 'route_to',
2258-
ATTRIBUTE_MIN_DURATION: 'min_duration',
22592257
ATTRIBUTE_FINISHED_MANUALLY: 'finished_manually',
22602258
ATTRIBUTE_IS_WARM: 'is_warm',
22612259
ATTRIBUTE_LAZY_TAB_FALLBACK_SHOWN: 'lazy_tab_fallback_shown',
@@ -2266,7 +2264,6 @@ const CONST = {
22662264
// report list, so durations that include the openApp wait can be excluded from render measurements.
22672265
ATTRIBUTE_SKELETON_SHOWN: 'skeleton_shown',
22682266
ATTRIBUTE_WAS_LIST_EMPTY: 'was_list_empty',
2269-
ATTRIBUTE_SKELETON_PREFIX: 'skeleton.',
22702267
ATTRIBUTE_SCENARIO: 'scenario',
22712268
// Start type stamped on the navigate-to-reports spans: cold, warm_first, or warm_subsequent.
22722269
ATTRIBUTE_START_TYPE: 'start_type',
@@ -2381,10 +2378,7 @@ const CONST = {
23812378
WARM_SUBSEQUENT: 'warm_subsequent',
23822379
UNKNOWN: 'unknown',
23832380
},
2384-
// Event names
2385-
EVENT_SKELETON_ATTRIBUTES_UPDATE: 'skeleton_attributes_updated',
23862381
CONFIG: {
2387-
SKELETON_MIN_DURATION: 10_000,
23882382
MEMORY_TRACKING_INTERVAL: 2 * 60 * 1000,
23892383

23902384
// Web Memory Thresholds (% of jsHeapSizeLimit)

‎src/components/AccountSwitcherSkeletonView/index.tsx‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import useStyleUtils from '@hooks/useStyleUtils';
55
import useTheme from '@hooks/useTheme';
66
import useThemeStyles from '@hooks/useThemeStyles';
77

8-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
9-
import useSkeletonSpan from '@libs/telemetry/useSkeletonSpan';
10-
118
import CONST from '@src/CONST';
129

1310
import type {StyleProp, ViewStyle} from 'react-native';
@@ -29,16 +26,12 @@ type AccountSwitcherSkeletonViewProps = {
2926

3027
/** Additional styles for the skeleton view */
3128
style?: StyleProp<ViewStyle>;
32-
33-
/** Reason attributes for skeleton span telemetry */
34-
reasonAttributes: SkeletonSpanReasonAttributes;
3529
};
3630

37-
function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.AVATAR_SIZE.DEFAULT, width, style, reasonAttributes}: AccountSwitcherSkeletonViewProps) {
31+
function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.AVATAR_SIZE.DEFAULT, width, style}: AccountSwitcherSkeletonViewProps) {
3832
const theme = useTheme();
3933
const styles = useThemeStyles();
4034
const StyleUtils = useStyleUtils();
41-
useSkeletonSpan('AccountSwitcherSkeletonView', reasonAttributes);
4235
const avatarPlaceholderSize = StyleUtils.getAvatarSize(avatarSize);
4336
const avatarPlaceholderRadius = avatarPlaceholderSize / 2;
4437
const startPositionX = avatarPlaceholderRadius;

‎src/components/ActivityIndicator.tsx‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import useTheme from '@hooks/useTheme';
22

33
import logAppStateOnLongLoading from '@libs/AppState';
44
import type {ExtraLoadingContext} from '@libs/AppState';
5-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
6-
import useSkeletonSpan from '@libs/telemetry/useSkeletonSpan';
75

86
import CONST from '@src/CONST';
97

@@ -22,14 +20,10 @@ type ActivityIndicatorProps = RNActivityIndicatorProps & {
2220

2321
/** Extra loading context to be passed to the logAppStateOnLongLoading function */
2422
extraLoadingContext?: ExtraLoadingContext;
25-
26-
/** Reason attributes for skeleton span telemetry */
27-
reasonAttributes: SkeletonSpanReasonAttributes;
2823
};
2924

30-
function ActivityIndicator({timeout = CONST.TIMING.ACTIVITY_INDICATOR_TIMEOUT, extraLoadingContext, reasonAttributes, ...rest}: ActivityIndicatorProps) {
25+
function ActivityIndicator({timeout = CONST.TIMING.ACTIVITY_INDICATOR_TIMEOUT, extraLoadingContext, ...rest}: ActivityIndicatorProps) {
3126
const theme = useTheme();
32-
useSkeletonSpan('ActivityIndicator', reasonAttributes);
3327

3428
useEffect(() => {
3529
const timeoutId = setTimeout(() => {

‎src/components/AddPlaidBankAccount.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import useThemeStyles from '@hooks/useThemeStyles';
77
import {handlePlaidError, openPlaidBankAccountSelector, openPlaidBankLogin, setPlaidEvent} from '@libs/actions/BankAccounts';
88
import KeyboardShortcut from '@libs/KeyboardShortcut';
99
import Log from '@libs/Log';
10-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
1110

1211
import {handleRestrictedEvent} from '@userActions/App';
1312

@@ -249,13 +248,9 @@ function AddPlaidBankAccount({
249248
}
250249

251250
if (plaidData?.isLoading) {
252-
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'AddPlaidBankAccount', isLoading: !!plaidData.isLoading};
253251
return (
254252
<View style={[styles.flex1, styles.alignItemsCenter, styles.justifyContentCenter]}>
255-
<ActivityIndicator
256-
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
257-
reasonAttributes={reasonAttributes}
258-
/>
253+
<ActivityIndicator size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} />
259254
</View>
260255
);
261256
}

‎src/components/AddToWalletButton/index.native.tsx‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import useThemeStyles from '@hooks/useThemeStyles';
88
import {getPaymentMethods} from '@libs/actions/PaymentMethods';
99
import getPlatform from '@libs/getPlatform';
1010
import Log from '@libs/Log';
11-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
1211
import {checkIfWalletIsAvailable, handleAddCardToWallet, isCardInWallet} from '@libs/Wallet/index';
1312

1413
import CONST from '@src/CONST';
@@ -98,13 +97,7 @@ function AddToWalletButton({card, cardHolderName, cardDescription, style}: AddTo
9897
}
9998

10099
if (isLoading) {
101-
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'AddToWalletButton', isLoading};
102-
return (
103-
<ActivityIndicator
104-
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
105-
reasonAttributes={reasonAttributes}
106-
/>
107-
);
100+
return <ActivityIndicator size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} />;
108101
}
109102

110103
if (isInWallet) {

‎src/components/AddressSearch/index.tsx‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {getCommandURL} from '@libs/ApiUtils';
1616
import getCurrentPosition from '@libs/getCurrentPosition';
1717
import type {GeolocationErrorCodeType} from '@libs/getCurrentPosition/getCurrentPosition.types';
1818
import {getAddressComponents, getPlaceAutocompleteTerms} from '@libs/GooglePlacesUtils';
19-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
2019

2120
import variables from '@styles/variables';
2221

@@ -81,7 +80,6 @@ function AddressSearchListEmptyComponent({searchValue, onEmptyChange}: {searchVa
8180

8281
function AddressSearchListLoader({onLoadingChange}: {onLoadingChange: (isLoading: boolean) => void}) {
8382
const styles = useThemeStyles();
84-
const reasonAttributes: SkeletonSpanReasonAttributes = {context: 'AddressSearch.listLoader'};
8583

8684
useEffect(() => {
8785
onLoadingChange(true);
@@ -90,7 +88,7 @@ function AddressSearchListLoader({onLoadingChange}: {onLoadingChange: (isLoading
9088

9189
return (
9290
<View style={[styles.pv4]}>
93-
<ActivityIndicator reasonAttributes={reasonAttributes} />
91+
<ActivityIndicator />
9492
</View>
9593
);
9694
}
@@ -392,11 +390,6 @@ function AddressSearch({
392390

393391
const listLoader = useMemo(() => <AddressSearchListLoader onLoadingChange={setIsLoadingResults} />, []);
394392

395-
const fetchingLocationReasonAttributes: SkeletonSpanReasonAttributes = {
396-
context: 'AddressSearch.isFetchingCurrentLocation',
397-
isFetchingCurrentLocation,
398-
};
399-
400393
return (
401394
/*
402395
* The GooglePlacesAutocomplete component uses a VirtualizedList internally,
@@ -538,10 +531,7 @@ function AddressSearch({
538531
</ScrollView>
539532
{isFetchingCurrentLocation && (
540533
<View style={[StyleSheet.absoluteFill, styles.fullScreenLoading, styles.w100]}>
541-
<ActivityIndicator
542-
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
543-
reasonAttributes={fetchingLocationReasonAttributes}
544-
/>
534+
<ActivityIndicator size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} />
545535
</View>
546536
)}
547537
</>

‎src/components/Attachments/AttachmentCarousel/index.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,7 @@ function AttachmentCarousel({
108108
if (page == null) {
109109
return (
110110
<View style={[styles.flex1, styles.attachmentCarouselContainer, styles.fullScreenLoading]}>
111-
<ActivityIndicator
112-
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
113-
reasonAttributes={{context: 'AttachmentCarousel'}}
114-
/>
111+
<ActivityIndicator size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE} />
115112
</View>
116113
);
117114
}

‎src/components/Attachments/AttachmentView/DefaultAttachmentView/index.tsx‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import useLocalize from '@hooks/useLocalize';
88
import useTheme from '@hooks/useTheme';
99
import useThemeStyles from '@hooks/useThemeStyles';
1010

11-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
12-
1311
import type IconAsset from '@src/types/utils/IconAsset';
1412

1513
import type {StyleProp, ViewStyle} from 'react-native';
@@ -44,11 +42,6 @@ function DefaultAttachmentView({fileName = '', shouldShowLoadingSpinnerIcon = fa
4442
const theme = useTheme();
4543
const styles = useThemeStyles();
4644
const {translate} = useLocalize();
47-
const reasonAttributes: SkeletonSpanReasonAttributes = {
48-
context: 'DefaultAttachmentView',
49-
shouldShowLoadingSpinnerIcon,
50-
isUploading,
51-
};
5245

5346
return (
5447
<View style={[styles.defaultAttachmentView, containerStyles]}>
@@ -76,7 +69,6 @@ function DefaultAttachmentView({fileName = '', shouldShowLoadingSpinnerIcon = fa
7669
<ActivityIndicator
7770
color={theme.textSupporting}
7871
testID="attachment-loading-spinner"
79-
reasonAttributes={reasonAttributes}
8072
/>
8173
</Tooltip>
8274
</View>

‎src/components/AvatarCropModal/AvatarCropView.tsx‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ import useThemeStyles from '@hooks/useThemeStyles';
1616

1717
import cropOrRotateImage from '@libs/cropOrRotateImage';
1818
import type {CustomRNImageManipulatorResult} from '@libs/cropOrRotateImage/types';
19-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
2019

2120
import CONST from '@src/CONST';
2221
import type IconAsset from '@src/types/utils/IconAsset';
2322

2423
import type {LayoutChangeEvent} from 'react-native';
2524
import type {GestureUpdateEvent, PanGestureChangeEventPayload, PanGestureHandlerEventPayload} from 'react-native-gesture-handler';
2625

27-
import React, {useCallback, useEffect, useMemo, useState} from 'react';
26+
import React, {useCallback, useEffect, useState} from 'react';
2827
import {View} from 'react-native';
2928
import {Gesture, GestureHandlerRootView} from 'react-native-gesture-handler';
3029
import ImageSize from 'react-native-image-size';
@@ -333,15 +332,6 @@ function AvatarCropView({imageUri = '', imageName = '', imageType = '', onClose,
333332
updateImageOffset(newX, newY);
334333
};
335334

336-
const reasonAttributes = useMemo<SkeletonSpanReasonAttributes>(
337-
() => ({
338-
context: 'AvatarCropModal',
339-
isImageInitialized,
340-
isImageContainerInitialized,
341-
}),
342-
[isImageInitialized, isImageContainerInitialized],
343-
);
344-
345335
return (
346336
<ScreenWrapper
347337
style={styles.pb0}
@@ -364,7 +354,6 @@ function AvatarCropView({imageUri = '', imageName = '', imageType = '', onClose,
364354
<ActivityIndicator
365355
style={styles.flex1}
366356
size={CONST.ACTIVITY_INDICATOR_SIZE.LARGE}
367-
reasonAttributes={reasonAttributes}
368357
/>
369358
) : (
370359
<>

‎src/components/AvatarSkeleton.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import useStyleUtils from '@hooks/useStyleUtils';
22
import useTheme from '@hooks/useTheme';
33

4-
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
5-
import useSkeletonSpan from '@libs/telemetry/useSkeletonSpan';
6-
74
import CONST from '@src/CONST';
85

96
import type {ValueOf} from 'type-fest';
@@ -15,12 +12,10 @@ import SkeletonViewContentLoader from './SkeletonViewContentLoader';
1512

1613
type AvatarSkeletonProps = {
1714
size?: ValueOf<typeof CONST.AVATAR_SIZE>;
18-
reasonAttributes: SkeletonSpanReasonAttributes;
1915
};
2016

21-
function AvatarSkeleton({size = CONST.AVATAR_SIZE.SMALL, reasonAttributes}: AvatarSkeletonProps) {
17+
function AvatarSkeleton({size = CONST.AVATAR_SIZE.SMALL}: AvatarSkeletonProps) {
2218
const theme = useTheme();
23-
useSkeletonSpan('AvatarSkeleton', reasonAttributes);
2419
const StyleUtils = useStyleUtils();
2520
const avatarSize = StyleUtils.getAvatarSize(size);
2621
const skeletonCircleRadius = avatarSize / 2;

0 commit comments

Comments
 (0)