Expand description
§SZ-ORM Tracing — Distributed tracing
Provides Span/Tracer abstractions for distributed tracing, with OTLP exporter reporting support, for collection and visualization of cross-service call chains.
§Main types
Span— single trace segmentTracer— tracer and exporter
§Sampling and context propagation (sampling module)
sampling::Sampler/sampling::TraceIdRatioSampler— sampling strategiessampling::Baggage/sampling::BaggagePropagator— W3C Baggage propagationsampling::BatchSpanExporter— batch Span export
Re-exports§
pub use sampling::AlwaysOffSampler;pub use sampling::AlwaysOnSampler;pub use sampling::Baggage;pub use sampling::BaggagePropagator;pub use sampling::BatchConfig;pub use sampling::BatchSpanExporter;pub use sampling::ParentBasedSampler;pub use sampling::Sampler;pub use sampling::SamplingDecision;pub use sampling::TraceIdRatioSampler;
Modules§
- sampling
- 采样策略与 Baggage 传播
Structs§
- Alert
- Alert event, produced by
SaturationGauge/SlaMonitorand other components when an anomaly is detected, and dispatched downstream (logs, webhooks, etc.) viaAlertHook. - Error
Budget - Error budget, based on the SLO target and a sliding time window.
- Error
Rate Counter - Error rate counter, based on a sliding time window for error rate statistics.
- InMemory
Alert Hook - In-memory alert hook (not a real webhook): stores alerts in memory without any network sends.
- Latency
Histogram - Latency percentile histogram.
- LogAlert
Hook - A simple implementation that writes alerts to the standard error stream.
- Otel
Tracer - A compatibility wrapper that exposes the same
Tracerinterface as the OpenTelemetry SDK but is implemented internally by delegating every call to aSzTracer. - Saturation
Gauge - Saturation alert gauge.
- SlaMonitor
- SLA monitor, aggregates latency and error statistics by operation name, and generates
SlaReport. - SlaReport
- SLA monitoring report snapshot, generated by
SlaMonitor::report. - Span
- SpanLog
- SzTracer
Enums§
- Alert
Level - Alert level.
- Tracing
Error