We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 083feb4 commit 5204a74Copy full SHA for 5204a74
opentelemetry-otlp/src/exporter/http/mod.rs
@@ -301,8 +301,14 @@ impl OtlpHttpClient {
301
Some(crate::Compression::Gzip) => {
302
Err("gzip compression requested but gzip-http feature not enabled".to_string())
303
}
304
+ #[cfg(feature = "zstd-http")]
305
Some(crate::Compression::Zstd) => {
- Err("zstd compression not implemented yet".to_string())
306
+ let compressed = zstd::bulk::compress(&body, 0).map_err(|e| e.to_string())?;
307
+ Ok((compressed, Some("zstd")))
308
+ }
309
+ #[cfg(not(feature = "zstd-http"))]
310
+ Some(crate::Compression::Zstd) => {
311
+ Err("zstd compression requested but zstd-http feature not enabled".to_string())
312
313
None => Ok((body, None)),
314
0 commit comments