| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>Metrics (kafka 3.5.2 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.kafka.common.metrics, class: Metrics"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.kafka.common.metrics</a></div> |
| <h1 title="Class Metrics" class="title">Class Metrics</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.kafka.common.metrics.Metrics</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Closeable.html" title="class or interface in java.io" class="external-link">Closeable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Metrics</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| implements <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Closeable.html" title="class or interface in java.io" class="external-link">Closeable</a></span></div> |
| <div class="block">A registry of sensors and metrics. |
| <p> |
| A metric is a named, numerical measurement. A sensor is a handle to record numerical measurements as they occur. Each |
| Sensor has zero or more associated metrics. For example a Sensor might represent message sizes and we might associate |
| with this sensor a metric for the average, maximum, or other statistics computed off the sequence of message sizes |
| that are recorded by the sensor. |
| <p> |
| Usage looks something like this: |
| |
| <pre> |
| // set up metrics: |
| Metrics metrics = new Metrics(); // this is the global repository of metrics and sensors |
| Sensor sensor = metrics.sensor("message-sizes"); |
| MetricName metricName = new MetricName("message-size-avg", "producer-metrics"); |
| sensor.add(metricName, new Avg()); |
| metricName = new MetricName("message-size-max", "producer-metrics"); |
| sensor.add(metricName, new Max()); |
| |
| // as messages are sent we record the sizes |
| sensor.record(messageSize); |
| </pre></div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">Metrics</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Create a metrics repository with no metric reporters and default configuration.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.metrics.MetricConfig)" class="member-name-link">Metrics</a><wbr>(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Create a metrics repository with no reporters and the given default config.</div> |
| </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time)" class="member-name-link">Metrics</a><wbr>(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Create a metrics repository with a default config and the given metric reporters.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time,boolean)" class="member-name-link">Metrics</a><wbr>(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time, |
| boolean enableExpiration)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Create a metrics repository with a default config, given metric reporters and the ability to expire eligible sensors</div> |
| </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time,boolean,org.apache.kafka.common.metrics.MetricsContext)" class="member-name-link">Metrics</a><wbr>(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time, |
| boolean enableExpiration, |
| <a href="MetricsContext.html" title="interface in org.apache.kafka.common.metrics">MetricsContext</a> metricsContext)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Create a metrics repository with a default config, given metric reporters, the ability to expire eligible sensors |
| and MetricContext</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time,org.apache.kafka.common.metrics.MetricsContext)" class="member-name-link">Metrics</a><wbr>(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time, |
| <a href="MetricsContext.html" title="interface in org.apache.kafka.common.metrics">MetricsContext</a> metricsContext)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Create a metrics repository with a default config, metric reporters and metric context |
| Expiration of Sensors is disabled.</div> |
| </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.utils.Time)" class="member-name-link">Metrics</a><wbr>(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| org.apache.kafka.common.utils.Time time)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Create a metrics repository with no metric reporters and the given default configuration.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.common.utils.Time)" class="member-name-link">Metrics</a><wbr>(org.apache.kafka.common.utils.Time time)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Create a metrics repository with no metric reporters and default configuration.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.Measurable)" class="member-name-link">addMetric</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="Measurable.html" title="interface in org.apache.kafka.common.metrics">Measurable</a> measurable)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Add a metric to monitor an object that implements measurable.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.Measurable)" class="member-name-link">addMetric</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="Measurable.html" title="interface in org.apache.kafka.common.metrics">Measurable</a> measurable)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Add a metric to monitor an object that implements Measurable.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.MetricValueProvider)" class="member-name-link">addMetric</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="MetricValueProvider.html" title="interface in org.apache.kafka.common.metrics">MetricValueProvider</a><?> metricValueProvider)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Add a metric to monitor an object that implements MetricValueProvider.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricValueProvider)" class="member-name-link">addMetric</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricValueProvider.html" title="interface in org.apache.kafka.common.metrics">MetricValueProvider</a><?> metricValueProvider)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Add a metric to monitor an object that implements MetricValueProvider.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addMetricIfAbsent(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.MetricValueProvider)" class="member-name-link">addMetricIfAbsent</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="MetricValueProvider.html" title="interface in org.apache.kafka.common.metrics">MetricValueProvider</a><?> metricValueProvider)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create or get an existing metric to monitor an object that implements MetricValueProvider.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addReporter(org.apache.kafka.common.metrics.MetricsReporter)" class="member-name-link">addReporter</a><wbr>(<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a> reporter)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Add a MetricReporter</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#close()" class="member-name-link">close</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Close this metrics repository.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#config()" class="member-name-link">config</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSensor(java.lang.String)" class="member-name-link">getSensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get the sensor with the given name if it exists</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metric(org.apache.kafka.common.MetricName)" class="member-name-link">metric</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricInstance(org.apache.kafka.common.MetricNameTemplate,java.lang.String...)" class="member-name-link">metricInstance</a><wbr>(<a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common">MetricNameTemplate</a> template, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>... keyValue)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricInstance(org.apache.kafka.common.MetricNameTemplate,java.util.Map)" class="member-name-link">metricInstance</a><wbr>(<a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common">MetricNameTemplate</a> template, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> tags)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricName(java.lang.String,java.lang.String)" class="member-name-link">metricName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a MetricName with the given name, group and default tags specified in the metric configuration.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricName(java.lang.String,java.lang.String,java.lang.String)" class="member-name-link">metricName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> description)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a MetricName with the given name, group, description, and default tags |
| specified in the metric configuration.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricName(java.lang.String,java.lang.String,java.lang.String,java.lang.String...)" class="member-name-link">metricName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> description, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>... keyValue)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a MetricName with the given name, group, description, and keyValue as tags, plus default tags specified in the metric |
| configuration.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricName(java.lang.String,java.lang.String,java.lang.String,java.util.Map)" class="member-name-link">metricName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> description, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> tags)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a MetricName with the given name, group, description and tags, plus default tags specified in the metric |
| configuration.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metricName(java.lang.String,java.lang.String,java.util.Map)" class="member-name-link">metricName</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> tags)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a MetricName with the given name, group and tags, plus default tags specified in the metric |
| configuration.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a>,<wbr><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#metrics()" class="member-name-link">metrics</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get all the metrics currently maintained indexed by metricName</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeMetric(org.apache.kafka.common.MetricName)" class="member-name-link">removeMetric</a><wbr>(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Remove a metric if it exists and return it.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeReporter(org.apache.kafka.common.metrics.MetricsReporter)" class="member-name-link">removeReporter</a><wbr>(<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a> reporter)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Remove a MetricReporter</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#removeSensor(java.lang.String)" class="member-name-link">removeSensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Remove a sensor (if it exists), associated metrics and its children.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reporters()" class="member-name-link">reporters</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and no parent sensors.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,long,org.apache.kafka.common.metrics.Sensor...)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| long inactiveSensorExpirationTimeSeconds, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,long,org.apache.kafka.common.metrics.Sensor.RecordingLevel,org.apache.kafka.common.metrics.Sensor...)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| long inactiveSensorExpirationTimeSeconds, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.Sensor...)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.Sensor.RecordingLevel,org.apache.kafka.common.metrics.Sensor...)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.Sensor...)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.Sensor.RecordingLevel)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and no parent sensors and with a given |
| recording level.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#sensor(java.lang.String,org.apache.kafka.common.metrics.Sensor.RecordingLevel,org.apache.kafka.common.metrics.Sensor...)" class="member-name-link">sensor</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toHtmlTable(java.lang.String,java.lang.Iterable)" class="member-name-link">toHtmlTable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> domain, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common">MetricNameTemplate</a>> allMetrics)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Use the specified domain and metric name templates to generate an HTML table documenting the metrics.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span>()</div> |
| <div class="block">Create a metrics repository with no metric reporters and default configuration. |
| Expiration of Sensors is disabled.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.utils.Time)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(org.apache.kafka.common.utils.Time time)</span></div> |
| <div class="block">Create a metrics repository with no metric reporters and default configuration. |
| Expiration of Sensors is disabled.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.utils.Time)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| org.apache.kafka.common.utils.Time time)</span></div> |
| <div class="block">Create a metrics repository with no metric reporters and the given default configuration. |
| Expiration of Sensors is disabled.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.metrics.MetricConfig)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig)</span></div> |
| <div class="block">Create a metrics repository with no reporters and the given default config. This config will be used for any |
| metric that doesn't override its own config. Expiration of Sensors is disabled.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>defaultConfig</code> - The default config to use for all metrics that don't override their config</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time)</span></div> |
| <div class="block">Create a metrics repository with a default config and the given metric reporters. |
| Expiration of Sensors is disabled.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>defaultConfig</code> - The default config</dd> |
| <dd><code>reporters</code> - The metrics reporters</dd> |
| <dd><code>time</code> - The time instance to use with the metrics</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time,org.apache.kafka.common.metrics.MetricsContext)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time, |
| <a href="MetricsContext.html" title="interface in org.apache.kafka.common.metrics">MetricsContext</a> metricsContext)</span></div> |
| <div class="block">Create a metrics repository with a default config, metric reporters and metric context |
| Expiration of Sensors is disabled.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>defaultConfig</code> - The default config</dd> |
| <dd><code>reporters</code> - The metrics reporters</dd> |
| <dd><code>time</code> - The time instance to use with the metrics</dd> |
| <dd><code>metricsContext</code> - The metricsContext to initialize metrics reporter with</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time,boolean)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time, |
| boolean enableExpiration)</span></div> |
| <div class="block">Create a metrics repository with a default config, given metric reporters and the ability to expire eligible sensors</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>defaultConfig</code> - The default config</dd> |
| <dd><code>reporters</code> - The metrics reporters</dd> |
| <dd><code>time</code> - The time instance to use with the metrics</dd> |
| <dd><code>enableExpiration</code> - true if the metrics instance can garbage collect inactive sensors, false otherwise</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.common.metrics.MetricConfig,java.util.List,org.apache.kafka.common.utils.Time,boolean,org.apache.kafka.common.metrics.MetricsContext)"> |
| <h3>Metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Metrics</span><wbr><span class="parameters">(<a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> defaultConfig, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>> reporters, |
| org.apache.kafka.common.utils.Time time, |
| boolean enableExpiration, |
| <a href="MetricsContext.html" title="interface in org.apache.kafka.common.metrics">MetricsContext</a> metricsContext)</span></div> |
| <div class="block">Create a metrics repository with a default config, given metric reporters, the ability to expire eligible sensors |
| and MetricContext</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>defaultConfig</code> - The default config</dd> |
| <dd><code>reporters</code> - The metrics reporters</dd> |
| <dd><code>time</code> - The time instance to use with the metrics</dd> |
| <dd><code>enableExpiration</code> - true if the metrics instance can garbage collect inactive sensors, false otherwise</dd> |
| <dd><code>metricsContext</code> - The metricsContext to initialize metrics reporter with</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="metricName(java.lang.String,java.lang.String,java.lang.String,java.util.Map)"> |
| <h3>metricName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> description, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> tags)</span></div> |
| <div class="block">Create a MetricName with the given name, group, description and tags, plus default tags specified in the metric |
| configuration. Tag in tags takes precedence if the same tag key is specified in the default metric configuration.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the metric</dd> |
| <dd><code>group</code> - logical group name of the metrics to which this metric belongs</dd> |
| <dd><code>description</code> - A human-readable description to include in the metric</dd> |
| <dd><code>tags</code> - additional key/value attributes of the metric</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metricName(java.lang.String,java.lang.String,java.lang.String)"> |
| <h3>metricName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> description)</span></div> |
| <div class="block">Create a MetricName with the given name, group, description, and default tags |
| specified in the metric configuration.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the metric</dd> |
| <dd><code>group</code> - logical group name of the metrics to which this metric belongs</dd> |
| <dd><code>description</code> - A human-readable description to include in the metric</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metricName(java.lang.String,java.lang.String)"> |
| <h3>metricName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group)</span></div> |
| <div class="block">Create a MetricName with the given name, group and default tags specified in the metric configuration.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the metric</dd> |
| <dd><code>group</code> - logical group name of the metrics to which this metric belongs</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metricName(java.lang.String,java.lang.String,java.lang.String,java.lang.String...)"> |
| <h3>metricName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> description, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>... keyValue)</span></div> |
| <div class="block">Create a MetricName with the given name, group, description, and keyValue as tags, plus default tags specified in the metric |
| configuration. Tag in keyValue takes precedence if the same tag key is specified in the default metric configuration.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the metric</dd> |
| <dd><code>group</code> - logical group name of the metrics to which this metric belongs</dd> |
| <dd><code>description</code> - A human-readable description to include in the metric</dd> |
| <dd><code>keyValue</code> - additional key/value attributes of the metric (must come in pairs)</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metricName(java.lang.String,java.lang.String,java.util.Map)"> |
| <h3>metricName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricName</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> group, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> tags)</span></div> |
| <div class="block">Create a MetricName with the given name, group and tags, plus default tags specified in the metric |
| configuration. Tag in tags takes precedence if the same tag key is specified in the default metric configuration.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the metric</dd> |
| <dd><code>group</code> - logical group name of the metrics to which this metric belongs</dd> |
| <dd><code>tags</code> - key/value attributes of the metric</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toHtmlTable(java.lang.String,java.lang.Iterable)"> |
| <h3>toHtmlTable</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">toHtmlTable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> domain, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a><<a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common">MetricNameTemplate</a>> allMetrics)</span></div> |
| <div class="block">Use the specified domain and metric name templates to generate an HTML table documenting the metrics. A separate table section |
| will be generated for each of the MBeans and the associated attributes. The MBean names are lexicographically sorted to |
| determine the order of these sections. This order is therefore dependent upon the order of the |
| tags in each <a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common"><code>MetricNameTemplate</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>domain</code> - the domain or prefix for the JMX MBean names; may not be null</dd> |
| <dd><code>allMetrics</code> - the collection of all <a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common"><code>MetricNameTemplate</code></a> instances each describing one metric; may not be null</dd> |
| <dt>Returns:</dt> |
| <dd>the string containing the HTML table; never null</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="config()"> |
| <h3>config</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a></span> <span class="element-name">config</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getSensor(java.lang.String)"> |
| <h3>getSensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">getSensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div> |
| <div class="block">Get the sensor with the given name if it exists</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor</dd> |
| <dt>Returns:</dt> |
| <dd>Return the sensor or null if no such sensor exists</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and no parent sensors. This uses |
| a default recording level of INFO.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The sensor name</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.Sensor.RecordingLevel)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and no parent sensors and with a given |
| recording level.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The sensor name.</dd> |
| <dd><code>recordingLevel</code> - The recording level.</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.Sensor...)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors. All parent sensors will |
| receive every value recorded with this sensor. This uses a default recording level of INFO.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor</dd> |
| <dd><code>parents</code> - The parent sensors</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor that is created</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.Sensor.RecordingLevel,org.apache.kafka.common.metrics.Sensor...)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors. All parent sensors will |
| receive every value recorded with this sensor.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor.</dd> |
| <dd><code>parents</code> - The parent sensors.</dd> |
| <dd><code>recordingLevel</code> - The recording level.</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor that is created</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.Sensor...)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors. All parent sensors will |
| receive every value recorded with this sensor. This uses a default recording level of INFO.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor</dd> |
| <dd><code>config</code> - A default configuration to use for this sensor for metrics that don't have their own config</dd> |
| <dd><code>parents</code> - The parent sensors</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor that is created</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.Sensor.RecordingLevel,org.apache.kafka.common.metrics.Sensor...)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors. All parent sensors will |
| receive every value recorded with this sensor.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor</dd> |
| <dd><code>config</code> - A default configuration to use for this sensor for metrics that don't have their own config</dd> |
| <dd><code>recordingLevel</code> - The recording level.</dd> |
| <dd><code>parents</code> - The parent sensors</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor that is created</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,long,org.apache.kafka.common.metrics.Sensor.RecordingLevel,org.apache.kafka.common.metrics.Sensor...)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| long inactiveSensorExpirationTimeSeconds, |
| <a href="Sensor.RecordingLevel.html" title="enum class in org.apache.kafka.common.metrics">Sensor.RecordingLevel</a> recordingLevel, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors. All parent sensors will |
| receive every value recorded with this sensor.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor</dd> |
| <dd><code>config</code> - A default configuration to use for this sensor for metrics that don't have their own config</dd> |
| <dd><code>inactiveSensorExpirationTimeSeconds</code> - If no value if recorded on the Sensor for this duration of time, |
| it is eligible for removal</dd> |
| <dd><code>parents</code> - The parent sensors</dd> |
| <dd><code>recordingLevel</code> - The recording level.</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor that is created</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="sensor(java.lang.String,org.apache.kafka.common.metrics.MetricConfig,long,org.apache.kafka.common.metrics.Sensor...)"> |
| <h3>sensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a></span> <span class="element-name">sensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| long inactiveSensorExpirationTimeSeconds, |
| <a href="Sensor.html" title="class in org.apache.kafka.common.metrics">Sensor</a>... parents)</span></div> |
| <div class="block">Get or create a sensor with the given unique name and zero or more parent sensors. All parent sensors will |
| receive every value recorded with this sensor. This uses a default recording level of INFO.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor</dd> |
| <dd><code>config</code> - A default configuration to use for this sensor for metrics that don't have their own config</dd> |
| <dd><code>inactiveSensorExpirationTimeSeconds</code> - If no value if recorded on the Sensor for this duration of time, |
| it is eligible for removal</dd> |
| <dd><code>parents</code> - The parent sensors</dd> |
| <dt>Returns:</dt> |
| <dd>The sensor that is created</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="removeSensor(java.lang.String)"> |
| <h3>removeSensor</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">removeSensor</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div> |
| <div class="block">Remove a sensor (if it exists), associated metrics and its children.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - The name of the sensor to be removed</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.Measurable)"> |
| <h3>addMetric</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addMetric</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="Measurable.html" title="interface in org.apache.kafka.common.metrics">Measurable</a> measurable)</span></div> |
| <div class="block">Add a metric to monitor an object that implements measurable. This metric won't be associated with any sensor. |
| This is a way to expose existing values as metrics. |
| |
| This method is kept for binary compatibility purposes, it has the same behaviour as |
| <a href="#addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricValueProvider)"><code>addMetric(MetricName, MetricValueProvider)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metricName</code> - The name of the metric</dd> |
| <dd><code>measurable</code> - The measurable that will be measured by this metric</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.Measurable)"> |
| <h3>addMetric</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addMetric</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="Measurable.html" title="interface in org.apache.kafka.common.metrics">Measurable</a> measurable)</span></div> |
| <div class="block">Add a metric to monitor an object that implements Measurable. This metric won't be associated with any sensor. |
| This is a way to expose existing values as metrics. |
| |
| This method is kept for binary compatibility purposes, it has the same behaviour as |
| <a href="#addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.MetricValueProvider)"><code>addMetric(MetricName, MetricConfig, MetricValueProvider)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metricName</code> - The name of the metric</dd> |
| <dd><code>config</code> - The configuration to use when measuring this measurable</dd> |
| <dd><code>measurable</code> - The measurable that will be measured by this metric</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.MetricValueProvider)"> |
| <h3>addMetric</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addMetric</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="MetricValueProvider.html" title="interface in org.apache.kafka.common.metrics">MetricValueProvider</a><?> metricValueProvider)</span></div> |
| <div class="block">Add a metric to monitor an object that implements MetricValueProvider. This metric won't be associated with any |
| sensor. This is a way to expose existing values as metrics. User is expected to add any additional |
| synchronization to update and access metric values, if required.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metricName</code> - The name of the metric</dd> |
| <dd><code>metricValueProvider</code> - The metric value provider associated with this metric</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if a metric with same name already exists.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMetric(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricValueProvider)"> |
| <h3>addMetric</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addMetric</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricValueProvider.html" title="interface in org.apache.kafka.common.metrics">MetricValueProvider</a><?> metricValueProvider)</span></div> |
| <div class="block">Add a metric to monitor an object that implements MetricValueProvider. This metric won't be associated with any |
| sensor. This is a way to expose existing values as metrics. User is expected to add any additional |
| synchronization to update and access metric values, if required.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metricName</code> - The name of the metric</dd> |
| <dd><code>metricValueProvider</code> - The metric value provider associated with this metric</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addMetricIfAbsent(org.apache.kafka.common.MetricName,org.apache.kafka.common.metrics.MetricConfig,org.apache.kafka.common.metrics.MetricValueProvider)"> |
| <h3>addMetricIfAbsent</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a></span> <span class="element-name">addMetricIfAbsent</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName, |
| <a href="MetricConfig.html" title="class in org.apache.kafka.common.metrics">MetricConfig</a> config, |
| <a href="MetricValueProvider.html" title="interface in org.apache.kafka.common.metrics">MetricValueProvider</a><?> metricValueProvider)</span></div> |
| <div class="block">Create or get an existing metric to monitor an object that implements MetricValueProvider. |
| This metric won't be associated with any sensor. This is a way to expose existing values as metrics. |
| This method takes care of synchronisation while updating/accessing metrics by concurrent threads.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metricName</code> - The name of the metric</dd> |
| <dd><code>metricValueProvider</code> - The metric value provider associated with this metric</dd> |
| <dt>Returns:</dt> |
| <dd>Existing KafkaMetric if already registered or else a newly created one</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="removeMetric(org.apache.kafka.common.MetricName)"> |
| <h3>removeMetric</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a></span> <span class="element-name">removeMetric</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName)</span></div> |
| <div class="block">Remove a metric if it exists and return it. Return null otherwise. If a metric is removed, `metricRemoval` |
| will be invoked for each reporter.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>metricName</code> - The name of the metric</dd> |
| <dt>Returns:</dt> |
| <dd>the removed `KafkaMetric` or null if no such metric exists</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addReporter(org.apache.kafka.common.metrics.MetricsReporter)"> |
| <h3>addReporter</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">addReporter</span><wbr><span class="parameters">(<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a> reporter)</span></div> |
| <div class="block">Add a MetricReporter</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="removeReporter(org.apache.kafka.common.metrics.MetricsReporter)"> |
| <h3>removeReporter</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">removeReporter</span><wbr><span class="parameters">(<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a> reporter)</span></div> |
| <div class="block">Remove a MetricReporter</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metrics()"> |
| <h3>metrics</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a>,<wbr><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a>></span> <span class="element-name">metrics</span>()</div> |
| <div class="block">Get all the metrics currently maintained indexed by metricName</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="reporters()"> |
| <h3>reporters</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a><<a href="MetricsReporter.html" title="interface in org.apache.kafka.common.metrics">MetricsReporter</a>></span> <span class="element-name">reporters</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metric(org.apache.kafka.common.MetricName)"> |
| <h3>metric</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="KafkaMetric.html" title="class in org.apache.kafka.common.metrics">KafkaMetric</a></span> <span class="element-name">metric</span><wbr><span class="parameters">(<a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a> metricName)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metricInstance(org.apache.kafka.common.MetricNameTemplate,java.lang.String...)"> |
| <h3>metricInstance</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricInstance</span><wbr><span class="parameters">(<a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common">MetricNameTemplate</a> template, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>... keyValue)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="metricInstance(org.apache.kafka.common.MetricNameTemplate,java.util.Map)"> |
| <h3>metricInstance</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="../MetricName.html" title="class in org.apache.kafka.common">MetricName</a></span> <span class="element-name">metricInstance</span><wbr><span class="parameters">(<a href="../MetricNameTemplate.html" title="class in org.apache.kafka.common">MetricNameTemplate</a> template, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> tags)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="close()"> |
| <h3>close</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">close</span>()</div> |
| <div class="block">Close this metrics repository.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html#close()" title="class or interface in java.lang" class="external-link">close</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link">AutoCloseable</a></code></dd> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Closeable.html#close()" title="class or interface in java.io" class="external-link">close</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/Closeable.html" title="class or interface in java.io" class="external-link">Closeable</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |