mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-26 05:36:16 +00:00
47 lines
16 KiB
HTML
47 lines
16 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="API documentation for the Rust `metrics` mod in crate `log_store`."><title>log_store::metrics - 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-1ed95124.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="log_store" data-themes="" data-resource-suffix="" data-rustdoc-version="1.98.1 (48a229cea 2026-09-01)" data-channel="1.98.1" data-search-js="search-9944d736.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-417ebf0a.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.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"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[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 metrics</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../log_store/index.html">log_<wbr>store</a><span class="version">1.4.0-alpha.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module metrics</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate log_<wbr>store</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" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">log_store</a></div><h1>Module <span>metrics</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/log_store/metrics.rs.html#15-311">Source</a> </span></div><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.METRIC_KAFKA_APPEND_BATCH_BYTES_TOTAL.html" title="struct log_store::metrics::METRIC_KAFKA_APPEND_BATCH_BYTES_TOTAL">METRIC_<wbr>KAFKA_<wbr>APPEND_<wbr>BATCH_<wbr>BYTES_<wbr>TOTAL</a></dt><dd>Counter of bytes of the append_batch operation on the kafka logstore.</dd><dt><a class="struct" href="struct.METRIC_KAFKA_APPEND_BATCH_ELAPSED.html" title="struct log_store::metrics::METRIC_KAFKA_APPEND_BATCH_ELAPSED">METRIC_<wbr>KAFKA_<wbr>APPEND_<wbr>BATCH_<wbr>ELAPSED</a></dt><dd>Timer of the append_batch operation on the kafka logstore.</dd><dt><a class="struct" href="struct.METRIC_KAFKA_CLIENT_BYTES_TOTAL.html" title="struct log_store::metrics::METRIC_KAFKA_CLIENT_BYTES_TOTAL">METRIC_<wbr>KAFKA_<wbr>CLIENT_<wbr>BYTES_<wbr>TOTAL</a></dt><dt><a class="struct" href="struct.METRIC_KAFKA_CLIENT_PRODUCE_ELAPSED.html" title="struct log_store::metrics::METRIC_KAFKA_CLIENT_PRODUCE_ELAPSED">METRIC_<wbr>KAFKA_<wbr>CLIENT_<wbr>PRODUCE_<wbr>ELAPSED</a></dt><dt><a class="struct" href="struct.METRIC_KAFKA_CLIENT_TRAFFIC_TOTAL.html" title="struct log_store::metrics::METRIC_KAFKA_CLIENT_TRAFFIC_TOTAL">METRIC_<wbr>KAFKA_<wbr>CLIENT_<wbr>TRAFFIC_<wbr>TOTAL</a></dt><dt><a class="struct" href="struct.METRIC_KAFKA_READ_BYTES_TOTAL.html" title="struct log_store::metrics::METRIC_KAFKA_READ_BYTES_TOTAL">METRIC_<wbr>KAFKA_<wbr>READ_<wbr>BYTES_<wbr>TOTAL</a></dt><dd>Counter of bytes of the read operation on the kafka logstore.</dd><dt><a class="struct" href="struct.METRIC_KAFKA_READ_ELAPSED.html" title="struct log_store::metrics::METRIC_KAFKA_READ_ELAPSED">METRIC_<wbr>KAFKA_<wbr>READ_<wbr>ELAPSED</a></dt><dd>Timer of the append_batch operation on the kafka logstore.
|
|
This timer only measures the duration of the read operation, not measures the total duration of replay.</dd><dt><a class="struct" href="struct.METRIC_LOGSTORE_OP_BYTES_TOTAL.html" title="struct log_store::metrics::METRIC_LOGSTORE_OP_BYTES_TOTAL">METRIC_<wbr>LOGSTORE_<wbr>OP_<wbr>BYTES_<wbr>TOTAL</a></dt><dd>Counters of bytes of each operation on a logstore.</dd><dt><a class="struct" href="struct.METRIC_LOGSTORE_OP_ELAPSED.html" title="struct log_store::metrics::METRIC_LOGSTORE_OP_ELAPSED">METRIC_<wbr>LOGSTORE_<wbr>OP_<wbr>ELAPSED</a></dt><dd>Timer of operations on a logstore.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_APPEND_ACK_SECONDS.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_APPEND_ACK_SECONDS">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>APPEND_<wbr>ACK_<wbr>SECONDS</a></dt><dd>How long an append of the object store logstore waits for its
|
|
acknowledgement in the <code>durable</code> mode, which is the write latency a
|
|
caller sees.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_CREATED_OBJECTS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_CREATED_OBJECTS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>CREATED_<wbr>OBJECTS_<wbr>TOTAL</a></dt><dd>Counter of conditional creates of the object store logstore that
|
|
succeeded, an identical retry that found its own object included. A
|
|
create that failed is counted in the create failure or conflict counter
|
|
instead.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_CREATE_CONFLICTS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_CREATE_CONFLICTS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>CREATE_<wbr>CONFLICTS_<wbr>TOTAL</a></dt><dd>Counter of conditional creates of the object store logstore that found
|
|
an object with different content. In the <code>durable</code> mode an object of an
|
|
earlier epoch fails the batch like a transient failure; any other
|
|
conflict poisons the store.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_CREATE_FAILURES_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_CREATE_FAILURES_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>CREATE_<wbr>FAILURES_<wbr>TOTAL</a></dt><dd>Counter of conditional creates of the object store logstore the object
|
|
store did not confirm, which fail the appends behind them in the
|
|
<code>durable</code> mode and are repeated in the <code>enqueued</code> mode.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_DELETED_OBJECTS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_DELETED_OBJECTS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>DELETED_<wbr>OBJECTS_<wbr>TOTAL</a></dt><dd>Counter of objects the object store logstore deleted because no
|
|
region needs them any more.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_FAILED_DELETES_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_FAILED_DELETES_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>FAILED_<wbr>DELETES_<wbr>TOTAL</a></dt><dd>Counter of object deletes of the object store logstore that failed and
|
|
are attempted again at the next collection.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_FAILING.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_FAILING">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>FAILING</a></dt><dd>Number of object store logstores in the <code>enqueued</code> mode whose backlog
|
|
the object store refuses with an error that repeating the create
|
|
cannot settle, such as denied access or a missing bucket. Such a store
|
|
keeps its backlog, attempts it again with backoff and rejects appends
|
|
until a create succeeds.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_INDEXED_BYTES.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_INDEXED_BYTES">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>INDEXED_<wbr>BYTES</a></dt><dd>Bytes of the objects the object store logstore has indexed, which is
|
|
what the WAL occupies under its prefix.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_INDEXED_OBJECTS.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_INDEXED_OBJECTS">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>INDEXED_<wbr>OBJECTS</a></dt><dd>Number of objects the object store logstore has indexed, which is what
|
|
a recovery of the prefix would have to read.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_OBJECT_BYTES.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_OBJECT_BYTES">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>OBJECT_<wbr>BYTES</a></dt><dd>How large the objects of the object store logstore are, which says
|
|
whether batches seal on size or on the flush interval.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_OBJECT_ENTRIES.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_OBJECT_ENTRIES">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>OBJECT_<wbr>ENTRIES</a></dt><dd>How many entries the objects of the object store logstore hold, which
|
|
says how many writes one request amortises.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_POISONED_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_POISONED_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>POISONED_<wbr>TOTAL</a></dt><dd>Counter of object store logstores that hit an error they cannot recover
|
|
from, after which every operation of the store fails until it reopens.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_READ_SECONDS.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_READ_SECONDS">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>READ_<wbr>SECONDS</a></dt><dd>How long a read stream of the object store logstore took to serve the
|
|
replay of one region, recorded once the stream has been read to its
|
|
end; one that fails or is dropped part way records nothing.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_RECOVERED_OBJECTS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_RECOVERED_OBJECTS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>RECOVERED_<wbr>OBJECTS_<wbr>TOTAL</a></dt><dd>Counter of objects a recovery of the object store logstore that
|
|
succeeded read footers from, which is what its time is spent on. It
|
|
counts the objects of the same recoveries the timer above measures, so
|
|
an abandoned one contributes to neither.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_RECOVERY_SECONDS.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_RECOVERY_SECONDS">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>RECOVERY_<wbr>SECONDS</a></dt><dd>How long a recovery of the object store logstore that succeeded took to
|
|
rebuild its catalog, which is the part of a restart the WAL is
|
|
responsible for. A recovery that was abandoned records nothing.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_REJECTED_APPENDS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_REJECTED_APPENDS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>REJECTED_<wbr>APPENDS_<wbr>TOTAL</a></dt><dd>Counter of appends the object store logstore rejected while its
|
|
backlog is refused, see the gauge above. They take no entry id and
|
|
fail with a retryable error. Releases of dropped regions failed in
|
|
that state count too; their records wait for the next object.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_RELEASE_RECORDS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_RELEASE_RECORDS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>RELEASE_<wbr>RECORDS_<wbr>TOTAL</a></dt><dd>Counter of release records in the objects the object store logstore
|
|
indexed, including records carried over from batches that failed.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_SEAL_TO_DURABLE_SECONDS.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_SEAL_TO_DURABLE_SECONDS">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>SEAL_<wbr>TO_<wbr>DURABLE_<wbr>SECONDS</a></dt><dd>How long an object of the object store logstore takes to become durable
|
|
once its batch is sealed, sampled for every conditional create that
|
|
succeeds, an identical retry included. The time runs from the seal, so
|
|
it includes any wait for a create slot and, in the <code>enqueued</code> mode,
|
|
every repeated attempt and the delay before it.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_SKIPPED_SEGMENTS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_SKIPPED_SEGMENTS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>SKIPPED_<wbr>SEGMENTS_<wbr>TOTAL</a></dt><dd>Counter of segments a read of the object store logstore skipped because
|
|
they did not decode.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_STALLED_APPENDS_TOTAL.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_STALLED_APPENDS_TOTAL">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>STALLED_<wbr>APPENDS_<wbr>TOTAL</a></dt><dd>Counter of appends the object store logstore held back until an upload
|
|
completed: in either mode because the sealed batches waiting to become
|
|
durable left no room for another, and in the <code>enqueued</code> mode also
|
|
because the unpersisted backlog reached a threshold. Either says the
|
|
write rate is above what the uploads sustain.</dd><dt><a class="struct" href="struct.METRIC_OBJECT_STORE_WAL_STALLED_APPEND_SECONDS.html" title="struct log_store::metrics::METRIC_OBJECT_STORE_WAL_STALLED_APPEND_SECONDS">METRIC_<wbr>OBJECT_<wbr>STORE_<wbr>WAL_<wbr>STALLED_<wbr>APPEND_<wbr>SECONDS</a></dt><dd>How long such an append stays held back, until it is admitted or until
|
|
it is refused, a stop, a terminal error or the teardown of the store
|
|
releasing it included, which is the latency the <code>enqueued</code> mode pays
|
|
once the backlog is at a threshold.</dd><dt><a class="struct" href="struct.METRIC_RAFT_ENGINE_APPEND_BATCH_BYTES_TOTAL.html" title="struct log_store::metrics::METRIC_RAFT_ENGINE_APPEND_BATCH_BYTES_TOTAL">METRIC_<wbr>RAFT_<wbr>ENGINE_<wbr>APPEND_<wbr>BATCH_<wbr>BYTES_<wbr>TOTAL</a></dt><dd>Counter of bytes of the append_batch operation on the raft-engine logstore.</dd><dt><a class="struct" href="struct.METRIC_RAFT_ENGINE_APPEND_BATCH_ELAPSED.html" title="struct log_store::metrics::METRIC_RAFT_ENGINE_APPEND_BATCH_ELAPSED">METRIC_<wbr>RAFT_<wbr>ENGINE_<wbr>APPEND_<wbr>BATCH_<wbr>ELAPSED</a></dt><dd>Timer of the append_batch operation on the raft-engine logstore.</dd><dt><a class="struct" href="struct.METRIC_RAFT_ENGINE_READ_BYTES_TOTAL.html" title="struct log_store::metrics::METRIC_RAFT_ENGINE_READ_BYTES_TOTAL">METRIC_<wbr>RAFT_<wbr>ENGINE_<wbr>READ_<wbr>BYTES_<wbr>TOTAL</a></dt><dd>Counter of bytes of the read operation on the raft-engine logstore.</dd><dt><a class="struct" href="struct.METRIC_RAFT_ENGINE_READ_ELAPSED.html" title="struct log_store::metrics::METRIC_RAFT_ENGINE_READ_ELAPSED">METRIC_<wbr>RAFT_<wbr>ENGINE_<wbr>READ_<wbr>ELAPSED</a></dt><dd>Timer of the append_batch operation on the raft-engine logstore.
|
|
This timer only measures the duration of the read operation, not measures the total duration of replay.</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.LOGSTORE_LABEL.html" title="constant log_store::metrics::LOGSTORE_LABEL">LOGSTORE_<wbr>LABEL</a></dt><dd>Logstore label.</dd><dt><a class="constant" href="constant.OPTYPE_LABEL.html" title="constant log_store::metrics::OPTYPE_LABEL">OPTYPE_<wbr>LABEL</a></dt><dd>Operation type label.</dd><dt><a class="constant" href="constant.PARTITION_LABEL.html" title="constant log_store::metrics::PARTITION_LABEL">PARTITION_<wbr>LABEL</a></dt><dd>Kafka partition label.</dd><dt><a class="constant" href="constant.TOPIC_LABEL.html" title="constant log_store::metrics::TOPIC_LABEL">TOPIC_<wbr>LABEL</a></dt><dd>Kafka topic label.</dd></dl></section></div></main></body></html> |