Skip to main content

Module layers

Module layers 

Source
Expand description

Layers enabled through layers-* Cargo features.

A layer adds cross-service behavior to an Operator. Enable the matching facade feature, construct the layer, and pass it to Operator::layer. Layer order is observable, so review each layer’s composition notes when combining retries, timeouts, caching, or observability.

Structs§

AsyncBacktraceLayerlayers-async-backtrace
AsyncBacktraceLayer records efficient logical stack traces for asynchronous service operations.
AwaitTreeLayerlayers-await-tree
AwaitTreeLayer instruments service operations for actor-based applications.
CapabilityCheckLayerlayers-capability-check
CapabilityCheckLayer validates optional operation arguments against service capabilities.
CapabilityOverrideLayer
Layer for overriding an operator’s effective capability.
ChaosLayerlayers-chaos
ChaosLayer injects errors into services to test robustness.
ConcurrentLimitLayerlayers-concurrent-limit
ConcurrentLimitLayer controls how many concurrent requests OpenDAL can send to a storage service.
DefaultLoggingInterceptorlayers-logging
The DefaultLoggingInterceptor will log the message by the standard logging macro.
DefaultRetryInterceptorlayers-retry
The DefaultRetryInterceptor logs each retry error at warn level.
DtraceLayerLinux and layers-dtrace
DtraceLayer supports User Statically-Defined Tracing (USDT) on Linux.
FastmetricsLayerlayers-fastmetrics
FastmetricsLayer records OpenDAL operation and HTTP fetch metrics with fastmetrics.
FastmetricsLayerBuilderlayers-fastmetrics
FastmetricsLayerBuilder is a config builder to build a FastmetricsLayer.
FastraceLayerlayers-fastrace
FastraceLayer traces every operation with fastrace.
FoyerKeylayers-foyer
FoyerKey is a key for the foyer cache. It implements foyer’s [Code] trait directly, so the layer does not depend on foyer’s serde feature (and its bincode dependency).
FoyerLayerlayers-foyer
FoyerLayer caches OpenDAL data with foyer.
FoyerValuelayers-foyer
FoyerValue stores buffered object data in Foyer.
HotpathLayerlayers-hotpath
HotpathLayer profiles every operation with hotpath.
ImmutableIndexLayerlayers-immutable-index
ImmutableIndexLayer adds an immutable in-memory index to a storage service.
LoggingLayerlayers-logging
LoggingLayer records every operation with log.
MetricsLayerlayers-metrics
MetricsLayer records every operation with metrics.
MimeGuessLayerlayers-mime-guess
MimeGuessLayer sets Content-Type from a path’s file extension.
OtelMetricsLayerlayers-otel-metrics
OtelMetricsLayer records OpenDAL operation and HTTP fetch metrics with [opentelemetry::metrics].
OtelMetricsLayerBuilderlayers-otel-metrics
OtelMetricsLayerBuilder is a config builder to build a OtelMetricsLayer.
OtelTraceLayerlayers-otel-trace
OtelTraceLayer traces OpenDAL operations with OpenTelemetry.
PrometheusClientLayerlayers-prometheus-client
PrometheusClientLayer records OpenDAL operation and HTTP fetch metrics with prometheus-client.
PrometheusClientLayerBuilderlayers-prometheus-client
PrometheusClientLayerBuilder is a config builder to build a PrometheusClientLayer.
PrometheusLayerlayers-prometheus
PrometheusLayer records OpenDAL operation and HTTP fetch metrics with prometheus.
PrometheusLayerBuilderlayers-prometheus
PrometheusLayerBuilder is a config builder to build a PrometheusLayer.
RetryEventlayers-retry
Context passed to RetryInterceptor before each retry sleep.
RetryLayerlayers-retry
RetryLayer retries temporarily failed operations.
RouteLayerlayers-route
RouteLayer routes operations to different operators by matching paths against glob patterns.
RouteLayerBuilderlayers-route
Builder for RouteLayer.
SimulateLayer
Simulate missing capabilities for backends in a configurable way.
TailCutLayerlayers-tail-cut
TailCutLayer monitors request latency and cancels requests that run significantly slower than the historical baseline (for example, slower than P95).
TailCutLayerBuilderlayers-tail-cut
Builder for TailCutLayer.
ThrottleLayerlayers-throttle
ThrottleLayer limits bandwidth for storage services.
TimeoutLayerlayers-timeout
TimeoutLayer adds deadlines to operations so slow or stalled work cannot hang indefinitely.
TracingLayerlayers-tracing
TracingLayer traces every operation with tracing.

Traits§

ConcurrentLimitSemaphorelayers-concurrent-limit
ConcurrentLimitSemaphore abstracts a semaphore-like concurrency primitive that yields an owned permit released on drop.
LoggingInterceptorlayers-logging
LoggingInterceptor customizes log emission.
RetryInterceptorlayers-retry
RetryInterceptor observes retry attempts before the retry sleep.