Crate prima_tracing
source ·Expand description
prima_tracing provide an handy way for configuring the tracing crate with
support for JSON output formatter and integration with opentelemetry
Usage
use prima_tracing::{builder, configure_subscriber, Country, Environment, init_subscriber};
let subscriber = configure_subscriber(
builder("ping")
.with_country(Country::Common)
.with_env(Environment::Dev)
.build()
);
let _guard = init_subscriber(subscriber);Structs
- Information about the current app context like name or environment
SubscriberConfigconfiguration built viaSubscriberConfigBuilderIt contains- Uninstall guard for doing works in shutdown
Enums
- All the possible countries in which the application can run.
- All the possible environments in which the application can run.
Traits
EventFormatterallows you to customise the format of [tracing::Event] if thejson-loggerfeature is active
Functions
- Create a
SubscriberConfigBuilder - Configure a subscriber using
SubscriberConfig. The configuration is behind feature flags - Initialize the subscriber and return the
Uninstallguard