@tracktor/shared-module 0.15.0 → 0.15.2
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 +2 -2
- package/dist/components/Utils/SentryConfig.d.ts +63 -3
- package/dist/main.js +315 -277
- package/dist/main.umd.cjs +8 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ interface SentryConfigProps<T> {
|
|
|
4
4
|
*/
|
|
5
5
|
sentry: T & {
|
|
6
6
|
init: (config: {
|
|
7
|
+
/**
|
|
8
|
+
* Enable debug mode.
|
|
9
|
+
*/
|
|
10
|
+
debug?: boolean;
|
|
7
11
|
/**
|
|
8
12
|
* The Dsn used to connect to Sentry and identify the project. If omitted, the SDK will not send any data to Sentry.
|
|
9
13
|
*/
|
|
@@ -30,8 +34,20 @@ interface SentryConfigProps<T> {
|
|
|
30
34
|
* Sample rate to determine session sampling.
|
|
31
35
|
*/
|
|
32
36
|
replaysSessionSampleRate: number;
|
|
37
|
+
/**
|
|
38
|
+
* List of strings/regex controlling to which outgoing requests the SDK will attach tracing headers.
|
|
39
|
+
*/
|
|
40
|
+
tracePropagationTargets?: (string | RegExp)[];
|
|
33
41
|
}) => void;
|
|
34
42
|
BrowserTracing: any;
|
|
43
|
+
/**
|
|
44
|
+
* This function is used to instrument React Router v6.
|
|
45
|
+
*/
|
|
46
|
+
Replay: any;
|
|
47
|
+
/**
|
|
48
|
+
* This function is used to instrument React Router v6.
|
|
49
|
+
*/
|
|
50
|
+
reactRouterV6Instrumentation: any;
|
|
35
51
|
};
|
|
36
52
|
/**
|
|
37
53
|
* Sentry DSN
|
|
@@ -39,16 +55,60 @@ interface SentryConfigProps<T> {
|
|
|
39
55
|
dsn: string;
|
|
40
56
|
/**
|
|
41
57
|
* List of integrations that should be installed after SDK was initialized.
|
|
42
|
-
* Accepts either a list of integrations or a function that receives default integrations and returns a new, updated list.
|
|
43
58
|
*/
|
|
44
|
-
|
|
59
|
+
routingInstrumentationDependencies: {
|
|
60
|
+
useEffect: any;
|
|
61
|
+
useLocation: any;
|
|
62
|
+
useNavigationType: any;
|
|
63
|
+
createRoutesFromChildren: any;
|
|
64
|
+
matchRoutes: any;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* List of integrations that should be installed after SDK was initialized.
|
|
68
|
+
*/
|
|
69
|
+
integrations: any[];
|
|
70
|
+
/**
|
|
71
|
+
* Tracing is enabled if either this or tracesSampler is defined.
|
|
72
|
+
* If both are defined, tracesSampleRate is ignored.
|
|
73
|
+
*/
|
|
74
|
+
tracesSampleRate?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The sample rate for session-long replays.
|
|
77
|
+
* 1.0 will record all sessions and 0 will record none.
|
|
78
|
+
*/
|
|
79
|
+
replaysSessionSampleRate?: number;
|
|
80
|
+
/**
|
|
81
|
+
* The sample rate for sessions that has had an error occur.
|
|
82
|
+
* This is independent of sessionSampleRate. 1.0 will record all sessions and 0 will record none.
|
|
83
|
+
*/
|
|
84
|
+
replaysOnErrorSampleRate?: number;
|
|
85
|
+
/**
|
|
86
|
+
* List of strings/regex controlling to which outgoing requests the SDK will attach tracing headers.
|
|
87
|
+
* By default the SDK will attach those headers to all requests to localhost and same origin. If this option is provided, the SDK will match the request URL of outgoing requests against the items in this array, and only attach tracing headers if a match was found.
|
|
88
|
+
* Example:
|
|
89
|
+
* Sentry.init({
|
|
90
|
+
* tracePropagationTargets: ['api.site.com'],
|
|
91
|
+
* });
|
|
92
|
+
* Default: ['localhost', /^//]
|
|
93
|
+
*/
|
|
94
|
+
tracePropagationTargets?: (string | RegExp)[];
|
|
95
|
+
/**
|
|
96
|
+
* Enable debug mode.
|
|
97
|
+
*/
|
|
98
|
+
debug?: boolean;
|
|
45
99
|
}
|
|
46
100
|
/**
|
|
47
101
|
* This component is used to initialize Sentry
|
|
48
102
|
* @param dsn
|
|
49
103
|
* @param sentry
|
|
50
104
|
* @param integrations
|
|
105
|
+
* @param tracesSampleRate
|
|
106
|
+
* @param routingInstrumentationDependencies
|
|
107
|
+
* @param replaysSessionSampleRate
|
|
108
|
+
* @param replaysOnErrorSampleRate
|
|
109
|
+
* @param tracePropagationTargets
|
|
110
|
+
* @param debug
|
|
51
111
|
* @constructor
|
|
52
112
|
*/
|
|
53
|
-
declare const SentryConfig: <T extends unknown>({ dsn, sentry, integrations }: SentryConfigProps<T>) => null;
|
|
113
|
+
declare const SentryConfig: <T extends unknown>({ dsn, sentry, integrations, tracesSampleRate, routingInstrumentationDependencies, replaysSessionSampleRate, replaysOnErrorSampleRate, tracePropagationTargets, debug, }: SentryConfigProps<T>) => null;
|
|
54
114
|
export default SentryConfig;
|