datadoghq

Crates.iodatadoghq
lib.rsdatadoghq
version0.2.2
sourcesrc
created_at2022-05-27 01:30:55.605884
updated_at2022-06-30 01:23:00.953886
descriptionDatadog APM-compatible tracer and logger
homepagehttps://castiglia.ar
repositoryhttps://github.com/andrescastiglia/rust-datadog.git
max_upload_size
id594694
size46,278
Andrés Castiglia (acastigliaripio)

documentation

README

Datadog APM for Rust (original fork from datadog-apm)

Credits

Forked from https://github.com/pipefy/datadog-apm-rust.

Usage

Config

{
    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);

Instrumentation

#[tracing::instrument]
pub fn foo(name: &str) {
    debug!("Hello, {}!", name);
}

Span

{
    let span = span!(Level::INFO, "foo");
    let _enter = span.enter();
    info!("greeting");
}

More

See also tracing

Commit count: 2

cargo fmt