Files
greptimedb/object_store/layers/observe/index.html
2026-03-13 04:38:03 +00:00

50 lines
14 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="OpenDAL Observability"><title>object_store::layers::observe - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="object_store" data-themes="" data-resource-suffix="" data-rustdoc-version="1.92.0-nightly (fa3155a64 2025-09-30)" data-channel="nightly" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-828709d0.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-ce535bd0.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module observe</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../object_store/index.html">object_<wbr>store</a><span class="version">1.0.0-rc.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module observe</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#opendal-metrics-reference" title="OpenDAL Metrics Reference">OpenDAL Metrics Reference</a><ul><li><a href="#operation-metrics" title="Operation Metrics">Operation Metrics</a></li><li><a href="#http-metrics" title="HTTP Metrics">HTTP Metrics</a></li><li><a href="#label-descriptions" title="Label Descriptions">Label Descriptions</a></li><li><a href="#metric-types" title="Metric Types">Metric Types</a></li></ul></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#statics" title="Statics">Statics</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In object_<wbr>store::<wbr>layers</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">object_store</a>::<wbr><a href="../index.html">layers</a></div><h1>Module <span>observe</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>OpenDAL Observability</p>
<p>This module offers essential components to facilitate the implementation of observability in OpenDAL.</p>
<h2 id="opendal-metrics-reference"><a class="doc-anchor" href="#opendal-metrics-reference">§</a>OpenDAL Metrics Reference</h2>
<p>This document describes all metrics exposed by OpenDAL.</p>
<h3 id="operation-metrics"><a class="doc-anchor" href="#operation-metrics">§</a>Operation Metrics</h3>
<p>These metrics track operations at the storage abstraction level.</p>
<div><table><thead><tr><th>Metric Name</th><th>Type</th><th>Description</th><th>Labels</th></tr></thead><tbody>
<tr><td>operation_bytes</td><td>Histogram</td><td>Current operation size in bytes, represents the size of data being processed</td><td>scheme, namespace, root, operation, path</td></tr>
<tr><td>operation_bytes_rate</td><td>Histogram</td><td>Histogram of data processing rates in bytes per second within individual operations</td><td>scheme, namespace, root, operation, path</td></tr>
<tr><td>operation_entries</td><td>Histogram</td><td>Current operation size in entries, represents the entries being processed</td><td>scheme, namespace, root, operation, path</td></tr>
<tr><td>operation_entries_rate</td><td>Histogram</td><td>Histogram of entries processing rates in entries per second within individual operations</td><td>scheme, namespace, root, operation, path</td></tr>
<tr><td>operation_duration_seconds</td><td>Histogram</td><td>Duration of operations in seconds, measured from start to completion</td><td>scheme, namespace, root, operation, path</td></tr>
<tr><td>operation_errors_total</td><td>Counter</td><td>Total number of failed operations</td><td>scheme, namespace, root, operation, path, error</td></tr>
<tr><td>operation_executing</td><td>Gauge</td><td>Number of operations currently being executed</td><td>scheme, namespace, root, operation</td></tr>
<tr><td>operation_ttfb_seconds</td><td>Histogram</td><td>Time to first byte in seconds for operations</td><td>scheme, namespace, root, operation, path</td></tr>
</tbody></table>
</div><h3 id="http-metrics"><a class="doc-anchor" href="#http-metrics">§</a>HTTP Metrics</h3>
<p>These metrics track the underlying HTTP requests made by OpenDAL services that use HTTP.</p>
<div><table><thead><tr><th>Metric Name</th><th>Type</th><th>Description</th><th>Labels</th></tr></thead><tbody>
<tr><td>http_connection_errors_total</td><td>Counter</td><td>Total number of HTTP requests that failed before receiving a response</td><td>scheme, namespace, root, operation, error</td></tr>
<tr><td>http_status_errors_total</td><td>Counter</td><td>Total number of HTTP requests that received error status codes (non-2xx responses)</td><td>scheme, namespace, root, operation, status</td></tr>
<tr><td>http_executing</td><td>Gauge</td><td>Number of HTTP requests currently in flight from this client</td><td>scheme, namespace, root</td></tr>
<tr><td>http_request_bytes</td><td>Histogram</td><td>Histogram of HTTP request body sizes in bytes</td><td>scheme, namespace, root, operation</td></tr>
<tr><td>http_request_bytes_rate</td><td>Histogram</td><td>Histogram of HTTP request bytes per second rates</td><td>scheme, namespace, root, operation</td></tr>
<tr><td>http_request_duration_seconds</td><td>Histogram</td><td>Histogram of time spent sending HTTP requests, from first byte sent to first byte received</td><td>scheme, namespace, root, operation</td></tr>
<tr><td>http_response_bytes</td><td>Histogram</td><td>Histogram of HTTP response body sizes in bytes</td><td>scheme, namespace, root, operation</td></tr>
<tr><td>http_response_bytes_rate</td><td>Histogram</td><td>Histogram of HTTP response bytes per second rates</td><td>scheme, namespace, root, operation</td></tr>
<tr><td>http_response_duration_seconds</td><td>Histogram</td><td>Histogram of time spent receiving HTTP responses, from first byte to last byte received</td><td>scheme, namespace, root, operation</td></tr>
</tbody></table>
</div><h3 id="label-descriptions"><a class="doc-anchor" href="#label-descriptions">§</a>Label Descriptions</h3><div><table><thead><tr><th>Label</th><th>Description</th><th>Example Values</th></tr></thead><tbody>
<tr><td>scheme</td><td>The storage service scheme</td><td>s3, gcs, azblob, fs, memory</td></tr>
<tr><td>namespace</td><td>The storage service namespace (bucket, container, etc.)</td><td>my-bucket, my-container</td></tr>
<tr><td>root</td><td>The root path within the namespace</td><td>/data, /backup</td></tr>
<tr><td>operation</td><td>The operation being performed</td><td>read, write, stat, list, delete</td></tr>
<tr><td>path</td><td>The path of the object being operated on</td><td>/path/to/file.txt</td></tr>
<tr><td>error</td><td>The error type or message for error metrics</td><td>not_found, permission_denied</td></tr>
<tr><td>status</td><td>The HTTP status code for HTTP error metrics</td><td>404, 403, 500</td></tr>
</tbody></table>
</div><h3 id="metric-types"><a class="doc-anchor" href="#metric-types">§</a>Metric Types</h3>
<ul>
<li><strong>Histogram</strong>: Distribution of values with configurable buckets, includes count, sum and quantiles</li>
<li><strong>Counter</strong>: Cumulative metric that only increases over time (resets on restart)</li>
<li><strong>Gauge</strong>: Point-in-time metric that can increase and decrease</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.MetricLabels.html" title="struct object_store::layers::observe::MetricLabels">Metric<wbr>Labels</a></dt><dd>MetricLabels are the labels for the metrics.</dd><dt><a class="struct" href="struct.MetricsAccessor.html" title="struct object_store::layers::observe::MetricsAccessor">Metrics<wbr>Accessor</a></dt><dd>The metrics accessor for opendal.</dd><dt><a class="struct" href="struct.MetricsLayer.html" title="struct object_store::layers::observe::MetricsLayer">Metrics<wbr>Layer</a></dt><dd>The metrics layer for opendal.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.MetricValue.html" title="enum object_store::layers::observe::MetricValue">Metric<wbr>Value</a></dt><dd>MetricValue is the value the opendal sends to the metrics impls.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.DEFAULT_BYTES_BUCKETS.html" title="constant object_store::layers::observe::DEFAULT_BYTES_BUCKETS">DEFAULT_<wbr>BYTES_<wbr>BUCKETS</a></dt><dd>Buckets for data size metrics like OperationBytes
Covers typical file and object sizes from small files to large objects</dd><dt><a class="constant" href="constant.DEFAULT_BYTES_RATE_BUCKETS.html" title="constant object_store::layers::observe::DEFAULT_BYTES_RATE_BUCKETS">DEFAULT_<wbr>BYTES_<wbr>RATE_<wbr>BUCKETS</a></dt><dd>Buckets for data transfer rate metrics like OperationBytesRate</dd><dt><a class="constant" href="constant.DEFAULT_DURATION_SECONDS_BUCKETS.html" title="constant object_store::layers::observe::DEFAULT_DURATION_SECONDS_BUCKETS">DEFAULT_<wbr>DURATION_<wbr>SECONDS_<wbr>BUCKETS</a></dt><dd>Buckets for operation duration metrics like OperationDurationSeconds
Covers timeframes from fast metadata operations to long-running transfers</dd><dt><a class="constant" href="constant.DEFAULT_ENTRIES_BUCKETS.html" title="constant object_store::layers::observe::DEFAULT_ENTRIES_BUCKETS">DEFAULT_<wbr>ENTRIES_<wbr>BUCKETS</a></dt><dd>Buckets for batch operation entry counts (OperationEntriesCount)
Covers scenarios from single entry operations to large batch operations</dd><dt><a class="constant" href="constant.DEFAULT_ENTRIES_RATE_BUCKETS.html" title="constant object_store::layers::observe::DEFAULT_ENTRIES_RATE_BUCKETS">DEFAULT_<wbr>ENTRIES_<wbr>RATE_<wbr>BUCKETS</a></dt><dd>Buckets for batch operation processing rates (OperationEntriesRate)
Measures how many entries can be processed per second</dd><dt><a class="constant" href="constant.DEFAULT_TTFB_BUCKETS.html" title="constant object_store::layers::observe::DEFAULT_TTFB_BUCKETS">DEFAULT_<wbr>TTFB_<wbr>BUCKETS</a></dt><dd>Buckets for time to first byte metrics like OperationTtfbSeconds
Focuses on initial response times, which are typically shorter than full operations</dd></dl><h2 id="statics" class="section-header">Statics<a href="#statics" class="anchor">§</a></h2><dl class="item-table"><dt><a class="static" href="static.LABEL_ERROR.html" title="static object_store::layers::observe::LABEL_ERROR">LABEL_<wbr>ERROR</a></dt><dd>The metric label for the error.</dd><dt><a class="static" href="static.LABEL_NAMESPACE.html" title="static object_store::layers::observe::LABEL_NAMESPACE">LABEL_<wbr>NAMESPACE</a></dt><dd>The metric label for the namespace like bucket name in s3.</dd><dt><a class="static" href="static.LABEL_OPERATION.html" title="static object_store::layers::observe::LABEL_OPERATION">LABEL_<wbr>OPERATION</a></dt><dd>The metric label for the operation like read, write, list.</dd><dt><a class="static" href="static.LABEL_ROOT.html" title="static object_store::layers::observe::LABEL_ROOT">LABEL_<wbr>ROOT</a></dt><dd>The metric label for the root path.</dd><dt><a class="static" href="static.LABEL_SCHEME.html" title="static object_store::layers::observe::LABEL_SCHEME">LABEL_<wbr>SCHEME</a></dt><dd>The metric label for the scheme like s3, fs, cos.</dd><dt><a class="static" href="static.LABEL_STATUS_CODE.html" title="static object_store::layers::observe::LABEL_STATUS_CODE">LABEL_<wbr>STATUS_<wbr>CODE</a></dt><dd>The metric label for the http code.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.MetricsIntercept.html" title="trait object_store::layers::observe::MetricsIntercept">Metrics<wbr>Intercept</a></dt><dd>The interceptor for metrics.</dd></dl></section></div></main></body></html>