#[non_exhaustive]pub enum MetricValue {
Show 17 variants
OperationBytes(u64),
OperationBytesRate(f64),
OperationEntries(u64),
OperationEntriesRate(f64),
OperationDurationSeconds(Duration),
OperationErrorsTotal,
OperationExecuting(isize),
OperationTtfbSeconds(Duration),
HttpExecuting(isize),
HttpRequestBytes(u64),
HttpRequestBytesRate(f64),
HttpRequestDurationSeconds(Duration),
HttpResponseBytes(u64),
HttpResponseBytesRate(f64),
HttpResponseDurationSeconds(Duration),
HttpConnectionErrorsTotal,
HttpStatusErrorsTotal,
}
Expand description
MetricValue is the value the opendal sends to the metrics impls.
Metrics impls can be prometheus_client
, metrics
etc.
Every metrics impls SHOULD implement observe over the MetricValue to make sure they provide the consistent metrics for users.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OperationBytes(u64)
Record the size of data processed in bytes. Metrics impl: Update a Histogram with the given byte count.
OperationBytesRate(f64)
Record the rate of data processing in bytes/second. Metrics impl: Update a Histogram with the calculated rate value.
OperationEntries(u64)
Record the number of entries (files, objects, keys) processed. Metrics impl: Update a Histogram with the entry count.
OperationEntriesRate(f64)
Record the rate of entries processing in entries/second. Metrics impl: Update a Histogram with the calculated rate value.
OperationDurationSeconds(Duration)
Record the total duration of an operation. Metrics impl: Update a Histogram with the duration converted to seconds (as f64).
OperationErrorsTotal
Increment the counter for operation errors. Metrics impl: Increment a Counter by 1.
OperationExecuting(isize)
Update the current number of executing operations. Metrics impl: Add the value (positive or negative) to a Gauge.
OperationTtfbSeconds(Duration)
Record the time to first byte duration. Metrics impl: Update a Histogram with the duration converted to seconds (as f64).
HttpExecuting(isize)
Update the current number of executing HTTP requests. Metrics impl: Add the value (positive or negative) to a Gauge.
HttpRequestBytes(u64)
Record the size of HTTP request body in bytes. Metrics impl: Update a Histogram with the given byte count.
HttpRequestBytesRate(f64)
Record the rate of HTTP request data in bytes/second. Metrics impl: Update a Histogram with the calculated rate value.
HttpRequestDurationSeconds(Duration)
Record the duration of sending an HTTP request (until first byte received). Metrics impl: Update a Histogram with the duration converted to seconds (as f64).
HttpResponseBytes(u64)
Record the size of HTTP response body in bytes. Metrics impl: Update a Histogram with the given byte count.
HttpResponseBytesRate(f64)
Record the rate of HTTP response data in bytes/second. Metrics impl: Update a Histogram with the calculated rate value.
HttpResponseDurationSeconds(Duration)
Record the duration of receiving an HTTP response (from first byte to last). Metrics impl: Update a Histogram with the duration converted to seconds (as f64).
HttpConnectionErrorsTotal
Increment the counter for HTTP connection errors. Metrics impl: Increment a Counter by 1.
HttpStatusErrorsTotal
Increment the counter for HTTP status errors (non-2xx responses). Metrics impl: Increment a Counter by 1.
Implementations§
Source§impl MetricValue
impl MetricValue
Trait Implementations§
Source§impl Clone for MetricValue
impl Clone for MetricValue
Source§fn clone(&self) -> MetricValue
fn clone(&self) -> MetricValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more