OpenTelemetry integration for Actix Web.
[actix-web
] uses [tokio
] as the underlying executor, so exporters should be
configured to be non-blocking:
```toml [dependencies]
tokio
feature.opentelemetry-jaeger = { version = "..", features = ["rt-tokio-current-thread"] }
tokio
based reqwest-client
feature.opentelemetry-zipkin = { version = "..", features = ["reqwest-client"], default-features = false }
```
```console
$ docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
$ cargo run --example server
$ cargo run --example client --features awc
$ firefox http://localhost:16686/ ```
awc
-- enable support for tracing the awc
http client.metrics
-- enable support for opentelemetry metrics (only traces are enabled by default)metrics-prometheus
-- enable support for prometheus metrics (requires metrics
feature)sync-middleware
-- enable tracing on actix-web middlewares that do synchronous work before returning a future. Adds a small amount of overhead to every request.