Module observe

Source
Expand description

OpenDAL Observability

This module offers essential components to facilitate the implementation of observability in OpenDAL.

§OpenDAL Metrics Reference

This document describes all metrics exposed by OpenDAL.

§Operation Metrics

These metrics track operations at the storage abstraction level.

Metric NameTypeDescriptionLabels
operation_bytesHistogramCurrent operation size in bytes, represents the size of data being processedscheme, namespace, root, operation, path
operation_bytes_rateHistogramHistogram of data processing rates in bytes per second within individual operationsscheme, namespace, root, operation, path
operation_entriesHistogramCurrent operation size in entries, represents the entries being processedscheme, namespace, root, operation, path
operation_entries_rateHistogramHistogram of entries processing rates in entries per second within individual operationsscheme, namespace, root, operation, path
operation_duration_secondsHistogramDuration of operations in seconds, measured from start to completionscheme, namespace, root, operation, path
operation_errors_totalCounterTotal number of failed operationsscheme, namespace, root, operation, path, error
operation_executingGaugeNumber of operations currently being executedscheme, namespace, root, operation
operation_ttfb_secondsHistogramTime to first byte in seconds for operationsscheme, namespace, root, operation, path

§HTTP Metrics

These metrics track the underlying HTTP requests made by OpenDAL services that use HTTP.

Metric NameTypeDescriptionLabels
http_connection_errors_totalCounterTotal number of HTTP requests that failed before receiving a responsescheme, namespace, root, operation, error
http_status_errors_totalCounterTotal number of HTTP requests that received error status codes (non-2xx responses)scheme, namespace, root, operation, status
http_executingGaugeNumber of HTTP requests currently in flight from this clientscheme, namespace, root
http_request_bytesHistogramHistogram of HTTP request body sizes in bytesscheme, namespace, root, operation
http_request_bytes_rateHistogramHistogram of HTTP request bytes per second ratesscheme, namespace, root, operation
http_request_duration_secondsHistogramHistogram of time spent sending HTTP requests, from first byte sent to first byte receivedscheme, namespace, root, operation
http_response_bytesHistogramHistogram of HTTP response body sizes in bytesscheme, namespace, root, operation
http_response_bytes_rateHistogramHistogram of HTTP response bytes per second ratesscheme, namespace, root, operation
http_response_duration_secondsHistogramHistogram of time spent receiving HTTP responses, from first byte to last byte receivedscheme, namespace, root, operation

§Label Descriptions

LabelDescriptionExample Values
schemeThe storage service schemes3, gcs, azblob, fs, memory
namespaceThe storage service namespace (bucket, container, etc.)my-bucket, my-container
rootThe root path within the namespace/data, /backup
operationThe operation being performedread, write, stat, list, delete
pathThe path of the object being operated on/path/to/file.txt
errorThe error type or message for error metricsnot_found, permission_denied
statusThe HTTP status code for HTTP error metrics404, 403, 500

§Metric Types

  • Histogram: Distribution of values with configurable buckets, includes count, sum and quantiles
  • Counter: Cumulative metric that only increases over time (resets on restart)
  • Gauge: Point-in-time metric that can increase and decrease

Structs§

MetricLabels
MetricLabels are the labels for the metrics.
MetricsAccessor
The metrics accessor for opendal.
MetricsLayer
The metrics layer for opendal.

Enums§

MetricValue
MetricValue is the value the opendal sends to the metrics impls.

Constants§

DEFAULT_BYTES_BUCKETS
Buckets for data size metrics like OperationBytes Covers typical file and object sizes from small files to large objects
DEFAULT_BYTES_RATE_BUCKETS
Buckets for data transfer rate metrics like OperationBytesRate
DEFAULT_DURATION_SECONDS_BUCKETS
Buckets for operation duration metrics like OperationDurationSeconds Covers timeframes from fast metadata operations to long-running transfers
DEFAULT_ENTRIES_BUCKETS
Buckets for batch operation entry counts (OperationEntriesCount) Covers scenarios from single entry operations to large batch operations
DEFAULT_ENTRIES_RATE_BUCKETS
Buckets for batch operation processing rates (OperationEntriesRate) Measures how many entries can be processed per second
DEFAULT_TTFB_BUCKETS
Buckets for time to first byte metrics like OperationTtfbSeconds Focuses on initial response times, which are typically shorter than full operations

Statics§

LABEL_ERROR
The metric label for the error.
LABEL_NAMESPACE
The metric label for the namespace like bucket name in s3.
LABEL_OPERATION
The metric label for the operation like read, write, list.
LABEL_ROOT
The metric label for the root path.
LABEL_SCHEME
The metric label for the scheme like s3, fs, cos.
LABEL_STATUS_CODE
The metric label for the http code.

Traits§

MetricsIntercept
The interceptor for metrics.