Expand description
Logging utilities
Structs§
- ClapLogLevelArgs
clapA simple clap argument group for controlling the log level for cli usage. - The global logger/tracer for stdout, file and full open telemetry. Works with the tracing crates (info!, debug!, warn!, error!) and span funcs and decorators.
Functions§
- Force through logs, traces and metrics, useful in e.g. testing.
- meter
opentelemetryReturns a newopentelemetry::metrics::Meterwith the provided name and default configuration. - Record an exception to the currently active span. Matches oltp spec so it shows up correctly as an exception in observers https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/
- set_response_headers_from_ctx
opentelemetrySet the response headers from the current span context. So downstream services can continue the current trace. - set_span_parent_from_http_headers
opentelemetryConnect this program’s span to the trace that is represented by the provided HTTP headers. E.g. connect an axum handler’s trace/span to the nginx trace/span. - Shutdown the logger, traces and metrics, should be called when the program is about to exit.