Expand description
Astrid Telemetry - Logging and tracing for the Astrid secure agent runtime.
This crate provides:
- Configurable logging setup with multiple formats
- Request context for correlation across operations
- Integration with the tracing ecosystem
§Example
use astrid_telemetry::{LogConfig, LogFormat, setup_logging, RequestContext};
// Set up logging
let config = LogConfig::new("debug")
.with_format(LogFormat::Pretty)
.with_directive("astrid_mcp=trace");
setup_logging(&config)?;
// Create a request context
let ctx = RequestContext::new("my_component")
.with_operation("process_request");
// Use the context's span for tracing
let span = ctx.span();
let _guard = span.enter();
tracing::info!("Processing request");Modules§
- prelude
- Prelude module - commonly used types for convenient import.
Structs§
- LogConfig
- Logging configuration.
- Request
Context - Request context for correlation across operations.
Enums§
- LogFormat
- Log format options.
- LogTarget
- Log output target.
- Telemetry
Error - Errors that can occur with telemetry operations.
Functions§
- setup_
logging - Set up logging with the given configuration.
Type Aliases§
- Telemetry
Result - Result type for telemetry operations.