tracing_elastic_apm/lib.rs
1//! Elastic APM ingest API support layer.
2//!
3//! Use the `new_layer` function to create the layer with given `Config`.
4
5use anyhow::Result as AnyResult;
6
7use crate::{config::Config, layer::ApmLayer};
8
9mod apm_client;
10pub mod config;
11pub mod layer;
12pub mod model;
13mod visitor;
14
15/// Constructs a new telemetry layer for given APM configuration.
16pub fn new_layer(service_name: String, config: Config) -> AnyResult<ApmLayer> {
17 ApmLayer::new(config, service_name)
18}