January 2019
Intermediate to advanced
520 pages
14h 32m
English
We will use two crates to make a test example—rustracing and rustracing_jaeger. Create a new crate and add it to the [dependencies] section of Cargo.toml:
rustracing = "0.1"rustracing_jaeger = "0.1"
Add the following dependencies to the main.rs source file:
use rustracing::sampler::AllSampler;use rustracing::tag::Tag;use rustracing_jaeger::Tracer;use rustracing_jaeger::reporter::JaegerCompactReporter;use std::time::Duration;use std::thread;
AppSampler implements the Sampler trait that is used to decide whether every new trace will be sampled or not. Consider samplers as filters of loggers, but smart ones that can limit the amount of traces per second or use other conditions. Tag is used to set extra data for spans. Tracer ...
Read now
Unlock full access