Skip to main content

Crate easy_tracing

Crate easy_tracing 

Source
Expand description

§easy Usage

 easy_tracing::init(
     "app-name",
     "INFO",
     easy_tracing::LogFormat::Line,
     Some("127.0.0.1:4317"),
 );

§Logging

Logging is implemented using the tracing-subscriber library. After initialization, you can directly output logs through macros like tracing::info!() and tracing::error!(). Both Line and Json log formats are supported.

§Tracing

Distributed tracing is implemented using the OpenTelemetry SDK. It only supports output via the OTLP gRPC protocol, and by default, trace information will be included in the logs.

§Metrics

Manual metric instrumentation is not supported by default. It is recommended to use spanmetricsconnector to convert span data to metric data for observation rather than manual instrumentation.

Enums§

LogFormat

Functions§

init