Skip to content

Commit b2191fb

Browse files
authored
Merge branch 'main' into sync-flush
2 parents 38663dc + 41b381a commit b2191fb

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

opentelemetry-otlp/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## vNext
44

5+
- The `OTEL_EXPORTER_OTLP_TIMEOUT`, `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT`, `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` and `OTEL_EXPORTER_OTLP_LOGS_TIMEOUT` are changed from seconds to miliseconds.
6+
57
## 0.28.0
68

79
Released 2025-Feb-10

opentelemetry-otlp/src/exporter/http/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl HttpExporterBuilder {
120120
.or(env::var(OTEL_EXPORTER_OTLP_TIMEOUT).ok())
121121
{
122122
Some(val) => match val.parse() {
123-
Ok(seconds) => Duration::from_secs(seconds),
123+
Ok(seconds) => Duration::from_millis(seconds),
124124
Err(_) => self.exporter_config.timeout,
125125
},
126126
None => self.exporter_config.timeout,

opentelemetry-otlp/src/exporter/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const OTEL_EXPORTER_OTLP_PROTOCOL_HTTP_JSON: &str = "http/json";
5252
/// Max waiting time for the backend to process each signal batch, defaults to 10 seconds.
5353
pub const OTEL_EXPORTER_OTLP_TIMEOUT: &str = "OTEL_EXPORTER_OTLP_TIMEOUT";
5454
/// Default max waiting time for the backend to process each signal batch.
55-
pub const OTEL_EXPORTER_OTLP_TIMEOUT_DEFAULT: u64 = 10;
55+
pub const OTEL_EXPORTER_OTLP_TIMEOUT_DEFAULT: u64 = 10000;
5656

5757
// Endpoints per protocol https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md
5858
#[cfg(feature = "grpc-tonic")]
@@ -87,7 +87,7 @@ impl Default for ExportConfig {
8787
// don't use default_endpoint(protocol) here otherwise we
8888
// won't know if user provided a value
8989
protocol,
90-
timeout: Duration::from_secs(OTEL_EXPORTER_OTLP_TIMEOUT_DEFAULT),
90+
timeout: Duration::from_millis(OTEL_EXPORTER_OTLP_TIMEOUT_DEFAULT),
9191
}
9292
}
9393
}

opentelemetry-otlp/src/exporter/tonic/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl TonicExporterBuilder {
200200
.or(env::var(OTEL_EXPORTER_OTLP_TIMEOUT).ok())
201201
{
202202
Some(val) => match val.parse() {
203-
Ok(seconds) => Duration::from_secs(seconds),
203+
Ok(seconds) => Duration::from_millis(seconds),
204204
Err(_) => config.timeout,
205205
},
206206
None => config.timeout,

0 commit comments

Comments
 (0)