()
| 119 | } |
| 120 | |
| 121 | function validateOpenTelemetrySetup(): void { |
| 122 | if (!DEBUG_BUILD) { |
| 123 | return; |
| 124 | } |
| 125 | |
| 126 | const setup = openTelemetrySetupCheck(); |
| 127 | |
| 128 | const required: ReturnType<typeof openTelemetrySetupCheck> = ['SentryContextManager', 'SentryPropagator']; |
| 129 | |
| 130 | if (hasSpansEnabled()) { |
| 131 | required.push('SentrySpanProcessor'); |
| 132 | } |
| 133 | |
| 134 | for (const k of required) { |
| 135 | if (!setup.includes(k)) { |
| 136 | debug.error( |
| 137 | `You have to set up the ${k}. Without this, the OpenTelemetry & Sentry integration will not work properly.`, |
| 138 | ); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | if (!setup.includes('SentrySampler')) { |
| 143 | debug.warn( |
| 144 | 'You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.', |
| 145 | ); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | // exported for tests |
| 150 | // eslint-disable-next-line jsdoc/require-jsdoc |
no test coverage detected