Skip to content

Commit

Permalink
fix tonic
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn committed Oct 26, 2021
1 parent 351504c commit 63fba93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions opentelemetry-otlp/src/metric.rs
Expand Up @@ -274,14 +274,12 @@ impl MetricsExporter {
None => endpoint,
}
.timeout(config.timeout)
.connect_lazy()
.map_err::<crate::Error, _>(Into::into)?;
.connect_lazy();

#[cfg(not(feature = "tls"))]
let channel = endpoint
.timeout(config.timeout)
.connect_lazy()
.map_err::<crate::Error, _>(Into::into)?;
.connect_lazy();

let client = MetricsServiceClient::new(channel);

Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-otlp/src/span.rs
Expand Up @@ -333,10 +333,10 @@ impl SpanExporter {
None => endpoint,
}
.timeout(config.timeout)
.connect_lazy()?;
.connect_lazy();

#[cfg(not(feature = "tls"))]
let channel = endpoint.timeout(config.timeout).connect_lazy()?;
let channel = endpoint.timeout(config.timeout).connect_lazy();

SpanExporter::from_tonic_channel(config, tonic_config, channel)
}
Expand Down

0 comments on commit 63fba93

Please sign in to comment.