blob: 0f191c8ea0504092021ad7919fff517f29800661 [file] [log] [blame]
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="../../img/favicon.ico" />
<title>Metrics - ServiceComb Java Chassis Developers Guide</title>
<link rel="stylesheet" href="../../css/theme.css" />
<link rel="stylesheet" href="../../css/theme_extra.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
<script>
// Current page data
var mkdocs_page_name = "Metrics";
var mkdocs_page_input_path = "general-development/metrics.md";
var mkdocs_page_url = null;
</script>
<script src="../../js/jquery-3.6.0.min.js" defer></script>
<!--[if lt IE 9]>
<script src="../../js/html5shiv.min.js"></script>
<![endif]-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../.." class="icon icon-home"> ServiceComb Java Chassis Developers Guide
</a><div role="search">
<form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../..">Introduction</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Getting Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../start/terminology/">Glossary</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../start/architecture/">Architecture</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../start/development-environment/">Development environment</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../start/first-sample/">Develop the first microservice</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Development Service Provider</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/definition/service-definition/">Service definition</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/define-contract/">Service contract definition</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/code-first/">Implicit API definition</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/swagger-annotation/">Use Swagger annotations</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/springmvc/">Develop with SpringMVC</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/jaxrs/">Develop with JAX-RS</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/transparent-rpc/">Develop with Transparent RPC</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/interface-constraints/">Interface definition and data type</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/listen-address-and-publish-address/">Service listening address and publishing address</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/thread-pool/">Thread pool</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="#">Service Configuration</a>
<ul>
<li class="toctree-l2"><a class="reference internal" href="../../build-provider/configuration/ratelimite-strategy/">Rate Limiting Policy</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../build-provider/configuration/downgrade-strategy/">Fallback Policy</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../build-provider/configuration/parameter-validator/">Parameter Validator</a>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/bootup/">Boot-up Process</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-provider/access-log-configuration/">Access Log Configuration</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Writing Service Consumer</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../build-consumer/common-configuration/">Consumer common configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-consumer/using-resttemplate/">Using Rest Template</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-consumer/using-AsyncRestTemplate/">Using AsyncRestTemplate</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-consumer/develop-consumer-using-rpc/">Using with RPC</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-consumer/with-contract/">Contract</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="#">Invoke control</a>
<ul>
<li class="toctree-l2"><a class="reference internal" href="../../build-consumer/circuit-breaker/">Circuit Breaker</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../build-consumer/flow-control/">Flow Control</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../build-consumer/fault-injection/">Fault Injection</a>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../build-consumer/3rd-party-service-invoke/">Invoke 3rd-party REST services</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Transports</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../transports/rest-over-servlet/">REST over Servlet</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../transports/rest-over-vertx/">REST over Vertx</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../transports/highway-rpc/">Highway</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../transports/http2/">HTTP2</a>
</li>
</ul>
<p class="caption"><span class="caption-text">General Development</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../visit-sc/">Access Service Center</a>
</li>
<li class="toctree-l1 current"><a class="reference internal current" href="./">Metrics</a>
<ul class="current">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../microservice-invocation-chain/">Microservice invocation chain</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../customized-tracing/">Customized-Tracing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../local-develop-test/">Local development and testing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../http-filter/">Http Filter</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../file-upload/">File Uploading</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../file-download/">File Downloading</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../reactive/">Reactive Programing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dnsconfig/">DNS Custom Configuration</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dai-li-she-zhi/">Proxy Settings</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../report-framework-version/">Report framework version</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../cross-app-invocation/">Cross-application invocation</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../secret-field/">Customized serialization and deserialization</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../context/">Using Context to pass control messages</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../produceprocess/">Return value serialization extension</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../CORS/">CORS mechanism</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../AlarmEvent/">Get fuse and instance isolation alarm event information</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../shutdown/">Shutdown gracefully</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../error-handling/">Handling exceptions</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../multienvironment/">Multi-environment isolation between microservice instances</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../thread-model/">Thread Model</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Configuration</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../config/general-config/">General config</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../config/inject-config/">Configuration injection</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Service Capability Open</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../edge/open-service/">Intruductions</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../edge/by-servicecomb-sdk/">Using Edge Service</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../edge/nginx/">Using confd and Nginx as edge services</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../edge/zuul/">Use zuul as edge services</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Service Packing and Running</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../packaging/standalone/">Standalone mode</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../packaging/web-container/">WEB container mode</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Micro Service Security</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../security/tls/">Using TLS</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../security/rsa/">Using RSA certification</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Using java chassis in Spring Boot</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../using-java-chassis-in-spring-boot/using-java-chassis-in-spring-boot/">Intruductions</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using-java-chassis-in-spring-boot/components-for-spring-boot/">spring boot starter for java-chassis</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using-java-chassis-in-spring-boot/java-application/">JAVA application development</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using-java-chassis-in-spring-boot/web-application/">Web development method development</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using-java-chassis-in-spring-boot/diff-between-java-web/">The difference between JAVA application method and Web development method</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../using-java-chassis-in-spring-boot/diff-spring-mvc/">The difference in Spring MVC mode</a>
</li>
</ul>
<p class="caption"><span class="caption-text">Handlers reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../references-handlers/intruduction/">Intruductions</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../references-handlers/loadbalance/">Load Balancing</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../references-handlers/publickey/">Public key authentication</a>
</li>
</ul>
<p class="caption"><span class="caption-text">FAQ</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../question-and-answer/question_answer/">Q & A</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../question-and-answer/faq/">FAQ</a>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../question-and-answer/interface-compatibility/">Micro Service Interface Compatibility FAQ</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../..">ServiceComb Java Chassis Developers Guide</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../.." class="icon icon-home" alt="Docs"></a> &raquo;</li>
<li>General Development &raquo;</li><li>Metrics</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="section" itemprop="articleBody">
<h1 id="first-the-introduction-of-metrics">First, the introduction of Metrics</h1>
<p><img alt="" src="../../assets/metrics/logicDiagram.png" /></p>
<ol>
<li>Based on <a href="https://github.com/Netflix/spectator">netflix spectator</a></li>
<li>Foundation-metrics loads all MetricsInitializer implementations via the SPI mechanism. Implementers can use the getOrder in the MetricsInitializer to plan the execution order. The smaller the order number, the earlier it will be executed.</li>
<li>Metrics-core implements 3 types of MetricsInitializer:</li>
<li>DefaultRegistryInitializer: Instantiate and register spectator-reg-servo, set a smaller order, and ensure that it is executed before the following two types of MetricsInitializer</li>
<li>Meters Initializer: Statistics of data such as TPS, delay, thread pool, jvm resources, etc.</li>
<li>Publisher: Output statistics, built-in log output, and output via RESTful interface</li>
<li>Metrics-prometheus provides the ability to interface with prometheus</li>
</ol>
<h1 id="second-how-to-use">Second, how to use.</h1>
<h3 id="1maven-dependence">1.Maven dependence.</h3>
<pre><code>&lt;dependency&gt;
&lt;groupId&gt;org.apache.servicecomb&lt;/groupId&gt;
&lt;artifactId&gt;metrics-core&lt;/artifactId&gt;
&lt;/dependency&gt;
</code></pre>
<p>If integrate with prometheus, also need to add dependencies.</p>
<pre><code>&lt;dependency&gt;
&lt;groupId&gt;org.apache.servicecomb&lt;/groupId&gt;
&lt;artifactId&gt;metrics-prometheus&lt;/artifactId&gt;
&lt;/dependency&gt;
</code></pre>
<p><em>Note: Please change the version field to the actual version number; if the version number has been declared in the dependencyManagement, then you do not have to write the version number here</em></p>
<h3 id="2-configuration-instructions">2. Configuration instructions</h3>
<div class="metrics-cfg"></div>
<table>
<thead>
<tr>
<th align="left">Configuration Item</th>
<th align="left">Default</th>
<th align="left">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">servicecomb.metrics.window_time</td>
<td align="left">60000</td>
<td align="left">Statistical period, in milliseconds<br>TPS, delay, etc. Periodic data, updated once per cycle, the value obtained in the cycle, actually the value of the previous cycle</td>
</tr>
<tr>
<td align="left">servicecomb.metrics<br>.invocation.latencyDistribution</td>
<td align="left"></td>
<td align="left">The latency distribution time period definition in milliseconds<br>for example:0,1,10,100,1000<br>indicates that the following latency scopes are defined: [0, 1),[1, 10),[10, 100),[100, 1000),[1000, )</td>
</tr>
<tr>
<td align="left">servicecomb.metrics<br>.Consumer.invocation.slow.enabled</td>
<td align="left">false</td>
<td align="left">Whether to enable slow call detection on the Consumer side<br>Level 4 priority definitions can be supported by adding the suffix .${service}.${schema}.${operation}</td>
</tr>
<tr>
<td align="left">servicecomb.metrics<br>.Consumer.invocation.slow.msTime</td>
<td align="left">1000</td>
<td align="left">If the latency exceeds the configured value, the log will be output immediately, and the time consumption information of the stage called this time will be recorded.<br>Level 4 priority definitions can be supported by adding the suffix .${service}.${schema}.${operation}</td>
</tr>
<tr>
<td align="left">servicecomb.metrics<br>.Provider.invocation.slow.enabled</td>
<td align="left">false</td>
<td align="left">Whether to enable slow call detection on the Provider side<br>Level 4 priority definitions can be supported by adding the suffix .${service}.${schema}.${operation}</td>
</tr>
<tr>
<td align="left">servicecomb.metrics<br>.Provider.invocation.slow.msTime</td>
<td align="left">1000</td>
<td align="left">If the latency exceeds the configured value, the log will be output immediately, and the time consumption information of the stage called this time will be recorded.<br>Level 4 priority definitions can be supported by adding the suffix .${service}.${schema}.${operation}</td>
</tr>
<tr>
<td align="left">servicecomb.metrics<br>.prometheus.address</td>
<td align="left">0.0.0.0:9696</td>
<td align="left">prometheus listen address</td>
</tr>
<tr>
<td align="left">servicecomb.metrics.publisher.defaultLog<br>.enabled</td>
<td align="left">false</td>
<td align="left">Whether to output the default statistics log</td>
</tr>
<tr>
<td align="left">servicecomb.metrics.publisher.defaultLog<br>.endpoints.client.detail.enabled</td>
<td align="left">false</td>
<td align="left">Whether to output each client endpoint statistics log, because it is related to the target ip:port number, there may be a lot of data, so the default is not output</td>
</tr>
</tbody>
</table>
<h3 id="3-slow-call-detection">3. Slow call detection</h3>
<p>After slow call detection is enabled, if there is a slow call, the corresponding log will be output immediately:</p>
<pre><code>2019-04-02 23:01:09,103\[WARN]\[pool-7-thread-74]\[5ca37935c00ff2c7-350076] - slow(40 ms) invocation, CONSUMER highway perf1.impl.syncQuery
http method: GET
url : /v1/syncQuery/{id}/
server : highway://192.168.0.152:7070?login=true
status code: 200
total : 50.760 ms
prepare : 0.0 ms
handlers request : 0.0 ms
client filters request : 0.0 ms
send request : 0.5 ms
get connection : 0.0 ms
write to buf : 0.5 ms
wait response : 50.727 ms
wake consumer : 0.23 ms
client filters response: 0.2 ms
handlers response : 0.0 ms (SlowInvocationLogger.java:121)
</code></pre>
<p>Where 5ca37935c00ff2c7-350076 is the structure of ${traceId}-${invocationId}, referenced by %marker in the output format of log4j2 or logback</p>
<h3 id="4-access-via-restful">4. Access via RESTful</h3>
<p>As long as the microservices open the rest port, use a browser to access http://ip:port/metrics.
will get json data in the following format:</p>
<pre><code>{
&quot;servicecomb.vertx.endpoints(address=192.168.0.124:7070,statistic=connectCount,type=client)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=192.168.0.124:7070,statistic=disconnectCount,type=client)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=192.168.0.124:7070,statistic=connections,type=client)&quot;: 1.0,
&quot;servicecomb.vertx.endpoints(address=192.168.0.124:7070,statistic=bytesRead,type=client)&quot;: 508011.0,
&quot;servicecomb.vertx.endpoints(address=192.168.0.124:7070,statistic=bytesWritten,type=client)&quot;: 542163.0,
&quot;servicecomb.vertx.endpoints(address=192.168.0.124:7070,statistic=queueCount,type=client)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=0.0.0.0:7070,statistic=connectCount,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=0.0.0.0:7070,statistic=disconnectCount,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=0.0.0.0:7070,statistic=connections,type=server)&quot;: 1.0,
&quot;servicecomb.vertx.endpoints(address=0.0.0.0:7070,statistic=bytesRead,type=server)&quot;: 542163.0,
&quot;servicecomb.vertx.endpoints(address=0.0.0.0:7070,statistic=bytesWritten,type=server)&quot;: 508011.0,
&quot;servicecomb.vertx.endpoints(address=0.0.0.0:7070,statistic=rejectByConnectionLimit,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=localhost:8080,statistic=connectCount,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=localhost:8080,statistic=disconnectCount,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=localhost:8080,statistic=connections,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=localhost:8080,statistic=bytesRead,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=localhost:8080,statistic=bytesWritten,type=server)&quot;: 0.0,
&quot;servicecomb.vertx.endpoints(address=localhost:8080,statistic=rejectByConnectionLimit,type=server)&quot;: 0.0,
&quot;threadpool.completedTaskCount(id=cse.executor.groupThreadPool-group0)&quot;: 4320.0,
&quot;threadpool.rejectedCount(id=cse.executor.groupThreadPool-group0)&quot;: 0.0,
&quot;threadpool.taskCount(id=cse.executor.groupThreadPool-group0)&quot;: 4320.0,
&quot;threadpool.currentThreadsBusy(id=cse.executor.groupThreadPool-group0)&quot;: 0.0,
&quot;threadpool.poolSize(id=cse.executor.groupThreadPool-group0)&quot;: 4.0,
&quot;threadpool.maxThreads(id=cse.executor.groupThreadPool-group0)&quot;: 10.0,
&quot;threadpool.queueSize(id=cse.executor.groupThreadPool-group0)&quot;: 0.0,
&quot;threadpool.corePoolSize(id=cse.executor.groupThreadPool-group0)&quot;: 4.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,scope=[0,1),status=200,transport=highway,type=latencyDistribution)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,scope=[1,3),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,scope=[3,10),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,scope=[10,100),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,scope=[100,),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,scope=[0,1),status=200,transport=highway,type=latencyDistribution)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,scope=[1,3),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,scope=[3,10),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,scope=[10,100),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,scope=[100,),status=200,transport=highway,type=latencyDistribution)&quot;: 0.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=total,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=total,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.25269420000000004,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=total,statistic=max,status=200,transport=highway,type=stage)&quot;: 2.7110000000000003E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=handlers_request,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=handlers_request,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0079627,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=handlers_request,statistic=max,status=200,transport=highway,type=stage)&quot;: 1.74E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=handlers_response,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=handlers_response,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0060666,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=handlers_response,statistic=max,status=200,transport=highway,type=stage)&quot;: 1.08E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=prepare,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=prepare,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.016679600000000003,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=prepare,statistic=max,status=200,transport=highway,type=stage)&quot;: 2.68E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=queue,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=queue,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.08155480000000001,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=queue,statistic=max,status=200,transport=highway,type=stage)&quot;: 2.1470000000000001E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=execution,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=execution,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0098285,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=execution,statistic=max,status=200,transport=highway,type=stage)&quot;: 4.3100000000000004E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=server_filters_request,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=server_filters_request,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0170669,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=server_filters_request,statistic=max,status=200,transport=highway,type=stage)&quot;: 3.6400000000000004E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=server_filters_response,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=server_filters_response,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0196985,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=server_filters_response,statistic=max,status=200,transport=highway,type=stage)&quot;: 4.8100000000000004E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=producer_send_response,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=producer_send_response,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0880885,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=PRODUCER,stage=producer_send_response,statistic=max,status=200,transport=highway,type=stage)&quot;: 1.049E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=total,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=total,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.9796976000000001,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=total,statistic=max,status=200,transport=highway,type=stage)&quot;: 6.720000000000001E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=handlers_request,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=handlers_request,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.012601500000000002,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=handlers_request,statistic=max,status=200,transport=highway,type=stage)&quot;: 3.5000000000000004E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=handlers_response,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=handlers_response,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0066785,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=handlers_response,statistic=max,status=200,transport=highway,type=stage)&quot;: 3.21E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=prepare,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=prepare,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.010363800000000001,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=prepare,statistic=max,status=200,transport=highway,type=stage)&quot;: 2.85E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=client_filters_request,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=client_filters_request,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0060282,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=client_filters_request,statistic=max,status=200,transport=highway,type=stage)&quot;: 9.2E-6,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_send_request,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_send_request,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.099984,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_send_request,statistic=max,status=200,transport=highway,type=stage)&quot;: 1.1740000000000001E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_get_connection,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_get_connection,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.006916800000000001,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_get_connection,statistic=max,status=200,transport=highway,type=stage)&quot;: 5.83E-5,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_write_to_buf,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_write_to_buf,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0930672,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_write_to_buf,statistic=max,status=200,transport=highway,type=stage)&quot;: 1.1580000000000001E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_wait_response,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_wait_response,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.7654931,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_wait_response,statistic=max,status=200,transport=highway,type=stage)&quot;: 5.547E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_wake_consumer,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_wake_consumer,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0502085,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=consumer_wake_consumer,statistic=max,status=200,transport=highway,type=stage)&quot;: 3.7370000000000003E-4,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=client_filters_response,statistic=count,status=200,transport=highway,type=stage)&quot;: 4269.0,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=client_filters_response,statistic=totalTime,status=200,transport=highway,type=stage)&quot;: 0.0227188,
&quot;servicecomb.invocation(operation=perf1.impl.syncQuery,role=CONSUMER,stage=client_filters_response,statistic=max,status=200,transport=highway,type=stage)&quot;: 4.0E-5
}
</code></pre>
<h1 id="third-the-summary-of-statistical-items">Third, the summary of statistical items</h1>
<h3 id="1-cpu">1. CPU</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="2">os</td>
<td rowspan="2">type</td>
<td>cpu</td>
<td>System CPU usage in the current period, Solaris mode</td>
</tr>
<tr>
<td>processCpu</td>
<td>Microservice process CPU usage in the current period, IRIX mode<br>
processCpu divided by cpu is equal to the number of system CPUs</td>
</tr>
</table>
<h3 id="2-net">2. NET</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="6">os</td>
<td>type</td>
<td>net</td>
<td></td>
</tr>
<tr>
<td rowspan="4">statistic</td>
<td>send</td>
<td>Average number of bytes sent per second during the current period (Bps)</td>
</tr>
<tr>
<td>receive</td>
<td>Average number of bytes received per second during the current period (Bps)</td>
</tr>
<tr>
<td>sendPackets</td>
<td>Average number of packets sent per second (pps) during the current period</td>
</tr>
<tr>
<td>receivePackets</td>
<td>Average number of packets received per second (pps) during the current period</td>
</tr>
<tr>
<td>interface</td>
<td></td>
<td>net dev name</td>
</tr>
</table>
<h3 id="3-vertx-client-endpoints">3. vertx client endpoints</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="8">servicecomb<br>.vertx<br>.endpoints</td>
<td>type</td>
<td>client</td>
<td></td>
</tr>
<tr>
<td>address</td>
<td>${ip}:${port}</td>
<td>server ip:port</td>
</tr>
<tr>
<td rowspan="6">statistic</td>
<td>connectCount</td>
<td>Number of connections have been initiated in the current period</td>
</tr>
<tr>
<td>disconnectCount</td>
<td>Number of disconnections in the current period</td>
</tr>
<tr>
<td>queueCount</td>
<td>The number of requests in the http connection pool that are waiting to get a connection</td>
</tr>
<tr>
<td>connections</td>
<td>Current connection number</td>
</tr>
<tr>
<td>bytesRead</td>
<td>Average number of bytes received per second during the current period (Bps)<br>
Business layer statistics, relative to the data obtained from the network card, the data here does not include the size of the header<br>
For http messages, does not include http header size</td>
</tr>
<tr>
<td>bytesWritten</td>
<td>Average number of bytes sent per second during the current period (Bps)<br>
Business layer statistics, relative to the data obtained from the network card, the data here does not include the size of the header<br>
For http messages, does not include http header size</td>
</tr>
</table>
<h3 id="4-vertx-server-endpoints">4. vertx server endpoints</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="8">servicecomb<br>.vertx<br>.endpoints</td>
<td>type</td>
<td>server</td>
<td></td>
</tr>
<tr>
<td>address</td>
<td>${ip}:${port}</td>
<td>listen ip:port</td>
</tr>
<tr>
<td rowspan="6">statistic</td>
<td>connectCount</td>
<td>Number of connections are connected in the current period</td>
</tr>
<tr>
<td>disconnectCount</td>
<td>Number of disconnections in the current period</td>
</tr>
<tr>
<td>rejectByConnectionLimit</td>
<td>Number of active disconnections due to exceeding the number of connections in the current period</td>
</tr>
<tr>
<td>connections</td>
<td>Current connection number</td>
</tr>
<tr>
<td>bytesRead</td>
<td>Average number of bytes sent per second during the current period (Bps)<br>
Business layer statistics, relative to the data obtained from the network card, the data here does not include the size of the header<br>
For http messages, does not include http header size</td>
</tr>
<tr>
<td>bytesWritten</td>
<td>Average number of bytes received per second during the current period (Bps)<br>
Business layer statistics, relative to the data obtained from the network card, the data here does not include the size of the header<br>
For http messages, does not include http header size</td>
</tr>
</table>
<h3 id="5-invocation-latency-distribution">5. Invocation latency distribution</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="11">servicecomb<br>.invocation</td>
<td>role</td>
<td>CONSUMER、PRODUCER、EDGE</td>
<td>Is the CONSUMER, PRODUCER or EDGE side statistics</td>
</tr>
<tr>
<td>operation</td>
<td>${microserviceName}<br>.${schemaId}<br>.${operationName}</td>
<td>Method name called</td>
</tr>
<tr>
<td>transport</td>
<td>highway or rest</td>
<td>On which transmission channel the call is made</td>
</tr>
<tr>
<td>status</td>
<td>http status code</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>latencyDistribution</td>
<td>invocation latency distribution</td>
</tr>
<tr>
<td>scope</td>
<td>[${min}, ${max})</td>
<td>The call count in the current period that latency is greater than or equal to min, less than max<br>
[${min},) means max is infinite</td>
</tr>
</table>
<h3 id="6-invocation-consumer-stage-latency">6. invocation consumer stage latency</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="19">servicecomb<br>.invocation</td>
<td>role</td>
<td>CONSUMER</td>
<td>Statistics on the CONSUMER side</td>
</tr>
<tr>
<td>operation</td>
<td>${microserviceName}<br>.${schemaId}<br>.${operationName}</td>
<td>Method name called</td>
</tr>
<tr>
<td>transport</td>
<td>highway or rest</td>
<td>On which transmission channel the call is made</td>
</tr>
<tr>
<td>status</td>
<td>http status code</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>stage</td>
<td>stage latency</td>
</tr>
<tr>
<td rowspan="11">stage</td>
<td>total</td>
<td>The whole process</td>
</tr>
<tr>
<td>prepare</td>
<td></td>
</tr>
<tr>
<td>handlers_request</td>
<td>Handler chain request process</td>
</tr>
<tr>
<td>client_filters_request</td>
<td>Http client filter chain request process<br>
Only the rest transport has this stage.</td>
</tr>
<tr>
<td>consumer_send_request</td>
<td>Send request stage, including consumer_get_connection and consumer_write_to_buf</td>
</tr>
<tr>
<td>consumer_get_connection</td>
<td>Get a connection from the connection pool</td>
</tr>
<tr>
<td>consumer_write_to_buf</td>
<td>Write data to the network buffer</td>
</tr>
<tr>
<td>consumer_wait_response</td>
<td>Waiting for the server to answer</td>
</tr>
<tr>
<td>consumer_wake_consumer</td>
<td>In the synchronization process, after receiving the response, it takes time from waking up the waiting thread to waiting for the thread to start processing the response.</td>
</tr>
<tr>
<td>client_filters_response</td>
<td>Http client filter chain response process</td>
</tr>
<tr>
<td>handlers_response</td>
<td>Handler chain response process</td>
</tr>
<tr>
<td rowspan="3">statistic</td>
<td>count</td>
<td>Average number of calls per second (TPS)<br>
Count=Number of calls/period in the statistical period (seconds)</td>
</tr>
<tr>
<td>totalTime</td>
<td>In seconds<br>
totalTime=The total duration of the call in the current period (seconds)<br>
totalTime divided by count to get the average latency</td>
</tr>
<tr>
<td>max</td>
<td>In seconds<br>
Maximum latency in the current period</td>
</tr>
</table>
<h3 id="7-invocation-producer-stage-latency">7. invocation producer stage latency</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="17">servicecomb<br>.invocation</td>
<td>role</td>
<td>PRODUCER</td>
<td>Statistics on the PRODUCER side</td>
</tr>
<tr>
<td>operation</td>
<td>${microserviceName}<br>.${schemaId}<br>.${operationName}</td>
<td>Method name called</td>
</tr>
<tr>
<td>transport</td>
<td>highway or rest</td>
<td>On which transmission channel the call is made</td>
</tr>
<tr>
<td>status</td>
<td>http status code</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>stage</td>
<td>stage latency</td>
</tr>
<tr>
<td rowspan="9">stage</td>
<td>total</td>
<td>The whole process</td>
</tr>
<tr>
<td>prepare</td>
<td></td>
</tr>
<tr>
<td>queue</td>
<td>Meaning only when using a thread pool<br>
Indicates the length of time the call is queued in the thread pool</td>
</tr>
<tr>
<td>server_filters_request</td>
<td>Http server filter chain request process<br>
Only the rest transport has this stage.</td>
</tr>
<tr>
<td>handlers_request</td>
<td>Handler chain request process</td>
</tr>
<tr>
<td>execution</td>
<td>Business method</td>
</tr>
<tr>
<td>handlers_response</td>
<td>Handler chain response process</td>
</tr>
<tr>
<td>server_filters_response</td>
<td>Http server filter chain response process</td>
</tr>
<tr>
<td>producer_send_response</td>
<td>Send a response</td>
</tr>
<tr>
<td rowspan="3">statistic</td>
<td>count</td>
<td>Average number of calls per second (TPS)<br>
Count=Number of calls/period in the statistical period (seconds)</td>
</tr>
<tr>
<td>totalTime</td>
<td>In seconds<br>
totalTime=The total duration of the call in the current period (seconds)<br>
AverageTime divided by count to get the average latency</td>
</tr>
<tr>
<td>max</td>
<td>In seconds<br>
Maximum latency in the current period</td>
</tr>
</table>
<h3 id="8-invocation-edge-stage-latency">8. invocation edge stage latency</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td rowspan="23">servicecomb<br>.invocation</td>
<td>role</td>
<td>EDGE</td>
<td>EDGE statistics</td>
</tr>
<tr>
<td>operation</td>
<td>${microserviceName}<br>.${schemaId}<br>.${operationName}</td>
<td>Method name called</td>
</tr>
<tr>
<td>transport</td>
<td>highway or rest</td>
<td>On which transmission channel the call is made</td>
</tr>
<tr>
<td>status</td>
<td>http status code</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>stage</td>
<td>stage latency</td>
</tr>
<tr>
<td rowspan="15">stage</td>
<td>total</td>
<td>The whole process</td>
</tr>
<tr>
<td>prepare</td>
<td></td>
</tr>
<tr>
<td>queue</td>
<td>Meaning only when using a thread pool<br>
Indicates the length of time the call is queued in the thread pool</td>
</tr>
<tr>
<td>server_filters_request</td>
<td>Http server filter chain request process</td>
</tr>
<tr>
<td>handlers_request</td>
<td>Handler chain request process</td>
</tr>
<tr>
<td>client_filters_request</td>
<td>Http client filter chain request process</td>
</tr>
<tr>
<td>consumer_send_request</td>
<td>Send request stage, including consumer_get_connection and consumer_write_to_buf</td>
</tr>
<tr>
<td>consumer_get_connection</td>
<td>Get a connection from the connection pool</td>
</tr>
<tr>
<td>consumer_write_to_buf</td>
<td>Write data to the network buffer</td>
</tr>
<tr>
<td>consumer_wait_response</td>
<td>Waiting for the server to answer</td>
</tr>
<tr>
<td>consumer_wake_consumer</td>
<td>In the synchronization process, after receiving the response, it takes time from waking up the waiting thread to waiting for the thread to start processing the response.</td>
</tr>
<tr>
<td>client_filters_response</td>
<td>Http client filter chain response process</td>
</tr>
<tr>
<td>handlers_response</td>
<td>Handler chain response process</td>
</tr>
<tr>
<td>server_filters_response</td>
<td>Http server filter chain response process</td>
</tr>
<tr>
<td>producer_send_response</td>
<td>Send a response</td>
</tr>
<tr>
<td rowspan="3">statistic</td>
<td>count</td>
<td>Average number of calls per second (TPS)<br>
Count=Number of calls/period in the statistical period (seconds)</td>
</tr>
<tr>
<td>totalTime</td>
<td>In seconds<br>
totalTime=The total duration of the call in the current period (seconds)<br>
AverageTime divided by count to get the average latency</td>
</tr>
<tr>
<td>max</td>
<td>In seconds<br>
Maximum latency in the current period</td>
</tr>
</table>
<h3 id="9-threadpool">9. threadpool</h3>
<table class="metrics-table">
<tr>
<th>Name</th>
<th>Tag keys</th>
<th>Tag values</th>
<th>Description</th>
</tr>
<tr>
<td>threadpool.corePoolSize </td>
<td rowspan="8">id</td>
<td rowspan="8">${threadPoolName}</td>
<td>Minimum number of threads</td>
</tr>
<tr>
<td>threadpool.maxThreads </td>
<td>Maximum number of threads allowed</td>
</tr>
<tr>
<td>threadpool.poolSize </td>
<td>Current actual number of threads</td>
</tr>
<tr>
<td>threadpool.currentThreadsBusy </td>
<td>The current number of active threads, which is the number of tasks currently being executed</td>
</tr>
<tr>
<td>threadpool.queueSize </td>
<td>Number of tasks currently queued</td>
</tr>
<tr>
<td>threadpool.rejectedCount </td>
<td>The average number of tasks rejected per second during the current period</td>
</tr>
<tr>
<td>threadpool.taskCount</td>
<td>Average number of tasks submitted per second during the statistical period<br>
taskCount=(completed + queue + active)/period (seconds)</td>
</tr>
<tr>
<td>threadpool.completedTaskCount </td>
<td>The average number of tasks completed per second during the statistical period<br>
completedTaskCount=completed/period (seconds)</td>
</tr>
</table>
<h1 id="fourth-business-customization">Fourth, business customization</h1>
<p>Because ServiceComb has initialized the registry's registry, the business no longer has to create a registry.</p>
<p>Implement the MetricsInitializer interface, define the business-level Meters, or implement a custom Publisher, and then declare your implementation through the SPI mechanism.</p>
<h3 id="1meters">1.Meters:</h3>
<p>Creating Meters capabilities is provided by spectator, available in the [netflix spectator] (https://github.com/Netflix/spectator) documentation</p>
<h3 id="2publisher">2.Publisher:</h3>
<p>Periodically output scenarios, such as log scenarios, subscribe to org.apache.servicecomb.foundation.metrics.PolledEvent via eventBus, PolledEvent.getMeters() is the statistical result of this cycle.
Non-periodic output scenarios, such as access through the RESTful interface, the statistical results of this cycle can be obtained through globalRegistry.iterator()</p>
</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../visit-sc/" class="btn btn-neutral float-left" title="Access Service Center"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../microservice-invocation-chain/" class="btn btn-neutral float-right" title="Microservice invocation chain">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span><a href="../visit-sc/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../microservice-invocation-chain/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '../..';</script>
<script src="../../js/theme_extra.js" defer></script>
<script src="../../js/theme.js" defer></script>
<script src="../../search/main.js" defer></script>
<script defer>
window.onload = function () {
SphinxRtdTheme.Navigation.enable(true);
};
</script>
</body>
</html>