File tree 4 files changed +31
-7
lines changed
tests/integration_test/tests
4 files changed +31
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## vNext
4
4
5
- - ** Breaking** Remove support for surf HTTP client [ #1537 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/1537 )
5
+ ### Fixed
6
+ - Fix ` tonic() ` to the use correct port. [ #1556 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/1556 )
7
+
8
+ ### Changed
6
9
- Update to tonic 0.11 and prost 0.12 (#1536 )
10
+
11
+ ### Removed
12
+ - ** Breaking** Remove support for surf HTTP client [ #1537 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/1537 )
7
13
- Remove support for grpcio transport (#1534 )
8
14
9
15
## v0.14.0
Original file line number Diff line number Diff line change @@ -245,6 +245,28 @@ mod tests {
245
245
)
246
246
}
247
247
248
+ #[ cfg( feature = "http-proto" ) ]
249
+ #[ test]
250
+ fn test_default_http_endpoint ( ) {
251
+ let exporter_builder = crate :: new_exporter ( ) . http ( ) ;
252
+
253
+ assert_eq ! (
254
+ exporter_builder. exporter_config. endpoint,
255
+ "http://localhost:4318"
256
+ ) ;
257
+ }
258
+
259
+ #[ cfg( feature = "grpc-tonic" ) ]
260
+ #[ test]
261
+ fn test_default_tonic_endpoint ( ) {
262
+ let exporter_builder = crate :: new_exporter ( ) . tonic ( ) ;
263
+
264
+ assert_eq ! (
265
+ exporter_builder. exporter_config. endpoint,
266
+ "http://localhost:4317"
267
+ ) ;
268
+ }
269
+
248
270
#[ test]
249
271
fn test_parse_header_string ( ) {
250
272
let test_cases = vec ! [
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ impl Default for TonicExporterBuilder {
149
149
TonicExporterBuilder {
150
150
exporter_config : ExportConfig {
151
151
protocol : crate :: Protocol :: Grpc ,
152
+ endpoint : crate :: exporter:: default_endpoint ( crate :: Protocol :: Grpc ) ,
152
153
..Default :: default ( )
153
154
} ,
154
155
tonic_config,
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ use opentelemetry::{
6
6
trace:: { TraceContextExt , Tracer } ,
7
7
Key , KeyValue ,
8
8
} ;
9
- use opentelemetry_otlp:: WithExportConfig ;
10
9
use opentelemetry_sdk:: { runtime, trace as sdktrace, Resource } ;
11
10
use std:: error:: Error ;
12
11
use std:: fs:: File ;
@@ -15,11 +14,7 @@ use std::os::unix::fs::MetadataExt;
15
14
fn init_tracer ( ) -> Result < sdktrace:: Tracer , TraceError > {
16
15
opentelemetry_otlp:: new_pipeline ( )
17
16
. tracing ( )
18
- . with_exporter (
19
- opentelemetry_otlp:: new_exporter ( )
20
- . tonic ( )
21
- . with_endpoint ( "http://localhost:4317" ) ,
22
- )
17
+ . with_exporter ( opentelemetry_otlp:: new_exporter ( ) . tonic ( ) )
23
18
. with_trace_config (
24
19
sdktrace:: config ( ) . with_resource ( Resource :: new ( vec ! [ KeyValue :: new(
25
20
opentelemetry_semantic_conventions:: resource:: SERVICE_NAME ,
You can’t perform that action at this time.
0 commit comments