Elastic APM tracing layer. Uses the native ingest API.
Add the crate to your Cargo.toml file:
toml
tracing-elastic-apm = "desired version"
Create a new tracing Layer:
rust
let layer = tracing_elastic_apm::new_layer(
"ServiceName".to_string(),
tracing_elastic_apm::Config::new("APM address".to_string())
);
Register the layer:
rust
tracing_subscriber::registry()
.with(layer)
.init();
Take a look at Config
for more configuration options.