@@ -722,13 +722,14 @@ pub struct Routing {
722
722
}
723
723
724
724
/// Http content encoding for both incoming and outgoing web requests.
725
- #[ derive( Clone , Copy , Debug , Deserialize , Serialize ) ]
725
+ #[ derive( Clone , Copy , Debug , Default , Deserialize , Serialize ) ]
726
726
#[ serde( rename_all = "lowercase" ) ]
727
727
pub enum HttpEncoding {
728
728
/// Identity function without no compression.
729
729
///
730
730
/// This is the default encoding and does not require the presence of the `content-encoding`
731
731
/// HTTP header.
732
+ #[ default]
732
733
Identity ,
733
734
/// Compression using a [zlib](https://en.wikipedia.org/wiki/Zlib) structure with
734
735
/// [deflate](https://en.wikipedia.org/wiki/DEFLATE) encoding.
@@ -780,12 +781,6 @@ impl HttpEncoding {
780
781
}
781
782
}
782
783
783
- impl Default for HttpEncoding {
784
- fn default ( ) -> Self {
785
- Self :: Identity
786
- }
787
- }
788
-
789
784
/// Controls authentication with upstream.
790
785
#[ derive( Serialize , Deserialize , Debug ) ]
791
786
#[ serde( default ) ]
@@ -830,7 +825,7 @@ pub struct Http {
830
825
pub project_failure_interval : u64 ,
831
826
/// Content encoding to apply to upstream store requests.
832
827
///
833
- /// By default, Relay applies `gzip ` content encoding to compress upstream requests. Compression
828
+ /// By default, Relay applies `zstd ` content encoding to compress upstream requests. Compression
834
829
/// can be disabled to reduce CPU consumption, but at the expense of increased network traffic.
835
830
///
836
831
/// This setting applies to all store requests of SDK data, including events, transactions,
@@ -842,6 +837,7 @@ pub struct Http {
842
837
/// - `deflate`: Compression using a zlib header with deflate encoding.
843
838
/// - `gzip` (default): Compression using gzip.
844
839
/// - `br`: Compression using the brotli algorithm.
840
+ /// - `zstd`: Compression using the zstd algorithm.
845
841
pub encoding : HttpEncoding ,
846
842
/// Submit metrics globally through a shared endpoint.
847
843
///
@@ -863,7 +859,7 @@ impl Default for Http {
863
859
outage_grace_period : DEFAULT_NETWORK_OUTAGE_GRACE_PERIOD ,
864
860
retry_delay : default_retry_delay ( ) ,
865
861
project_failure_interval : default_project_failure_interval ( ) ,
866
- encoding : HttpEncoding :: Gzip ,
862
+ encoding : HttpEncoding :: Zstd ,
867
863
global_metrics : false ,
868
864
}
869
865
}
0 commit comments