fix(observability): prevent otel reactor panic in non-tokio contexts
This commit is contained in:
parent
2d6205ee58
commit
e7ccb573fa
3 changed files with 44 additions and 2 deletions
17
tests/otel_dependency_feature_regression.rs
Normal file
17
tests/otel_dependency_feature_regression.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#[test]
|
||||
fn opentelemetry_otlp_uses_blocking_reqwest_client() {
|
||||
let manifest = include_str!("../Cargo.toml");
|
||||
let otlp_line = manifest
|
||||
.lines()
|
||||
.find(|line| line.trim_start().starts_with("opentelemetry-otlp ="))
|
||||
.expect("Cargo.toml must define opentelemetry-otlp dependency");
|
||||
|
||||
assert!(
|
||||
otlp_line.contains("\"reqwest-blocking-client\""),
|
||||
"opentelemetry-otlp must include reqwest-blocking-client to avoid Tokio reactor panics"
|
||||
);
|
||||
assert!(
|
||||
!otlp_line.contains("\"reqwest-client\""),
|
||||
"opentelemetry-otlp must not include async reqwest-client in this runtime mode"
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue