File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed
packages/apm/src/integrations Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,28 @@ import {
88 supportsNativeFetch ,
99} from '@sentry/utils' ;
1010
11- /** JSDoc */
11+ /**
12+ * Options for Tracing integration
13+ */
1214interface TracingOptions {
15+ /**
16+ * List of strings / regex where the integration should create Spans out of. Additionally this will be used
17+ * to define which outgoing requests the `sentry-trace` header will be attached to.
18+ *
19+ * Default: ['localhost', /^\//]
20+ */
1321 tracingOrigins : Array < string | RegExp > ;
22+ /**
23+ * Flag to disable patching all together for fetch requests.
24+ *
25+ * Default: true
26+ */
1427 traceFetch : boolean ;
28+ /**
29+ * Flag to disable patching all together for xhr requests.
30+ *
31+ * Default: true
32+ */
1533 traceXHR : boolean ;
1634 /**
1735 * This function will be called before creating a span for a request with the given url.
@@ -20,8 +38,28 @@ interface TracingOptions {
2038 * By default it uses the `tracingOrigins` options as a url match.
2139 */
2240 shouldCreateSpanForRequest ( url : string ) : boolean ;
41+ /**
42+ * The time to wait in ms until the transaction will be finished. The transaction will use the end timestamp of
43+ * the last finished span as the endtime for the transaction.
44+ *
45+ * Default: 500
46+ */
2347 idleTimeout : number ;
48+ /**
49+ * Flag to enable/disable creation of `navigation` transaction on history changes. Useful for react applications with
50+ * a router.
51+ *
52+ * Default: true
53+ */
2454 startTransactionOnLocationChange : boolean ;
55+ /**
56+ * Sample to determine if the Integration should instrument anything. The decision will be taken once per load
57+ * on initalization.
58+ * 0 = 0% chance of instrumenting
59+ * 1 = 100% change of instrumenting
60+ *
61+ * Default: 1
62+ */
2563 tracesSampleRate : number ;
2664}
2765
You can’t perform that action at this time.
0 commit comments