Skip to content

Commit 150477a

Browse files
rebase: network-spans branch with dev branch
1 parent 173097e commit 150477a

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

examples/default/ios/Podfile.lock

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,7 @@ DEPENDENCIES:
17681768
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
17691769
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
17701770
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
1771+
- Instabug (from `https://ios-releases.instabug.com/custom/feature-support_cp_network_filtering_obfuscation-base/14.1.0/Instabug.podspec`)
17711772
- instabug-reactnative-ndk (from `../node_modules/instabug-reactnative-ndk`)
17721773
- OCMock
17731774
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
@@ -1847,7 +1848,6 @@ SPEC REPOS:
18471848
trunk:
18481849
- Google-Maps-iOS-Utils
18491850
- GoogleMaps
1850-
- Instabug
18511851
- OCMock
18521852
- SocketRocket
18531853

@@ -1865,6 +1865,8 @@ EXTERNAL SOURCES:
18651865
hermes-engine:
18661866
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
18671867
:tag: hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b
1868+
Instabug:
1869+
:podspec: https://ios-releases.instabug.com/custom/feature-support_cp_network_filtering_obfuscation-base/14.1.0/Instabug.podspec
18681870
instabug-reactnative-ndk:
18691871
:path: "../node_modules/instabug-reactnative-ndk"
18701872
RCT-Folly:
@@ -2017,7 +2019,7 @@ SPEC CHECKSUMS:
20172019
Google-Maps-iOS-Utils: f77eab4c4326d7e6a277f8e23a0232402731913a
20182020
GoogleMaps: 032f676450ba0779bd8ce16840690915f84e57ac
20192021
hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0
2020-
Instabug: 8cbca8974168c815658133e2813f5ac3a36f8e20
2022+
Instabug: afe23192d5487aa2afd4f3baa76913cc2c421cda
20212023
instabug-reactnative-ndk: d765ac289d56e8896398d02760d9abf2562fc641
20222024
OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74
20232025
RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740
@@ -2090,8 +2092,8 @@ SPEC CHECKSUMS:
20902092
RNSVG: 8b1a777d54096b8c2a0fd38fc9d5a454332bbb4d
20912093
RNVectorIcons: 6382277afab3c54658e9d555ee0faa7a37827136
20922094
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
2093-
Yoga: 055f92ad73f8c8600a93f0e25ac0b2344c3b07e6
2095+
Yoga: aa3df615739504eebb91925fc9c58b4922ea9a08
20942096

2095-
PODFILE CHECKSUM: 63bf073bef3872df95ea45e7c9c023a331ebb3c3
2097+
PODFILE CHECKSUM: f382faa8fee81f859a17db3fbe928b4f7e7f2ea0
20962098

2097-
COCOAPODS: 1.14.0
2099+
COCOAPODS: 1.15.2

examples/default/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import React, { useEffect, useState } from 'react';
22
import { ActivityIndicator, StyleSheet } from 'react-native';
33

44
import { GestureHandlerRootView } from 'react-native-gesture-handler';
5-
import { NavigationContainer, useNavigationContainerRef } from "@react-navigation/native";
5+
import { NavigationContainer, useNavigationContainerRef } from '@react-navigation/native';
6+
import type { SessionMetadata } from 'instabug-reactnative';
67
import Instabug, {
78
CrashReporting,
89
InvocationEvent,
10+
LaunchType,
911
LogLevel,
1012
NetworkInterceptionMode,
1113
NetworkLogger,
1214
ReproStepsMode,
1315
SessionReplay,
14-
LaunchType,
1516
} from 'instabug-reactnative';
16-
import type { SessionMetadata } from 'instabug-reactnative';
1717
import { NativeBaseProvider } from 'native-base';
1818

1919
import { RootTabNavigator } from './navigation/RootTab';
@@ -71,7 +71,7 @@ export const App: React.FC = () => {
7171
});
7272
// NetworkLogger.setRequestFilterExpression('false');
7373
});
74-
}, []);
74+
});
7575

7676
useEffect(() => {
7777
const unregisterListener = Instabug.setNavigationListener(navigationRef);

examples/default/src/screens/apm/NetworkScreen.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { CustomButton } from '../../components/CustomButton';
1010
import axios from 'axios';
1111
import type { HomeStackParamList } from '../../navigation/HomeStack';
1212
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
13-
import { ListTile } from '../../components/ListTile';
1413

1514
export const NetworkScreen: React.FC<
1615
NativeStackScreenProps<HomeStackParamList, 'NetworkTraces'>
@@ -198,11 +197,11 @@ export const NetworkScreen: React.FC<
198197
title="Go HTTP Screen"
199198
/>
200199

201-
<ListTile
200+
<CustomButton
202201
title="Simulate Network Request With Header"
203202
onPress={() => simulateNetworkRequest()}
204203
/>
205-
<ListTile
204+
<CustomButton
206205
title="Simulate Network Request"
207206
onPress={() => simulateNetworkRequestWithoutHeader()}
208207
/>

test/modules/Instabug.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ import '../mocks/mockNetworkLogger';
33

44
import { findNodeHandle, Platform, processColor } from 'react-native';
55
import type { NavigationContainerRefWithCurrent } from '@react-navigation/native'; // Import the hook
6-
76
import { mocked } from 'jest-mock';
87
import waitForExpect from 'wait-for-expect';
98

109
import Report from '../../src/models/Report';
1110
import * as Instabug from '../../src/modules/Instabug';
1211
import * as NetworkLogger from '../../src/modules/NetworkLogger';
13-
import { NativeEvents, NativeInstabug, emitter } from '../../src/native/NativeInstabug';
12+
import { emitter, NativeEvents, NativeInstabug } from '../../src/native/NativeInstabug';
1413
import {
1514
ColorTheme,
1615
type InstabugConfig,
@@ -24,7 +23,6 @@ import {
2423
} from '../../src';
2524
import InstabugUtils from '../../src/utils/InstabugUtils';
2625
import type { FeatureFlag } from '../../src/models/FeatureFlag';
27-
import InstabugConstants from '../../src/utils/InstabugConstants';
2826
import { Logger } from '../../src/utils/logger';
2927
import { NativeNetworkLogger } from '../../src/native/NativeNetworkLogger';
3028
import InstabugConstants from '../../src/utils/InstabugConstants';

test/modules/NetworkLogger.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@ describe('_registerNetworkLogsListener', () => {
399399
startTime: 0,
400400
serverErrorMessage: '',
401401
requestContentType: '',
402+
isW3cHeaderFound: true,
403+
networkStartTimeInSeconds: 0,
404+
partialId: 0,
405+
w3cCaughtHeader: '',
406+
w3cGeneratedHeader: '',
402407
};
403408

404409
expect(handlerMock).toHaveBeenCalledWith(expectedNetworkData);

test/utils/InstabugUtils.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ describe('test registerNetworkLogsListener usage', () => {
389389
startTime: 0,
390390
serverErrorMessage: '',
391391
requestContentType: 'application/json',
392+
isW3cHeaderFound: true,
393+
networkStartTimeInSeconds: 0,
394+
partialId: 0,
395+
w3cCaughtHeader: '',
396+
w3cGeneratedHeader: '',
392397
};
393398

394399
it('registerObfuscationListener should call NetworkLogger.registerNetworkLogsListener() with NetworkListenerType = NetworkListenerType.obfuscation', () => {

0 commit comments

Comments
 (0)