diff --git a/opentelemetry-otlp/src/exporter/tonic/mod.rs b/opentelemetry-otlp/src/exporter/tonic/mod.rs index 776c2d904a..a63ec39ce2 100644 --- a/opentelemetry-otlp/src/exporter/tonic/mod.rs +++ b/opentelemetry-otlp/src/exporter/tonic/mod.rs @@ -514,6 +514,7 @@ mod tests { assert!(tonic::codec::CompressionEncoding::try_from(Compression::Zstd).is_err()); } + #[cfg(feature = "zstd-tonic")] #[test] fn test_priority_of_signal_env_over_generic_env_for_compression() { run_env_test( @@ -532,6 +533,7 @@ mod tests { ); } + #[cfg(feature = "zstd-tonic")] #[test] fn test_priority_of_code_based_config_over_envs_for_compression() { run_env_test( diff --git a/opentelemetry-otlp/tests/integration_test/src/logs_asserter.rs b/opentelemetry-otlp/tests/integration_test/src/logs_asserter.rs index 2c9339c6b4..cc7798148f 100644 --- a/opentelemetry-otlp/tests/integration_test/src/logs_asserter.rs +++ b/opentelemetry-otlp/tests/integration_test/src/logs_asserter.rs @@ -1,8 +1,7 @@ use anyhow::Result; -use opentelemetry_proto::tonic::{ - common::v1::KeyValue, - logs::v1::{LogRecord, LogsData, ResourceLogs}, -}; +#[cfg(feature = "experimental_metadata_attributes")] +use opentelemetry_proto::tonic::common::v1::KeyValue; +use opentelemetry_proto::tonic::logs::v1::{LogRecord, LogsData, ResourceLogs}; use std::fs::File; // Given two ResourceLogs, assert that they are equal except for the timestamps