File tree 3 files changed +12
-6
lines changed 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -230,12 +230,16 @@ async fn main() -> Result<()> {
230
230
let version_without_next = EXTENSION_VERSION . split ( '-' ) . next ( ) . unwrap_or ( "NA" ) ;
231
231
debug ! ( "Starting Datadog Extension {version_without_next}" ) ;
232
232
prepare_client_provider ( ) ?;
233
- let client = Client :: builder ( ) . no_proxy ( ) . build ( ) . map_err ( |e| {
234
- Error :: new (
235
- std:: io:: ErrorKind :: InvalidData ,
236
- format ! ( "Failed to create client: {e:?}" ) ,
237
- )
238
- } ) ?;
233
+ let client = Client :: builder ( )
234
+ . use_rustls_tls ( )
235
+ . no_proxy ( )
236
+ . build ( )
237
+ . map_err ( |e| {
238
+ Error :: new (
239
+ std:: io:: ErrorKind :: InvalidData ,
240
+ format ! ( "Failed to create client: {e:?}" ) ,
241
+ )
242
+ } ) ?;
239
243
240
244
let r = register ( & client)
241
245
. await
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ pub fn get_client(config: Arc<config::Config>) -> reqwest::Client {
17
17
18
18
fn build_client ( config : Arc < config:: Config > ) -> Result < reqwest:: Client , reqwest:: Error > {
19
19
let client = reqwest:: Client :: builder ( )
20
+ . use_rustls_tls ( )
20
21
. timeout ( Duration :: from_secs ( config. flush_timeout ) )
21
22
// Temporarily not force http2
22
23
// Enable HTTP/2 for better multiplexing
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ impl TelemetryApiClient {
20
20
pub async fn subscribe ( & self ) -> Result < Response , Box < dyn Error > > {
21
21
let url = base_url ( TELEMETRY_SUBSCRIPTION_ROUTE ) ?;
22
22
let resp = reqwest:: Client :: builder ( )
23
+ . use_rustls_tls ( )
23
24
. no_proxy ( )
24
25
. build ( )
25
26
. map_err ( |e| {
You can’t perform that action at this time.
0 commit comments