@sentry/react-native 5.23.0-alpha.1 → 5.23.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 +50 -48
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +1 -54
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +0 -10
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +0 -10
- package/dist/js/NativeRNSentry.d.ts +0 -2
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/client.d.ts +0 -8
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +3 -19
- package/dist/js/client.js.map +1 -1
- package/dist/js/index.d.ts +5 -3
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +5 -3
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts +8 -60
- package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
- package/dist/js/integrations/debugsymbolicator.js +137 -209
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/debugsymbolicatorutils.d.ts +18 -0
- package/dist/js/integrations/debugsymbolicatorutils.d.ts.map +1 -0
- package/dist/js/integrations/debugsymbolicatorutils.js +70 -0
- package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -0
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +24 -49
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/devicecontext.d.ts +8 -15
- package/dist/js/integrations/devicecontext.d.ts.map +1 -1
- package/dist/js/integrations/devicecontext.js +74 -74
- package/dist/js/integrations/devicecontext.js.map +1 -1
- package/dist/js/integrations/eventorigin.d.ts +8 -15
- package/dist/js/integrations/eventorigin.d.ts.map +1 -1
- package/dist/js/integrations/eventorigin.js +17 -17
- package/dist/js/integrations/eventorigin.js.map +1 -1
- package/dist/js/integrations/expocontext.d.ts +8 -15
- package/dist/js/integrations/expocontext.d.ts.map +1 -1
- package/dist/js/integrations/expocontext.js +28 -32
- package/dist/js/integrations/expocontext.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +16 -0
- package/dist/js/integrations/exports.d.ts.map +1 -0
- package/dist/js/integrations/exports.js +16 -0
- package/dist/js/integrations/exports.js.map +1 -0
- package/dist/js/integrations/index.d.ts +4 -1
- package/dist/js/integrations/index.d.ts.map +1 -1
- package/dist/js/integrations/index.js +5 -1
- package/dist/js/integrations/index.js.map +1 -1
- package/dist/js/integrations/modulesloader.d.ts +8 -15
- package/dist/js/integrations/modulesloader.d.ts.map +1 -1
- package/dist/js/integrations/modulesloader.js +34 -31
- package/dist/js/integrations/modulesloader.js.map +1 -1
- package/dist/js/integrations/nativelinkederrors.d.ts +8 -51
- package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
- package/dist/js/integrations/nativelinkederrors.js +112 -124
- package/dist/js/integrations/nativelinkederrors.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +8 -54
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +109 -199
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts +27 -0
- package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts.map +1 -0
- package/dist/js/integrations/reactnativeerrorhandlersutils.js +77 -0
- package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -0
- package/dist/js/integrations/reactnativeinfo.d.ts +8 -15
- package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeinfo.js +51 -51
- package/dist/js/integrations/reactnativeinfo.js.map +1 -1
- package/dist/js/integrations/release.d.ts +8 -15
- package/dist/js/integrations/release.d.ts.map +1 -1
- package/dist/js/integrations/release.js +55 -57
- package/dist/js/integrations/release.js.map +1 -1
- package/dist/js/integrations/rewriteframes.js +2 -2
- package/dist/js/integrations/rewriteframes.js.map +1 -1
- package/dist/js/integrations/screenshot.d.ts +8 -23
- package/dist/js/integrations/screenshot.d.ts.map +1 -1
- package/dist/js/integrations/screenshot.js +31 -47
- package/dist/js/integrations/screenshot.js.map +1 -1
- package/dist/js/integrations/sdkinfo.d.ts +8 -16
- package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
- package/dist/js/integrations/sdkinfo.js +54 -41
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/integrations/spotlight.d.ts +10 -2
- package/dist/js/integrations/spotlight.d.ts.map +1 -1
- package/dist/js/integrations/spotlight.js +14 -9
- package/dist/js/integrations/spotlight.js.map +1 -1
- package/dist/js/integrations/viewhierarchy.d.ts +8 -18
- package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
- package/dist/js/integrations/viewhierarchy.js +46 -43
- package/dist/js/integrations/viewhierarchy.js.map +1 -1
- package/dist/js/options.d.ts +2 -24
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/profiling/integration.d.ts +8 -32
- package/dist/js/profiling/integration.d.ts.map +1 -1
- package/dist/js/profiling/integration.js +120 -119
- package/dist/js/profiling/integration.js.map +1 -1
- package/dist/js/tracing/nativeframes.d.ts +0 -4
- package/dist/js/tracing/nativeframes.d.ts.map +1 -1
- package/dist/js/tracing/nativeframes.js +14 -14
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/utils/environment.d.ts +0 -4
- package/dist/js/utils/environment.d.ts.map +1 -1
- package/dist/js/utils/environment.js +0 -8
- package/dist/js/utils/environment.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.d.ts.map +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +1 -7
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +0 -24
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +1 -47
- package/ios/RNSentryOnDrawReporter.h +23 -0
- package/ios/RNSentryOnDrawReporter.m +2 -17
- package/package.json +1 -9
- package/src/js/NativeRNSentry.ts +0 -2
- package/ts3.8/dist/js/NativeRNSentry.d.ts +0 -2
- package/ts3.8/dist/js/client.d.ts +0 -8
- package/ts3.8/dist/js/index.d.ts +5 -3
- package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +8 -60
- package/ts3.8/dist/js/integrations/debugsymbolicatorutils.d.ts +18 -0
- package/ts3.8/dist/js/integrations/devicecontext.d.ts +8 -15
- package/ts3.8/dist/js/integrations/eventorigin.d.ts +8 -15
- package/ts3.8/dist/js/integrations/expocontext.d.ts +8 -15
- package/ts3.8/dist/js/integrations/exports.d.ts +16 -0
- package/ts3.8/dist/js/integrations/index.d.ts +4 -1
- package/ts3.8/dist/js/integrations/modulesloader.d.ts +8 -15
- package/ts3.8/dist/js/integrations/nativelinkederrors.d.ts +8 -51
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +8 -54
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlersutils.d.ts +27 -0
- package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +8 -15
- package/ts3.8/dist/js/integrations/release.d.ts +8 -15
- package/ts3.8/dist/js/integrations/screenshot.d.ts +8 -23
- package/ts3.8/dist/js/integrations/sdkinfo.d.ts +8 -16
- package/ts3.8/dist/js/integrations/spotlight.d.ts +10 -2
- package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +8 -18
- package/ts3.8/dist/js/options.d.ts +2 -24
- package/ts3.8/dist/js/profiling/integration.d.ts +8 -32
- package/ts3.8/dist/js/tracing/nativeframes.d.ts +0 -4
- package/ts3.8/dist/js/utils/environment.d.ts +0 -4
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/ts3.8/dist/js/wrapper.d.ts +1 -7
- package/dist/js/integrations/mobilereplay.d.ts +0 -36
- package/dist/js/integrations/mobilereplay.d.ts.map +0 -1
- package/dist/js/integrations/mobilereplay.js +0 -97
- package/dist/js/integrations/mobilereplay.js.map +0 -1
- package/dist/js/utils/clientutils.d.ts +0 -8
- package/dist/js/utils/clientutils.d.ts.map +0 -1
- package/dist/js/utils/clientutils.js +0 -7
- package/dist/js/utils/clientutils.js.map +0 -1
- package/ts3.8/dist/js/integrations/mobilereplay.d.ts +0 -36
- package/ts3.8/dist/js/utils/clientutils.d.ts +0 -8
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
/* eslint-disable complexity */
|
|
2
|
-
import { HttpClient } from '@sentry/integrations';
|
|
3
|
-
import { Integrations as BrowserReactIntegrations, replayIntegration as browserReplayIntegration } from '@sentry/react';
|
|
4
|
-
import { HermesProfiling } from '../profiling/integration';
|
|
5
1
|
import { ReactNativeTracing } from '../tracing';
|
|
6
2
|
import { isExpoGo, notWeb } from '../utils/environment';
|
|
7
|
-
import {
|
|
8
|
-
import { DeviceContext } from './devicecontext';
|
|
9
|
-
import { EventOrigin } from './eventorigin';
|
|
10
|
-
import { ExpoContext } from './expocontext';
|
|
11
|
-
import { mobileReplayIntegration } from './mobilereplay';
|
|
12
|
-
import { ModulesLoader } from './modulesloader';
|
|
13
|
-
import { NativeLinkedErrors } from './nativelinkederrors';
|
|
14
|
-
import { ReactNativeErrorHandlers } from './reactnativeerrorhandlers';
|
|
15
|
-
import { ReactNativeInfo } from './reactnativeinfo';
|
|
16
|
-
import { Release } from './release';
|
|
3
|
+
import { breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, viewHierarchyIntegration, } from './exports';
|
|
17
4
|
import { createReactNativeRewriteFrames } from './rewriteframes';
|
|
18
|
-
import { Screenshot } from './screenshot';
|
|
19
|
-
import { SdkInfo } from './sdkinfo';
|
|
20
|
-
import { Spotlight } from './spotlight';
|
|
21
|
-
import { ViewHierarchy } from './viewhierarchy';
|
|
22
5
|
/**
|
|
23
6
|
* Returns the default ReactNative integrations based on the current environment.
|
|
24
7
|
*
|
|
@@ -29,42 +12,42 @@ import { ViewHierarchy } from './viewhierarchy';
|
|
|
29
12
|
export function getDefaultIntegrations(options) {
|
|
30
13
|
const integrations = [];
|
|
31
14
|
if (notWeb()) {
|
|
32
|
-
integrations.push(
|
|
15
|
+
integrations.push(reactNativeErrorHandlersIntegration({
|
|
33
16
|
patchGlobalPromise: options.patchGlobalPromise,
|
|
34
17
|
}));
|
|
35
|
-
integrations.push(
|
|
18
|
+
integrations.push(nativeLinkedErrorsIntegration());
|
|
36
19
|
}
|
|
37
20
|
else {
|
|
38
|
-
integrations.push(
|
|
39
|
-
integrations.push(
|
|
40
|
-
integrations.push(
|
|
21
|
+
integrations.push(browserApiErrorsIntegration());
|
|
22
|
+
integrations.push(browserGlobalHandlersIntegration());
|
|
23
|
+
integrations.push(browserLinkedErrorsIntegration());
|
|
41
24
|
}
|
|
42
25
|
// @sentry/react default integrations
|
|
43
|
-
integrations.push(
|
|
44
|
-
integrations.push(
|
|
45
|
-
integrations.push(
|
|
46
|
-
integrations.push(
|
|
47
|
-
integrations.push(
|
|
26
|
+
integrations.push(inboundFiltersIntegration());
|
|
27
|
+
integrations.push(functionToStringIntegration());
|
|
28
|
+
integrations.push(breadcrumbsIntegration());
|
|
29
|
+
integrations.push(dedupeIntegration());
|
|
30
|
+
integrations.push(httpContextIntegration());
|
|
48
31
|
// end @sentry/react-native default integrations
|
|
49
|
-
integrations.push(
|
|
50
|
-
integrations.push(
|
|
51
|
-
integrations.push(
|
|
52
|
-
integrations.push(
|
|
32
|
+
integrations.push(nativeReleaseIntegration());
|
|
33
|
+
integrations.push(eventOriginIntegration());
|
|
34
|
+
integrations.push(sdkInfoIntegration());
|
|
35
|
+
integrations.push(reactNativeInfoIntegration());
|
|
53
36
|
if (__DEV__ && notWeb()) {
|
|
54
|
-
integrations.push(
|
|
37
|
+
integrations.push(debugSymbolicatorIntegration());
|
|
55
38
|
}
|
|
56
39
|
integrations.push(createReactNativeRewriteFrames());
|
|
57
40
|
if (options.enableNative) {
|
|
58
|
-
integrations.push(
|
|
59
|
-
integrations.push(
|
|
41
|
+
integrations.push(deviceContextIntegration());
|
|
42
|
+
integrations.push(modulesLoaderIntegration());
|
|
60
43
|
if (options.attachScreenshot) {
|
|
61
|
-
integrations.push(
|
|
44
|
+
integrations.push(screenshotIntegration());
|
|
62
45
|
}
|
|
63
46
|
if (options.attachViewHierarchy) {
|
|
64
|
-
integrations.push(
|
|
47
|
+
integrations.push(viewHierarchyIntegration());
|
|
65
48
|
}
|
|
66
49
|
if (options._experiments && typeof options._experiments.profilesSampleRate === 'number') {
|
|
67
|
-
integrations.push(
|
|
50
|
+
integrations.push(hermesProfilingIntegration());
|
|
68
51
|
}
|
|
69
52
|
}
|
|
70
53
|
// hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present
|
|
@@ -77,24 +60,16 @@ export function getDefaultIntegrations(options) {
|
|
|
77
60
|
integrations.push(new ReactNativeTracing());
|
|
78
61
|
}
|
|
79
62
|
if (options.enableCaptureFailedRequests) {
|
|
80
|
-
integrations.push(
|
|
63
|
+
integrations.push(httpClientIntegration());
|
|
81
64
|
}
|
|
82
65
|
if (isExpoGo()) {
|
|
83
|
-
integrations.push(
|
|
66
|
+
integrations.push(expoContextIntegration());
|
|
84
67
|
}
|
|
85
68
|
if (options.enableSpotlight) {
|
|
86
|
-
integrations.push(
|
|
69
|
+
integrations.push(spotlightIntegration({
|
|
87
70
|
sidecarUrl: options.spotlightSidecarUrl,
|
|
88
71
|
}));
|
|
89
72
|
}
|
|
90
|
-
if ((options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||
|
|
91
|
-
(options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number')) {
|
|
92
|
-
integrations.push(notWeb() ? mobileReplayIntegration() : browserReplayIntegration());
|
|
93
|
-
if (!notWeb()) {
|
|
94
|
-
options.replaysOnErrorSampleRate = options._experiments.replaysOnErrorSampleRate;
|
|
95
|
-
options.replaysSessionSampleRate = options._experiments.replaysSessionSampleRate;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
73
|
return integrations;
|
|
99
74
|
}
|
|
100
75
|
//# sourceMappingURL=default.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,mCAAmC,EACnC,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAiC;IACtE,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,IAA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C,IAAI,OAAO,CAAC,gBAAgB,EAAE;YAC5B,YAAY,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC;SAC5C;QACD,IAAI,OAAO,CAAC,mBAAmB,EAAE;YAC/B,YAAY,CAAC,IAAI,CAAC,wBAAwB,EAAE,CAAC,CAAC;SAC/C;QACD,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,kBAAkB,KAAK,QAAQ,EAAE;YACvF,YAAY,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC,CAAC;SACjD;KACF;IAED,yGAAyG;IACzG,sEAAsE;IACtE,0DAA0D;IAC1D,MAAM,iBAAiB,GACrB,OAAO,CAAC,aAAa;QACrB,OAAO,OAAO,CAAC,gBAAgB,KAAK,QAAQ;QAC5C,OAAO,OAAO,CAAC,aAAa,KAAK,UAAU,CAAC;IAC9C,IAAI,iBAAiB,IAAI,OAAO,CAAC,4BAA4B,EAAE;QAC7D,YAAY,CAAC,IAAI,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;KAC7C;IACD,IAAI,OAAO,CAAC,2BAA2B,EAAE;QACvC,YAAY,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC;KAC5C;IAED,IAAI,QAAQ,EAAE,EAAE;QACd,YAAY,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC;KAC7C;IAED,IAAI,OAAO,CAAC,eAAe,EAAE;QAC3B,YAAY,CAAC,IAAI,CACf,oBAAoB,CAAC;YACnB,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC,CAAC,CACH,CAAC;KACH;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["import type { Integration } from '@sentry/types';\n\nimport type { ReactNativeClientOptions } from '../options';\nimport { ReactNativeTracing } from '../tracing';\nimport { isExpoGo, notWeb } from '../utils/environment';\nimport {\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n viewHierarchyIntegration,\n} from './exports';\nimport { createReactNativeRewriteFrames } from './rewriteframes';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (options._experiments && typeof options._experiments.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled =\n options.enableTracing ||\n typeof options.tracesSampleRate === 'number' ||\n typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(new ReactNativeTracing());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n if (isExpoGo()) {\n integrations.push(expoContextIntegration());\n }\n\n if (options.enableSpotlight) {\n integrations.push(\n spotlightIntegration({\n sidecarUrl: options.spotlightSidecarUrl,\n }),\n );\n }\n\n return integrations;\n}\n"]}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';
|
|
2
2
|
/** Load device context from native. */
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
16
|
-
}
|
|
3
|
+
export declare const deviceContextIntegration: () => IntegrationFnResult;
|
|
4
|
+
/**
|
|
5
|
+
* Load device context from native.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use `deviceContextIntegration()` instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DeviceContext: IntegrationClass<Integration>;
|
|
17
10
|
//# sourceMappingURL=devicecontext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devicecontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"devicecontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAS,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAU/F,uCAAuC;AACvC,eAAO,MAAM,wBAAwB,QAAO,mBAQ3C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,aAAa,+BAGQ,CAAC"}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
+
/* eslint-disable complexity */
|
|
3
|
+
import { convertIntegrationFnToClass } from '@sentry/core';
|
|
2
4
|
import { logger, severityLevelFromString } from '@sentry/utils';
|
|
3
5
|
import { AppState } from 'react-native';
|
|
4
6
|
import { breadcrumbFromObject } from '../breadcrumb';
|
|
5
7
|
import { NATIVE } from '../wrapper';
|
|
8
|
+
const INTEGRATION_NAME = 'DeviceContext';
|
|
6
9
|
/** Load device context from native. */
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
setupOnce(addGlobalEventProcessor, getCurrentHub) {
|
|
18
|
-
addGlobalEventProcessor((event) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
var _a;
|
|
20
|
-
const self = getCurrentHub().getIntegration(DeviceContext);
|
|
21
|
-
if (!self) {
|
|
22
|
-
return event;
|
|
23
|
-
}
|
|
24
|
-
let native = null;
|
|
25
|
-
try {
|
|
26
|
-
native = yield NATIVE.fetchNativeDeviceContexts();
|
|
27
|
-
}
|
|
28
|
-
catch (e) {
|
|
29
|
-
logger.log(`Failed to get device context from native: ${e}`);
|
|
30
|
-
}
|
|
31
|
-
if (!native) {
|
|
32
|
-
return event;
|
|
33
|
-
}
|
|
34
|
-
const nativeUser = native.user;
|
|
35
|
-
if (!event.user && nativeUser) {
|
|
36
|
-
event.user = nativeUser;
|
|
37
|
-
}
|
|
38
|
-
let nativeContexts = native.contexts;
|
|
39
|
-
if (AppState.currentState !== 'unknown') {
|
|
40
|
-
nativeContexts = nativeContexts || {};
|
|
41
|
-
nativeContexts.app = Object.assign(Object.assign({}, nativeContexts.app), { in_foreground: AppState.currentState === 'active' });
|
|
42
|
-
}
|
|
43
|
-
if (nativeContexts) {
|
|
44
|
-
event.contexts = Object.assign(Object.assign({}, nativeContexts), event.contexts);
|
|
45
|
-
if (nativeContexts.app) {
|
|
46
|
-
event.contexts.app = Object.assign(Object.assign({}, nativeContexts.app), event.contexts.app);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const nativeTags = native.tags;
|
|
50
|
-
if (nativeTags) {
|
|
51
|
-
event.tags = Object.assign(Object.assign({}, nativeTags), event.tags);
|
|
52
|
-
}
|
|
53
|
-
const nativeExtra = native.extra;
|
|
54
|
-
if (nativeExtra) {
|
|
55
|
-
event.extra = Object.assign(Object.assign({}, nativeExtra), event.extra);
|
|
56
|
-
}
|
|
57
|
-
const nativeFingerprint = native.fingerprint;
|
|
58
|
-
if (nativeFingerprint) {
|
|
59
|
-
event.fingerprint = ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).concat(nativeFingerprint.filter(item => { var _a; return ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).indexOf(item) < 0; }));
|
|
60
|
-
}
|
|
61
|
-
const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;
|
|
62
|
-
if (!event.level && nativeLevel) {
|
|
63
|
-
event.level = nativeLevel;
|
|
64
|
-
}
|
|
65
|
-
const nativeEnvironment = native['environment'];
|
|
66
|
-
if (!event.environment && nativeEnvironment) {
|
|
67
|
-
event.environment = nativeEnvironment;
|
|
68
|
-
}
|
|
69
|
-
const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])
|
|
70
|
-
? native['breadcrumbs'].map(breadcrumbFromObject)
|
|
71
|
-
: undefined;
|
|
72
|
-
if (nativeBreadcrumbs) {
|
|
73
|
-
event.breadcrumbs = nativeBreadcrumbs;
|
|
74
|
-
}
|
|
75
|
-
return event;
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
10
|
+
export const deviceContextIntegration = () => {
|
|
11
|
+
return {
|
|
12
|
+
name: INTEGRATION_NAME,
|
|
13
|
+
setupOnce: () => {
|
|
14
|
+
/* noop */
|
|
15
|
+
},
|
|
16
|
+
processEvent,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
79
19
|
/**
|
|
80
|
-
*
|
|
20
|
+
* Load device context from native.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Use `deviceContextIntegration()` instead.
|
|
81
23
|
*/
|
|
82
|
-
|
|
24
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
25
|
+
export const DeviceContext = convertIntegrationFnToClass(INTEGRATION_NAME, deviceContextIntegration);
|
|
26
|
+
function processEvent(event) {
|
|
27
|
+
var _a;
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
let native = null;
|
|
30
|
+
try {
|
|
31
|
+
native = yield NATIVE.fetchNativeDeviceContexts();
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
logger.log(`Failed to get device context from native: ${e}`);
|
|
35
|
+
}
|
|
36
|
+
if (!native) {
|
|
37
|
+
return event;
|
|
38
|
+
}
|
|
39
|
+
const nativeUser = native.user;
|
|
40
|
+
if (!event.user && nativeUser) {
|
|
41
|
+
event.user = nativeUser;
|
|
42
|
+
}
|
|
43
|
+
let nativeContexts = native.contexts;
|
|
44
|
+
if (AppState.currentState !== 'unknown') {
|
|
45
|
+
nativeContexts = nativeContexts || {};
|
|
46
|
+
nativeContexts.app = Object.assign(Object.assign({}, nativeContexts.app), { in_foreground: AppState.currentState === 'active' });
|
|
47
|
+
}
|
|
48
|
+
if (nativeContexts) {
|
|
49
|
+
event.contexts = Object.assign(Object.assign({}, nativeContexts), event.contexts);
|
|
50
|
+
if (nativeContexts.app) {
|
|
51
|
+
event.contexts.app = Object.assign(Object.assign({}, nativeContexts.app), event.contexts.app);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const nativeTags = native.tags;
|
|
55
|
+
if (nativeTags) {
|
|
56
|
+
event.tags = Object.assign(Object.assign({}, nativeTags), event.tags);
|
|
57
|
+
}
|
|
58
|
+
const nativeExtra = native.extra;
|
|
59
|
+
if (nativeExtra) {
|
|
60
|
+
event.extra = Object.assign(Object.assign({}, nativeExtra), event.extra);
|
|
61
|
+
}
|
|
62
|
+
const nativeFingerprint = native.fingerprint;
|
|
63
|
+
if (nativeFingerprint) {
|
|
64
|
+
event.fingerprint = ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).concat(nativeFingerprint.filter(item => { var _a; return ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).indexOf(item) < 0; }));
|
|
65
|
+
}
|
|
66
|
+
const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;
|
|
67
|
+
if (!event.level && nativeLevel) {
|
|
68
|
+
event.level = nativeLevel;
|
|
69
|
+
}
|
|
70
|
+
const nativeEnvironment = native['environment'];
|
|
71
|
+
if (!event.environment && nativeEnvironment) {
|
|
72
|
+
event.environment = nativeEnvironment;
|
|
73
|
+
}
|
|
74
|
+
const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])
|
|
75
|
+
? native['breadcrumbs'].map(breadcrumbFromObject)
|
|
76
|
+
: undefined;
|
|
77
|
+
if (nativeBreadcrumbs) {
|
|
78
|
+
event.breadcrumbs = nativeBreadcrumbs;
|
|
79
|
+
}
|
|
80
|
+
return event;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
83
|
//# sourceMappingURL=devicecontext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file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C,SAAS,CAAC;QAC/G,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,WAAW,EAAE;YAC/B,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC;SAC3B;QAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,iBAAiB,EAAE;YAC3C,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;SACvC;QAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAC5D,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC;YACjD,CAAC,CAAC,SAAS,CAAC;QACd,IAAI,iBAAiB,EAAE;YACrB,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;SACvC;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["/* eslint-disable complexity */\nimport { convertIntegrationFnToClass } from '@sentry/core';\nimport type { Event, Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';\nimport { logger, severityLevelFromString } from '@sentry/utils';\nimport { AppState } from 'react-native';\n\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'DeviceContext';\n\n/** Load device context from native. */\nexport const deviceContextIntegration = (): IntegrationFnResult => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n /* noop */\n },\n processEvent,\n };\n};\n\n/**\n * Load device context from native.\n *\n * @deprecated Use `deviceContextIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const DeviceContext = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n deviceContextIntegration,\n) as IntegrationClass<Integration>;\n\nasync function processEvent(event: Event): Promise<Event> {\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n if (nativeContexts.app) {\n event.contexts.app = { ...nativeContexts.app, ...event.contexts.app };\n }\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n event.breadcrumbs = nativeBreadcrumbs;\n }\n\n return event;\n}\n"]}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';
|
|
2
2
|
/** Default EventOrigin instrumentation */
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void;
|
|
16
|
-
}
|
|
3
|
+
export declare const eventOriginIntegration: () => IntegrationFnResult;
|
|
4
|
+
/**
|
|
5
|
+
* Default EventOrigin instrumentation
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use `eventOriginIntegration()` instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EventOrigin: IntegrationClass<Integration>;
|
|
17
10
|
//# sourceMappingURL=eventorigin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventorigin.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eventorigin.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAI/F,0CAA0C;AAC1C,eAAO,MAAM,sBAAsB,QAAO,mBAezC,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,WAAW,+BAGU,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
+
import { convertIntegrationFnToClass } from '@sentry/core';
|
|
2
|
+
const INTEGRATION_NAME = 'EventOrigin';
|
|
1
3
|
/** Default EventOrigin instrumentation */
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @inheritDoc
|
|
11
|
-
*/
|
|
12
|
-
setupOnce(addGlobalEventProcessor) {
|
|
13
|
-
addGlobalEventProcessor(event => {
|
|
4
|
+
export const eventOriginIntegration = () => {
|
|
5
|
+
return {
|
|
6
|
+
name: INTEGRATION_NAME,
|
|
7
|
+
setupOnce: () => {
|
|
8
|
+
// noop
|
|
9
|
+
},
|
|
10
|
+
processEvent: (event) => {
|
|
14
11
|
var _a;
|
|
15
12
|
event.tags = (_a = event.tags) !== null && _a !== void 0 ? _a : {};
|
|
16
13
|
event.tags['event.origin'] = 'javascript';
|
|
17
14
|
event.tags['event.environment'] = 'javascript';
|
|
18
15
|
return event;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
};
|
|
22
19
|
/**
|
|
23
|
-
*
|
|
20
|
+
* Default EventOrigin instrumentation
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Use `eventOriginIntegration()` instead.
|
|
24
23
|
*/
|
|
25
|
-
|
|
24
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
25
|
+
export const EventOrigin = convertIntegrationFnToClass(INTEGRATION_NAME, eventOriginIntegration);
|
|
26
26
|
//# sourceMappingURL=eventorigin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAG3D,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAwB,EAAE;IAC9D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY,EAAE,CAAC,KAAY,EAAE,EAAE;;YAC7B,KAAK,CAAC,IAAI,GAAG,MAAA,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,2BAA2B,CACpD,gBAAgB,EAChB,sBAAsB,CACU,CAAC","sourcesContent":["import { convertIntegrationFnToClass } from '@sentry/core';\nimport type { Event, Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';\n\nconst INTEGRATION_NAME = 'EventOrigin';\n\n/** Default EventOrigin instrumentation */\nexport const eventOriginIntegration = (): IntegrationFnResult => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent: (event: Event) => {\n event.tags = event.tags ?? {};\n\n event.tags['event.origin'] = 'javascript';\n event.tags['event.environment'] = 'javascript';\n\n return event;\n },\n };\n};\n\n/**\n * Default EventOrigin instrumentation\n *\n * @deprecated Use `eventOriginIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const EventOrigin = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n eventOriginIntegration,\n) as IntegrationClass<Integration>;\n"]}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';
|
|
2
2
|
/** Load device context from expo modules. */
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
name: string;
|
|
12
|
-
/**
|
|
13
|
-
* @inheritDoc
|
|
14
|
-
*/
|
|
15
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
16
|
-
}
|
|
3
|
+
export declare const expoContextIntegration: () => IntegrationFnResult;
|
|
4
|
+
/**
|
|
5
|
+
* Load device context from expo modules.
|
|
6
|
+
*
|
|
7
|
+
* @deprecated Use `expoContextIntegration()` instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ExpoContext: IntegrationClass<Integration>;
|
|
17
10
|
//# sourceMappingURL=expocontext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AAMvB,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,QAAO,mBAQzC,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,WAAW,+BAGU,CAAC"}
|
|
@@ -1,40 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { convertIntegrationFnToClass } from '@sentry/core';
|
|
2
2
|
import { getExpoDevice } from '../utils/expomodules';
|
|
3
|
+
const INTEGRATION_NAME = 'ExpoContext';
|
|
3
4
|
/** Load device context from expo modules. */
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export const expoContextIntegration = () => {
|
|
6
|
+
return {
|
|
7
|
+
name: INTEGRATION_NAME,
|
|
8
|
+
setupOnce: () => {
|
|
9
|
+
// noop
|
|
10
|
+
},
|
|
11
|
+
processEvent,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Load device context from expo modules.
|
|
16
|
+
*
|
|
17
|
+
* @deprecated Use `expoContextIntegration()` instead.
|
|
18
|
+
*/
|
|
19
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
20
|
+
export const ExpoContext = convertIntegrationFnToClass(INTEGRATION_NAME, expoContextIntegration);
|
|
21
|
+
function processEvent(event) {
|
|
22
|
+
const expoDeviceContext = getExpoDeviceContext();
|
|
23
|
+
if (expoDeviceContext) {
|
|
24
|
+
event.contexts = event.contexts || {};
|
|
25
|
+
event.contexts.device = Object.assign(Object.assign({}, expoDeviceContext), event.contexts.device);
|
|
10
26
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
addGlobalEventProcessor((event) => __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const self = getCurrentHub().getIntegration(ExpoContext);
|
|
17
|
-
if (!self) {
|
|
18
|
-
return event;
|
|
19
|
-
}
|
|
20
|
-
const expoDeviceContext = getExpoDeviceContext();
|
|
21
|
-
if (expoDeviceContext) {
|
|
22
|
-
event.contexts = event.contexts || {};
|
|
23
|
-
event.contexts.device = Object.assign(Object.assign({}, expoDeviceContext), event.contexts.device);
|
|
24
|
-
}
|
|
25
|
-
const expoOsContext = getExpoOsContext();
|
|
26
|
-
if (expoOsContext) {
|
|
27
|
-
event.contexts = event.contexts || {};
|
|
28
|
-
event.contexts.os = Object.assign(Object.assign({}, expoOsContext), event.contexts.os);
|
|
29
|
-
}
|
|
30
|
-
return event;
|
|
31
|
-
}));
|
|
27
|
+
const expoOsContext = getExpoOsContext();
|
|
28
|
+
if (expoOsContext) {
|
|
29
|
+
event.contexts = event.contexts || {};
|
|
30
|
+
event.contexts.os = Object.assign(Object.assign({}, expoOsContext), event.contexts.os);
|
|
32
31
|
}
|
|
32
|
+
return event;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
ExpoContext.id = 'ExpoContext';
|
|
38
34
|
/**
|
|
39
35
|
* Returns the Expo Device context if present
|
|
40
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM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CAAA;QAChC,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,YAAY,EAAE,UAAU,CAAC,YAAY;QACrC,WAAW,EAAE,UAAU,CAAC,WAAW;KACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB;IACvB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,OAAO,EAAE,UAAU,CAAC,SAAS;QAC7B,IAAI,EAAE,UAAU,CAAC,MAAM;KACxB,CAAC;AACJ,CAAC","sourcesContent":["import { convertIntegrationFnToClass } from '@sentry/core';\nimport type {\n DeviceContext,\n Event,\n Integration,\n IntegrationClass,\n IntegrationFnResult,\n OsContext,\n} from '@sentry/types';\n\nimport { getExpoDevice } from '../utils/expomodules';\n\nconst INTEGRATION_NAME = 'ExpoContext';\n\n/** Load device context from expo modules. */\nexport const expoContextIntegration = (): IntegrationFnResult => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\n/**\n * Load device context from expo modules.\n *\n * @deprecated Use `expoContextIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const ExpoContext = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n expoContextIntegration,\n) as IntegrationClass<Integration>;\n\nfunction processEvent(event: Event): Event {\n const expoDeviceContext = getExpoDeviceContext();\n if (expoDeviceContext) {\n event.contexts = event.contexts || {};\n event.contexts.device = { ...expoDeviceContext, ...event.contexts.device };\n }\n\n const expoOsContext = getExpoOsContext();\n if (expoOsContext) {\n event.contexts = event.contexts || {};\n event.contexts.os = { ...expoOsContext, ...event.contexts.os };\n }\n\n return event;\n}\n\n/**\n * Returns the Expo Device context if present\n */\nfunction getExpoDeviceContext(): DeviceContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n name: expoDevice.deviceName,\n simulator: !expoDevice?.isDevice,\n model: expoDevice.modelName,\n manufacturer: expoDevice.manufacturer,\n memory_size: expoDevice.totalMemory,\n };\n}\n\n/**\n * Returns the Expo OS context if present\n */\nfunction getExpoOsContext(): OsContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n build: expoDevice.osBuildId,\n version: expoDevice.osVersion,\n name: expoDevice.osName,\n };\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { debugSymbolicatorIntegration } from './debugsymbolicator';
|
|
2
|
+
export { deviceContextIntegration } from './devicecontext';
|
|
3
|
+
export { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';
|
|
4
|
+
export { nativeLinkedErrorsIntegration } from './nativelinkederrors';
|
|
5
|
+
export { nativeReleaseIntegration } from './release';
|
|
6
|
+
export { eventOriginIntegration } from './eventorigin';
|
|
7
|
+
export { sdkInfoIntegration } from './sdkinfo';
|
|
8
|
+
export { reactNativeInfoIntegration } from './reactnativeinfo';
|
|
9
|
+
export { modulesLoaderIntegration } from './modulesloader';
|
|
10
|
+
export { hermesProfilingIntegration } from '../profiling/integration';
|
|
11
|
+
export { screenshotIntegration } from './screenshot';
|
|
12
|
+
export { viewHierarchyIntegration } from './viewhierarchy';
|
|
13
|
+
export { expoContextIntegration } from './expocontext';
|
|
14
|
+
export { spotlightIntegration } from './spotlight';
|
|
15
|
+
export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, } from '@sentry/react';
|
|
16
|
+
//# sourceMappingURL=exports.d.ts.map
|