File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -214,7 +214,6 @@ function getClientOptions(
214214 const tracesSampleRate = getTracesSampleRate ( options . tracesSampleRate ) ;
215215
216216 const baseOptions = dropUndefinedKeys ( {
217- transport : makeNodeTransport ,
218217 dsn : process . env . SENTRY_DSN ,
219218 environment : process . env . SENTRY_ENVIRONMENT ,
220219 sendClientReports : true ,
@@ -223,6 +222,7 @@ function getClientOptions(
223222 const overwriteOptions = dropUndefinedKeys ( {
224223 release,
225224 tracesSampleRate,
225+ transport : options . transport || makeNodeTransport ,
226226 } ) ;
227227
228228 const mergedOptions = {
Original file line number Diff line number Diff line change @@ -211,4 +211,9 @@ describe('validateOpenTelemetrySetup', () => {
211211 expect ( errorSpy ) . toBeCalledWith ( expect . stringContaining ( 'You have to set up the SentrySpanProcessor.' ) ) ;
212212 expect ( warnSpy ) . toBeCalledWith ( expect . stringContaining ( 'You have to set up the SentrySampler.' ) ) ;
213213 } ) ;
214+
215+ // Regression test for https://github.com/getsentry/sentry-javascript/issues/15558
216+ it ( 'accepts an undefined transport' , ( ) => {
217+ init ( { dsn : PUBLIC_DSN , transport : undefined } ) ;
218+ } ) ;
214219} ) ;
You can’t perform that action at this time.
0 commit comments