@sentry/react-native 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/RNSentry.podspec +9 -4
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/MapConverter.java +134 -0
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +103 -15
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +14 -2
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +13 -2
- package/dist/js/NativeRNSentry.d.ts +13 -4
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +1 -0
- package/dist/js/client.js.map +1 -1
- package/dist/js/integrations/devicecontext.js +5 -5
- package/dist/js/integrations/devicecontext.js.map +1 -1
- package/dist/js/integrations/index.d.ts +1 -0
- package/dist/js/integrations/index.d.ts.map +1 -1
- package/dist/js/integrations/index.js +1 -0
- package/dist/js/integrations/index.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +5 -0
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +31 -6
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/rewriteframes.d.ts +2 -0
- package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
- package/dist/js/integrations/rewriteframes.js +2 -2
- package/dist/js/integrations/rewriteframes.js.map +1 -1
- package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
- package/dist/js/integrations/sdkinfo.js +1 -2
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/profiling/cache.d.ts +9 -0
- package/dist/js/profiling/cache.d.ts.map +1 -0
- package/dist/js/profiling/cache.js +3 -0
- package/dist/js/profiling/cache.js.map +1 -0
- package/dist/js/profiling/convertHermesProfile.d.ts +27 -0
- package/dist/js/profiling/convertHermesProfile.d.ts.map +1 -0
- package/dist/js/profiling/convertHermesProfile.js +141 -0
- package/dist/js/profiling/convertHermesProfile.js.map +1 -0
- package/dist/js/profiling/hermes.d.ts +52 -0
- package/dist/js/profiling/hermes.d.ts.map +1 -0
- package/dist/js/profiling/hermes.js +35 -0
- package/dist/js/profiling/hermes.js.map +1 -0
- package/dist/js/profiling/integration.d.ts +36 -0
- package/dist/js/profiling/integration.d.ts.map +1 -0
- package/dist/js/profiling/integration.js +151 -0
- package/dist/js/profiling/integration.js.map +1 -0
- package/dist/js/profiling/types.d.ts +5 -0
- package/dist/js/profiling/types.d.ts.map +1 -0
- package/dist/js/profiling/types.js +2 -0
- package/dist/js/profiling/types.js.map +1 -0
- package/dist/js/profiling/utils.d.ts +26 -0
- package/dist/js/profiling/utils.d.ts.map +1 -0
- package/dist/js/profiling/utils.js +135 -0
- package/dist/js/profiling/utils.js.map +1 -0
- package/dist/js/sdk.d.ts.map +1 -1
- package/dist/js/sdk.js +6 -1
- package/dist/js/sdk.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +4 -2
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +36 -27
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +75 -13
- package/package.json +14 -13
- package/src/js/NativeRNSentry.ts +7 -4
- package/ts3.8/dist/js/NativeRNSentry.d.ts +13 -4
- package/ts3.8/dist/js/integrations/index.d.ts +1 -0
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +5 -0
- package/ts3.8/dist/js/integrations/rewriteframes.d.ts +2 -0
- package/ts3.8/dist/js/profiling/cache.d.ts +9 -0
- package/ts3.8/dist/js/profiling/convertHermesProfile.d.ts +27 -0
- package/ts3.8/dist/js/profiling/hermes.d.ts +52 -0
- package/ts3.8/dist/js/profiling/integration.d.ts +36 -0
- package/ts3.8/dist/js/profiling/types.d.ts +5 -0
- package/ts3.8/dist/js/profiling/utils.d.ts +26 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/ts3.8/dist/js/wrapper.d.ts +4 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { EventProcessor, Hub, Integration } from '@sentry/types';
|
|
2
|
+
export declare const MAX_PROFILE_DURATION_MS: number;
|
|
3
|
+
/**
|
|
4
|
+
* Profiling integration creates a profile for each transaction and adds it to the event envelope.
|
|
5
|
+
*
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export declare class HermesProfiling implements Integration {
|
|
9
|
+
/**
|
|
10
|
+
* @inheritDoc
|
|
11
|
+
*/
|
|
12
|
+
static id: string;
|
|
13
|
+
/**
|
|
14
|
+
* @inheritDoc
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
private _getCurrentHub?;
|
|
18
|
+
private _currentProfile;
|
|
19
|
+
private _currentProfileTimeout;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
setupOnce(_: (e: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
24
|
+
private _shouldStartProfiling;
|
|
25
|
+
/**
|
|
26
|
+
* Starts a new profile and links it to the transaction.
|
|
27
|
+
*/
|
|
28
|
+
private _startNewProfile;
|
|
29
|
+
/**
|
|
30
|
+
* Stops profiling and adds the profile to the queue to be processed on beforeEnvelope.
|
|
31
|
+
*/
|
|
32
|
+
private _finishCurrentProfile;
|
|
33
|
+
private _createProfileEventFor;
|
|
34
|
+
private _clearCurrentProfileTimeout;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Envelope, Event, Profile } from '@sentry/types';
|
|
2
|
+
import type { RawThreadCpuProfile } from './types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export declare function isValidProfile(profile: RawThreadCpuProfile): profile is RawThreadCpuProfile & {
|
|
7
|
+
profile_id: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Finds transactions with profile_id context in the envelope
|
|
11
|
+
* @param envelope
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function findProfiledTransactionsFromEnvelope(envelope: Envelope): Event[];
|
|
15
|
+
/**
|
|
16
|
+
* Creates a profiling envelope item, if the profile does not pass validation, returns null.
|
|
17
|
+
* @param event
|
|
18
|
+
* @returns {Profile | null}
|
|
19
|
+
*/
|
|
20
|
+
export declare function createProfilingEvent(profile: RawThreadCpuProfile, event: Event): Profile | null;
|
|
21
|
+
/**
|
|
22
|
+
* Adds items to envelope if they are not already present - mutates the envelope.
|
|
23
|
+
* @param envelope
|
|
24
|
+
*/
|
|
25
|
+
export declare function addProfilesToEnvelope(envelope: Envelope, profiles: Profile[]): Envelope;
|
|
26
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -2,6 +2,7 @@ import type { Breadcrumb, Envelope, EnvelopeItem, Event, Package, SeverityLevel,
|
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import type { NativeAppStartResponse, NativeDeviceContextsResponse, NativeFramesResponse, NativeReleaseResponse, Spec } from './NativeRNSentry';
|
|
4
4
|
import type { ReactNativeClientOptions } from './options';
|
|
5
|
+
import type * as Hermes from './profiling/hermes';
|
|
5
6
|
export interface Screenshot {
|
|
6
7
|
data: Uint8Array;
|
|
7
8
|
contentType: string;
|
|
@@ -22,14 +23,13 @@ interface SentryNativeWrapper {
|
|
|
22
23
|
[key: string]: string;
|
|
23
24
|
};
|
|
24
25
|
_isModuleLoaded(module: Spec | undefined): module is Spec;
|
|
25
|
-
_getBreadcrumbs(event: Event): Breadcrumb[] | undefined;
|
|
26
26
|
isNativeAvailable(): boolean;
|
|
27
27
|
initNativeSdk(options: Partial<ReactNativeClientOptions>): PromiseLike<boolean>;
|
|
28
28
|
closeNativeSdk(): PromiseLike<void>;
|
|
29
29
|
sendEnvelope(envelope: Envelope): Promise<void>;
|
|
30
30
|
captureScreenshot(): Promise<Screenshot[] | null>;
|
|
31
31
|
fetchNativeRelease(): PromiseLike<NativeReleaseResponse>;
|
|
32
|
-
fetchNativeDeviceContexts(): PromiseLike<NativeDeviceContextsResponse>;
|
|
32
|
+
fetchNativeDeviceContexts(): PromiseLike<NativeDeviceContextsResponse | null>;
|
|
33
33
|
fetchNativeAppStart(): PromiseLike<NativeAppStartResponse | null>;
|
|
34
34
|
fetchNativeFrames(): PromiseLike<NativeFramesResponse | null>;
|
|
35
35
|
fetchNativeSdkInfo(): PromiseLike<Package | null>;
|
|
@@ -46,6 +46,8 @@ interface SentryNativeWrapper {
|
|
|
46
46
|
nativeCrash(): void;
|
|
47
47
|
fetchModules(): Promise<Record<string, string> | null>;
|
|
48
48
|
fetchViewHierarchy(): PromiseLike<Uint8Array | null>;
|
|
49
|
+
startProfiling(): boolean;
|
|
50
|
+
stopProfiling(): Hermes.Profile | null;
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
53
|
* Our internal interface for calling native functions
|