13 releases (breaking)

0.11.0-beta.1 Feb 20, 2021
0.9.0 Dec 29, 2020
0.8.0 Nov 15, 2020
0.3.0 Jun 25, 2020
0.1.1 Nov 26, 2019

#18 in HTTP server

Download history 573/week @ 2020-11-10 669/week @ 2020-11-17 271/week @ 2020-11-24 647/week @ 2020-12-01 805/week @ 2020-12-08 862/week @ 2020-12-15 280/week @ 2020-12-22 499/week @ 2020-12-29 709/week @ 2021-01-05 971/week @ 2021-01-12 778/week @ 2021-01-19 837/week @ 2021-01-26 889/week @ 2021-02-02 662/week @ 2021-02-09 625/week @ 2021-02-16 3614/week @ 2021-02-23

2,896 downloads per month

MIT license

170KB
577 lines

Actix Web OpenTelemetry

Build Status Crates.io: actix-web-opentelemetry Documentation License: MIT

OpenTelemetry integration for Actix Web.

Exporter configuration

actix-web uses tokio as the underlying executor, so exporters should be configured to be non-blocking:

[dependencies]
# if exporting to jaeger, use the `tokio` feature.
opentelemetry-jaeger = { version = "*", features = ["tokio"] }

# if exporting to zipkin, use the `tokio` based `reqwest-client` feature.
opentelemetry-zipkin = { version = "*", features = ["reqwest-client"], default-features = false }

# ... ensure the same same for any other exporters

Execute client and server example

# Run jaeger in background
$ docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest

# Run server example with tracing middleware
$ cargo run --example server
# (In other tab) Run client example with request tracing
$ cargo run --example client

# View spans (see the image below)
$ firefox http://localhost:16686/

Jaeger UI

Dependencies

~23MB
~524K SLoC