File tree Expand file tree Collapse file tree 2 files changed +8
-13
lines changed
Expand file tree Collapse file tree 2 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ private ITransport CreateTransport()
2323 _options . LogDebug ( "Creating transport." ) ;
2424
2525 // Start from either the transport given on options, or create a new HTTP transport.
26- var transport = _options . Transport ?? CreateHttpTransport ( ) ;
26+ var transport = _options . Transport ?? new LazyHttpTransport ( _options ) ;
2727
2828 // When a cache directory path is given, wrap the transport in a caching transport.
2929 if ( ! string . IsNullOrWhiteSpace ( _options . CacheDirectoryPath ) )
@@ -75,18 +75,6 @@ You can set a different environment via SENTRY_ENVIRONMENT env var or programati
7575 return transport ;
7676 }
7777
78- private LazyHttpTransport CreateHttpTransport ( )
79- {
80- if ( _options . SentryHttpClientFactory is not null )
81- {
82- _options . LogDebug (
83- "Using ISentryHttpClientFactory set through options: {0}." ,
84- _options . SentryHttpClientFactory . GetType ( ) . Name ) ;
85- }
86-
87- return new LazyHttpTransport ( _options ) ;
88- }
89-
9078 public IBackgroundWorker CreateBackgroundWorker ( )
9179 {
9280 if ( _options . BackgroundWorker is { } worker )
Original file line number Diff line number Diff line change @@ -222,6 +222,13 @@ internal IEnumerable<ISdkIntegration> Integrations
222222
223223 internal HttpClient GetHttpClient ( )
224224 {
225+ if ( SentryHttpClientFactory is not null )
226+ {
227+ DiagnosticLogger ? . LogDebug (
228+ "Using ISentryHttpClientFactory set through options: {0}." ,
229+ SentryHttpClientFactory . GetType ( ) . Name ) ;
230+ }
231+
225232 var factory = SentryHttpClientFactory ?? new DefaultSentryHttpClientFactory ( ) ;
226233 return factory . Create ( this ) ;
227234 }
You can’t perform that action at this time.
0 commit comments