File tree 1 file changed +14
-5
lines changed
opentelemetry-otlp/src/exporter
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ pub const OTEL_EXPORTER_OTLP_COMPRESSION: &str = "OTEL_EXPORTER_OTLP_COMPRESSION
30
30
31
31
#[ cfg( all(
32
32
feature = "trace" ,
33
+ feature = "http-json" ,
33
34
not( feature = "http-proto" ) ,
34
35
not( feature = "grpc-tonic" )
35
36
) ) ]
@@ -315,17 +316,25 @@ mod tests {
315
316
) ;
316
317
}
317
318
318
- #[ cfg( feature = "http-json" ) ]
319
+ #[ cfg( all(
320
+ feature = "trace" ,
321
+ feature = "http-json" ,
322
+ not( feature = "http-proto" ) ,
323
+ not( feature = "grpc-tonic" )
324
+ ) ) ]
319
325
#[ test]
320
- fn test_default_http_json_endpoint ( ) {
321
- use crate :: WithExportConfig ;
322
-
323
- let exporter_builder = crate :: new_exporter ( ) . http ( ) . with_protocol ( crate :: Protocol :: HttpJson ) ;
326
+ fn test_http_json_defaults ( ) {
327
+ let exporter_builder = crate :: new_exporter ( ) . http ( ) ;
324
328
325
329
assert_eq ! (
326
330
exporter_builder. exporter_config. endpoint,
327
331
"http://localhost:4318"
328
332
) ;
333
+
334
+ assert_eq ! (
335
+ exporter_builder. exporter_config. protocol,
336
+ crate :: Protocol :: HttpJson
337
+ ) ;
329
338
}
330
339
331
340
#[ test]
You can’t perform that action at this time.
0 commit comments