File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ use std::error::Error;
14
14
use std:: time:: Duration ;
15
15
16
16
fn init_tracer ( ) -> Result < ( sdktrace:: Tracer , opentelemetry_otlp:: Uninstall ) , TraceError > {
17
- opentelemetry_otlp:: new_pipeline ( ) . install ( )
17
+ opentelemetry_otlp:: new_pipeline ( )
18
+ . with_endpoint ( "http://localhost:4317" )
19
+ . install ( )
18
20
}
19
21
20
22
// Skip first immediate tick from tokio, not needed for async_std.
@@ -97,7 +99,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
97
99
} ) ;
98
100
} ) ;
99
101
100
- // wait for 1 seconds so that we could see metrics being pushed via OTLP every 10 seconds.
102
+ // wait for 1 minutes so that we could see metrics being pushed via OTLP every 10 seconds.
101
103
tokio:: time:: sleep ( Duration :: from_secs ( 60 ) ) . await ;
102
104
103
105
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ impl Default for ExporterConfig {
140
140
#[ cfg( feature = "tonic" ) ]
141
141
fn default ( ) -> Self {
142
142
ExporterConfig {
143
- endpoint : format ! ( "localhost:{}" , DEFAULT_OTLP_PORT ) ,
143
+ endpoint : format ! ( "http:// localhost:{}" , DEFAULT_OTLP_PORT ) ,
144
144
protocol : Protocol :: Grpc ,
145
145
#[ cfg( all( feature = "tonic" , feature = "tls" ) ) ]
146
146
tls_config : None ,
You can’t perform that action at this time.
0 commit comments