astrid-telemetry
Logging and tracing for the Astrid secure agent runtime SDK.
Features
- Configurable Logging: Multiple output formats (Pretty, Compact, JSON, Full)
- Flexible Targets: Output to stdout, stderr, or files
- Request Context: Correlation IDs for tracing requests across operations
- Tracing Integration: Built on the
tracingecosystem - Builder Pattern: Fluent API for configuration
- Serializable Config: Load logging configuration from JSON/TOML
Usage
use ;
Log Formats
| Format | Description |
|---|---|
Pretty |
Human-readable with colors (default) |
Compact |
Single-line format |
Json |
Structured JSON for log aggregation |
Full |
All fields included |
Request Context
RequestContext provides correlation across distributed operations:
use RequestContext;
let ctx = new
.with_operation
.with_session_id
.with_user_id;
// Create child contexts that inherit correlation IDs
let child_ctx = ctx.child;
License
This crate is licensed under the MIT license.