blob: 938636787dfc570081f09a46a46a2042265621b5 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en_US" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Metrics ยท GitBook</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="../../gitbook/style.css">
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
<link rel="stylesheet" href="../styles/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="microservice-invocation-chain.html" />
<link rel="prev" href="visit-sc.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" >
<span>
just-for-gitbook-build
</span>
<ul class="articles">
<li class="chapter " data-level="1.1.1" data-path="../transports/verticle-count.html">
<a href="../transports/verticle-count.html">
hidden
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.2" data-path="../">
<a href="../">
Overview
</a>
</li>
<li class="chapter " data-level="1.3" data-path="../catalog/start.html">
<a href="../catalog/start.html">
Getting Started
</a>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="../start/terminology.html">
<a href="../start/terminology.html">
Glossary
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="../start/architecture.html">
<a href="../start/architecture.html">
Architecture
</a>
</li>
<li class="chapter " data-level="1.3.3" data-path="../start/development-environment.html">
<a href="../start/development-environment.html">
Development environment
</a>
</li>
<li class="chapter " data-level="1.3.4" data-path="../start/first-sample.html">
<a href="../start/first-sample.html">
Develop the first microservice
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" data-path="../catalog/build-provider.html">
<a href="../catalog/build-provider.html">
Development Service Provider
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="../build-provider/definition/service-definition.html">
<a href="../build-provider/definition/service-definition.html">
Service definition
</a>
</li>
<li class="chapter " data-level="1.4.2" data-path="../build-provider/define-contract.html">
<a href="../build-provider/define-contract.html">
Service contract definition
</a>
</li>
<li class="chapter " data-level="1.4.3" data-path="../build-provider/code-first.html">
<a href="../build-provider/code-first.html">
Implicit API definition
</a>
</li>
<li class="chapter " data-level="1.4.4" data-path="../build-provider/swagger-annotation.html">
<a href="../build-provider/swagger-annotation.html">
Use Swagger annotations
</a>
</li>
<li class="chapter " data-level="1.4.5" data-path="../build-provider/springmvc.html">
<a href="../build-provider/springmvc.html">
Develop with SpringMVC
</a>
</li>
<li class="chapter " data-level="1.4.6" data-path="../build-provider/jaxrs.html">
<a href="../build-provider/jaxrs.html">
Develop with JAX-RS
</a>
</li>
<li class="chapter " data-level="1.4.7" data-path="../build-provider/transparent-rpc.html">
<a href="../build-provider/transparent-rpc.html">
Develop with Transparent RPC
</a>
</li>
<li class="chapter " data-level="1.4.8" data-path="../build-provider/interface-constraints.html">
<a href="../build-provider/interface-constraints.html">
Interface definition and data type
</a>
</li>
<li class="chapter " data-level="1.4.9" data-path="../build-provider/listen-address-and-publish-address.html">
<a href="../build-provider/listen-address-and-publish-address.html">
Service listening address and publishing address
</a>
</li>
<li class="chapter " data-level="1.4.10" data-path="../build-provider/thread-pool.html">
<a href="../build-provider/thread-pool.html">
Thread pool
</a>
</li>
<li class="chapter " data-level="1.4.11" data-path="../build-provider/service-configuration.html">
<a href="../build-provider/service-configuration.html">
Service Configuration
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.11.1" data-path="../build-provider/configuration/lb-strategy.html">
<a href="../build-provider/configuration/lb-strategy.html">
Load Balancing Policy
</a>
</li>
<li class="chapter " data-level="1.4.11.2" data-path="../build-provider/configuration/ratelimite-strategy.html">
<a href="../build-provider/configuration/ratelimite-strategy.html">
Rate Limiting Policy
</a>
</li>
<li class="chapter " data-level="1.4.11.3" data-path="../build-provider/configuration/downgrade-strategy.html">
<a href="../build-provider/configuration/downgrade-strategy.html">
Fallback Policy
</a>
</li>
<li class="chapter " data-level="1.4.11.4" data-path="../build-provider/configuration/parameter-validator.html">
<a href="../build-provider/configuration/parameter-validator.html">
Parameter Validator
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4.12" data-path="../build-provider/bootup.html">
<a href="../build-provider/bootup.html">
Boot-up Process
</a>
</li>
<li class="chapter " data-level="1.4.13" data-path="../build-provider/access-log-configuration.html">
<a href="../build-provider/access-log-configuration.html">
Access Log Configuration
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" data-path="../catalog/build-consumer.html">
<a href="../catalog/build-consumer.html">
Writing Service Consumer
</a>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="../build-consumer/common-configuration.html">
<a href="../build-consumer/common-configuration.html">
Consumer common configuration
</a>
</li>
<li class="chapter " data-level="1.5.2" data-path="../build-consumer/using-resttemplate.html">
<a href="../build-consumer/using-resttemplate.html">
Using Rest Template
</a>
</li>
<li class="chapter " data-level="1.5.3" data-path="../build-consumer/using-AsyncRestTemplate.html">
<a href="../build-consumer/using-AsyncRestTemplate.html">
Using AsynRestTemplate
</a>
</li>
<li class="chapter " data-level="1.5.4" data-path="../build-consumer/develop-consumer-using-rpc.html">
<a href="../build-consumer/develop-consumer-using-rpc.html">
Using with RPC
</a>
</li>
<li class="chapter " data-level="1.5.5" data-path="../build-consumer/with-contract.html">
<a href="../build-consumer/with-contract.html">
Contract
</a>
</li>
<li class="chapter " data-level="1.5.6" data-path="../build-consumer/invoke-control.html">
<a href="../build-consumer/invoke-control.html">
Invoke control
</a>
<ul class="articles">
<li class="chapter " data-level="1.5.6.1" data-path="../build-consumer/circuit-breaker.html">
<a href="../build-consumer/circuit-breaker.html">
Circuit Breaker
</a>
</li>
<li class="chapter " data-level="1.5.6.2" data-path="../build-consumer/flow-control.html">
<a href="../build-consumer/flow-control.html">
Flow Control
</a>
</li>
<li class="chapter " data-level="1.5.6.3" data-path="../build-consumer/fault-injection.html">
<a href="../build-consumer/fault-injection.html">
Fault Injection
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5.7" data-path="../build-consumer/3rd-party-service-invoke.html">
<a href="../build-consumer/3rd-party-service-invoke.html">
Invoke 3rd-party REST services
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="../transports/transport.html">
<a href="../transports/transport.html">
Transports
</a>
<ul class="articles">
<li class="chapter " data-level="1.6.1" data-path="../transports/rest-over-servlet.html">
<a href="../transports/rest-over-servlet.html">
REST over Servlet
</a>
</li>
<li class="chapter " data-level="1.6.2" data-path="../transports/rest-over-vertx.html">
<a href="../transports/rest-over-vertx.html">
REST over Vertx
</a>
</li>
<li class="chapter " data-level="1.6.3" data-path="../transports/highway-rpc.html">
<a href="../transports/highway-rpc.html">
Highway
</a>
</li>
<li class="chapter " data-level="1.6.4" data-path="../transports/http2.html">
<a href="../transports/http2.html">
HTTP2
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.7" data-path="../catalog/general-develop.html">
<a href="../catalog/general-develop.html">
General Development
</a>
<ul class="articles">
<li class="chapter " data-level="1.7.1" data-path="visit-sc.html">
<a href="visit-sc.html">
Access Service Center
</a>
</li>
<li class="chapter active" data-level="1.7.2" data-path="metrics.html">
<a href="metrics.html">
Metrics
</a>
</li>
<li class="chapter " data-level="1.7.3" data-path="microservice-invocation-chain.html">
<a href="microservice-invocation-chain.html">
Microservice invocation chain
</a>
</li>
<li class="chapter " data-level="1.7.4" data-path="customized-tracing.html">
<a href="customized-tracing.html">
Customized-Tracing
</a>
</li>
<li class="chapter " data-level="1.7.5" data-path="local-develop-test.html">
<a href="local-develop-test.html">
Local development and testing
</a>
</li>
<li class="chapter " data-level="1.7.6" data-path="http-filter.html">
<a href="http-filter.html">
Http Filter
</a>
</li>
<li class="chapter " data-level="1.7.7" data-path="file-upload.html">
<a href="file-upload.html">
File Uploading
</a>
</li>
<li class="chapter " data-level="1.7.8" data-path="file-download.html">
<a href="file-download.html">
File Downloading
</a>
</li>
<li class="chapter " data-level="1.7.9" data-path="reactive.html">
<a href="reactive.html">
Reactive Programing
</a>
</li>
<li class="chapter " data-level="1.7.10" data-path="dnsconfig.html">
<a href="dnsconfig.html">
DNS Custom Configuration
</a>
</li>
<li class="chapter " data-level="1.7.11" data-path="dai-li-she-zhi.html">
<a href="dai-li-she-zhi.html">
Proxy Settings
</a>
</li>
<li class="chapter " data-level="1.7.12" data-path="report-framework-version.html">
<a href="report-framework-version.html">
Report framework version
</a>
</li>
<li class="chapter " data-level="1.7.13" data-path="cross-app-invocation.html">
<a href="cross-app-invocation.html">
Cross-application invocation
</a>
</li>
<li class="chapter " data-level="1.7.14" data-path="secret-field.html">
<a href="secret-field.html">
Customized serialization and deserialization
</a>
</li>
<li class="chapter " data-level="1.7.15" data-path="context.html">
<a href="context.html">
Using Context to pass control messages
</a>
</li>
<li class="chapter " data-level="1.7.16" data-path="produceprocess.html">
<a href="produceprocess.html">
Return value serialization extension
</a>
</li>
<li class="chapter " data-level="1.7.17" data-path="CORS.html">
<a href="CORS.html">
CORS mechanism
</a>
</li>
<li class="chapter " data-level="1.7.18" data-path="AlarmEvent.html">
<a href="AlarmEvent.html">
Get fuse and instance isolation alarm event information
</a>
</li>
<li class="chapter " data-level="1.7.19" data-path="shutdown.html">
<a href="shutdown.html">
Shutdown gracefully
</a>
</li>
<li class="chapter " data-level="1.7.20" data-path="error-handling.html">
<a href="error-handling.html">
Handling exceptions
</a>
</li>
<li class="chapter " data-level="1.7.21" data-path="multienvironment.html">
<a href="multienvironment.html">
Multi-environment isolation between microservice instances
</a>
</li>
<li class="chapter " data-level="1.7.22" data-path="thread-model.html">
<a href="thread-model.html">
Thread Model
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.8" data-path="../catalog/config.html">
<a href="../catalog/config.html">
Configuration
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="../config/general-config.html">
<a href="../config/general-config.html">
General config
</a>
</li>
<li class="chapter " data-level="1.8.2" data-path="../config/inject-config.html">
<a href="../config/inject-config.html">
Configuration injection
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="../edge/open-service.html">
<a href="../edge/open-service.html">
Service Capability Open
</a>
<ul class="articles">
<li class="chapter " data-level="1.9.1" data-path="../edge/by-servicecomb-sdk.html">
<a href="../edge/by-servicecomb-sdk.html">
Using Edge Service
</a>
</li>
<li class="chapter " data-level="1.9.2" data-path="../edge/nginx.html">
<a href="../edge/nginx.html">
Using confd and Nginx as edge services
</a>
</li>
<li class="chapter " data-level="1.9.3" data-path="../edge/zuul.html">
<a href="../edge/zuul.html">
Use zuul as edge services
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.10" data-path="../catalog/service-package-run.html">
<a href="../catalog/service-package-run.html">
Service Packing and Running
</a>
<ul class="articles">
<li class="chapter " data-level="1.10.1" data-path="../packaging/standalone.html">
<a href="../packaging/standalone.html">
Standalone mode
</a>
</li>
<li class="chapter " data-level="1.10.2" data-path="../packaging/web-container.html">
<a href="../packaging/web-container.html">
WEB container mode
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.11" data-path="../catalog/security.html">
<a href="../catalog/security.html">
Micro Service Security
</a>
<ul class="articles">
<li class="chapter " data-level="1.11.1" data-path="../security/tls.html">
<a href="../security/tls.html">
Using TLS
</a>
</li>
<li class="chapter " data-level="1.11.2" data-path="../security/rsa.html">
<a href="../security/rsa.html">
Using RSA certification
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.12" data-path="../using-java-chassis-in-spring-boot.html">
<a href="../using-java-chassis-in-spring-boot.html">
Using java chassis in Spring Boot
</a>
<ul class="articles">
<li class="chapter " data-level="1.12.1" data-path="../using-java-chassis-in-spring-boot/components-for-spring-boot.html">
<a href="../using-java-chassis-in-spring-boot/components-for-spring-boot.html">
spring boot starter for java-chassis
</a>
</li>
<li class="chapter " data-level="1.12.2" data-path="../using-java-chassis-in-spring-boot/java-application.html">
<a href="../using-java-chassis-in-spring-boot/java-application.html">
JAVA application development
</a>
</li>
<li class="chapter " data-level="1.12.3" data-path="../using-java-chassis-in-spring-boot/web-application.html">
<a href="../using-java-chassis-in-spring-boot/web-application.html">
Web development method development
</a>
</li>
<li class="chapter " data-level="1.12.4" data-path="../using-java-chassis-in-spring-boot/diff-between-java-web.html">
<a href="../using-java-chassis-in-spring-boot/diff-between-java-web.html">
The difference between JAVA application method and Web development method
</a>
</li>
<li class="chapter " data-level="1.12.5" data-path="../using-java-chassis-in-spring-boot/diff-spring-mvc.html">
<a href="../using-java-chassis-in-spring-boot/diff-spring-mvc.html">
The difference in Spring MVC mode
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.13" data-path="../references-handlers/intruduction.html">
<a href="../references-handlers/intruduction.html">
Handlers reference
</a>
<ul class="articles">
<li class="chapter " data-level="1.13.1" data-path="../references-handlers/loadbalance.html">
<a href="../references-handlers/loadbalance.html">
Load Balancing
</a>
</li>
<li class="chapter " data-level="1.13.2" data-path="../references-handlers/publickey.html">
<a href="../references-handlers/publickey.html">
Public key authentication
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.14" data-path="../question-and-answer/question_answer.html">
<a href="../question-and-answer/question_answer.html">
FAQ
</a>
<ul class="articles">
<li class="chapter " data-level="1.14.1" data-path="../question-and-answer/interface-compatibility.html">
<a href="../question-and-answer/interface-compatibility.html">
Micro Service Interface Compatibility FAQ
</a>
</li>
</ul>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href=".." >Metrics</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="first-the-introduction-of-metrics">First, the introduction of Metrics</h1>
<p><img src="../assets/metrics/logicDiagram.png" alt=""></p>
<ol>
<li>Based on <a href="https://github.com/Netflix/spectator" target="_blank">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:<ol>
<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>
</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 style="text-align:left">Configuration Item</th>
<th style="text-align:left">Default</th>
<th style="text-align:left">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">servicecomb.metrics.window_time</td>
<td style="text-align:left">60000</td>
<td style="text-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 style="text-align:left">servicecomb.metrics<br>.invocation.latencyDistribution</td>
<td style="text-align:left"></td>
<td style="text-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 style="text-align:left">servicecomb.metrics<br>.Consumer.invocation.slow.enabled</td>
<td style="text-align:left">false</td>
<td style="text-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 style="text-align:left">servicecomb.metrics<br>.Consumer.invocation.slow.msTime</td>
<td style="text-align:left">1000</td>
<td style="text-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 style="text-align:left">servicecomb.metrics<br>.Provider.invocation.slow.enabled</td>
<td style="text-align:left">false</td>
<td style="text-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 style="text-align:left">servicecomb.metrics<br>.Provider.invocation.slow.msTime</td>
<td style="text-align:left">1000</td>
<td style="text-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 style="text-align:left">servicecomb.metrics<br>.prometheus.address</td>
<td style="text-align:left">0.0.0.0:9696</td>
<td style="text-align:left">prometheus listen address</td>
</tr>
<tr>
<td style="text-align:left">servicecomb.metrics.publisher.defaultLog<br>.enabled</td>
<td style="text-align:left">false</td>
<td style="text-align:left">Whether to output the default statistics log</td>
</tr>
<tr>
<td style="text-align:left">servicecomb.metrics.publisher.defaultLog<br>.endpoints.client.detail.enabled</td>
<td style="text-align:left">false</td>
<td style="text-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 <a href="http://ip:port/metrics" target="_blank">http://ip:port/metrics</a>.
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 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="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&#x3001;PRODUCER&#x3001;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>
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="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&apos;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] (<a href="https://github.com/Netflix/spectator" target="_blank">https://github.com/Netflix/spectator</a>) 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>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="visit-sc.html" class="navigation navigation-prev " aria-label="Previous page: Access Service Center">
<i class="fa fa-angle-left"></i>
</a>
<a href="microservice-invocation-chain.html" class="navigation navigation-next " aria-label="Next page: Microservice invocation chain">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Metrics","level":"1.7.2","depth":2,"next":{"title":"Microservice invocation chain","level":"1.7.3","depth":2,"path":"general-development/microservice-invocation-chain.md","ref":"general-development/microservice-invocation-chain.md","articles":[]},"previous":{"title":"Access Service Center","level":"1.7.1","depth":2,"path":"general-development/visit-sc.md","ref":"general-development/visit-sc.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"introduction.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"language":"en_US","gitbook":"*"},"file":{"path":"general-development/metrics.md","mtime":"2020-02-10T07:31:45.852Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-02-10T07:32:25.443Z"},"basePath":"..","book":{"language":"en_US"}});
});
</script>
</div>
<script src="../../gitbook/gitbook.js"></script>
<script src="../../gitbook/theme.js"></script>
<script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="../../gitbook/gitbook-plugin-search/search.js"></script>
<script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>