1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-23 19:03:03 +01:00
Brian Rogers 2367e71ff4
Support updated OT 0.14 / tracing-OT 0.13 crate versions (#23)
* Support updated OT 0.14 / tracing-OT 0.12 crate versions

Add support for opentelemetry 0.14 and tracing-opentelemetry 0.13.
Make corresponding changes to the features, docs, and examples.
Due to the use of two different versions of the same packages, some
reorganization had to be done for the internal modules.

Addresses issue #22.

* Re-export versioned set_otel_parent `fn`s for use in macro
2021-07-03 18:33:59 +02:00
..

OpenTelemetry integration

Prerequisites

To execute this example you need a running Jaeger instance.
You can launch one using Docker:

docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest

Running

You can launch this example with

cargo run

An actix-web application will be listening on port 8080.
You can fire requests to it with:

curl -v http://localhost:8080/hello
Hello world!

Traces

You can look at the exported traces in your browser by visiting http://localhost:16686.
Spans will be also printed to the console in JSON format, as structured log records.