```shell
docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
cargo run --example simple
cargo run --example metrics --features isahc-metrics
firefox http://localhost:16686/ ```
Cargo.toml
```toml async-std = { version = "1.7", features = ["attributes"] } opentelemetry = { version = "0.10", features = ["async-std"] } opentelemetry-jaeger = { version = "0.9", features = ["async-std"] }
opentelemetry-surf = { git = "https://github.com/asaaki/opentelemetry-surf" } ```
client.rs
```rust
async fn main() -> surf::Result<()> { let (tracer, uninstall) = opentelemetryjaeger::newpipeline().install().unwrap(); let otelmw = opentelemetrysurf::OpenTelemetryTracingMiddleware::new(tracer); let client = surf::client().with(otelmw); let res = client.get("https://httpbin.org/get").await?; dbg!(res); Ok(()) } ```
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.