1 | Object.defineProperty(exports, '__esModule', { value: true });
|
2 |
|
3 | const hub = require('../hub.js');
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | function hasTracingEnabled(
|
13 | maybeOptions,
|
14 | ) {
|
15 | if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {
|
16 | return false;
|
17 | }
|
18 |
|
19 | const client = hub.getCurrentHub().getClient();
|
20 | const options = maybeOptions || (client && client.getOptions());
|
21 | return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);
|
22 | }
|
23 |
|
24 | exports.hasTracingEnabled = hasTracingEnabled;
|
25 |
|