Forked from https://github.com/pipefy/datadog-apm-rust.
{
let enabled = true;
let config = Config::new(
"service_name".to_string(),
Some("staging".to_string()),
"localhost:8196".to_string(),
LoggingConfig {
level: Level::Debug,
..LoggingConfig::default()
},
ApmConfig::default(),
enabled,
);
let _client = DatadogTracing::new(config);
#[tracing::instrument]
pub fn foo(name: &str) {
debug!("Hello, {}!", name);
}
{
let span = span!(Level::INFO, "foo");
let _enter = span.enter();
info!("greeting");
}
See also tracing