This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch asf-site
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git

commit 33072f951511e56661a71a2738bc4f8ee64d133e
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sat Apr 7 22:11:05 2018 +0800

    Publish the website
---
 content/cn/users/metrics-in-1.0.0-m1/index.html    | 46 +++++++++++----------
 .../index.html                                     | 10 +++--
 content/feed.xml                                   |  2 +-
 content/sitemap.xml                                |  2 +-
 content/users/edge-in-1.0.0-m1/index.html          |  2 +-
 content/users/metrics-in-1.0.0-m1/index.html       | 48 ++++++++++++----------
 .../index.html                                     | 15 ++++---
 7 files changed, 68 insertions(+), 57 deletions(-)

diff --git a/content/cn/users/metrics-in-1.0.0-m1/index.html 
b/content/cn/users/metrics-in-1.0.0-m1/index.html
index f01b1c4..3bbb830 100644
--- a/content/cn/users/metrics-in-1.0.0-m1/index.html
+++ b/content/cn/users/metrics-in-1.0.0-m1/index.html
@@ -1032,31 +1032,33 @@ name包括:</p>
 </div>
 
 <p>注意事项:</p>
-<ol>
-  
<li>通过MonitorManager获取Monitor传递name和tag数组,最终输出的ID是它们连接后的字符串,所以请保持唯一性,上面的例子输出的Metrics为:
-```java
-Map&lt;String,Double&gt; metrics = MonitorManager.getInstance().measure();</li>
-</ol>
 
-<p>//metrics的keySet()将包含:
-//     订单数量(商品名=levis jeans,型号=512)
-//     生成订单(统计项=事务每秒)
-//     生成订单(统计项=平均生成时间,单位=MILLISECONDS)
-//     生成订单(统计项=最大生成时间,单位=MILLISECONDS)</p>
-<div class="highlighter-rouge"><pre class="highlight"><code>
-2. MonitorManager获取Monitor的方法均为**获取或创建**,因此多次传递相同的name和tag数组返回的是同一个计数器:
-```java
-    Counter counter1 = MonitorManager.getInstance().getCounter("订单数量", "商品名", 
"levis jeans", "型号", "512");
-    Counter counter2 = MonitorManager.getInstance().getCounter("订单数量", "商品名", 
"levis jeans", "型号", "512");
-
-    counter1.increment();
-    counter2.increment();
-
-    Assert.assertEquals(2,counter1.getValue());
-    Assert.assertEquals(2,counter2.getValue());
-    
Assert.assertEquals(2.0,MonitorManager.getInstance().measure().get("订单数量(商品名=levis
 jeans,型号=512)"),0);
+<p>1.通过MonitorManager获取Monitor传递name和tag数组,最终输出的ID是它们连接后的字符串,所以请保持唯一性,上面的例子输出的Metrics为:</p>
+
+<div class="language-java highlighter-rouge"><pre 
class="highlight"><code><span class="n">Map</span><span 
class="o">&lt;</span><span class="n">String</span><span class="o">,</span><span 
class="n">Double</span><span class="o">&gt;</span> <span 
class="n">metrics</span> <span class="o">=</span> <span 
class="n">MonitorManager</span><span class="o">.</span><span 
class="na">getInstance</span><span class="o">().</span><span 
class="na">measure</span><span class="o">();</span>
+
+<span class="c1">//metrics的keySet()将包含:</span>
+<span class="c1">//    订单数量(商品名=levis jeans,型号=512)</span>
+<span class="c1">//    生成订单(统计项=事务每秒)</span>
+<span class="c1">//    生成订单(统计项=平均生成时间,单位=MILLISECONDS)</span>
+<span class="c1">//    生成订单(统计项=最大生成时间,单位=MILLISECONDS)</span>
 </code></pre>
 </div>
+
+<p>2.MonitorManager获取Monitor的方法均为<strong>获取或创建</strong>,因此多次传递相同的name和tag数组返回的是同一个计数器:</p>
+
+<div class="language-java highlighter-rouge"><pre 
class="highlight"><code><span class="n">Counter</span> <span 
class="n">counter1</span> <span class="o">=</span> <span 
class="n">MonitorManager</span><span class="o">.</span><span 
class="na">getInstance</span><span class="o">().</span><span 
class="na">getCounter</span><span class="o">(</span><span 
class="s">"订单数量"</span><span class="o">,</span> <span 
class="s">"商品名"</span><span class="o">,</span> <span class="s">"levis 
jeans"</span><span c [...]
+<span class="n">Counter</span> <span class="n">counter2</span> <span 
class="o">=</span> <span class="n">MonitorManager</span><span 
class="o">.</span><span class="na">getInstance</span><span 
class="o">().</span><span class="na">getCounter</span><span 
class="o">(</span><span class="s">"订单数量"</span><span class="o">,</span> <span 
class="s">"商品名"</span><span class="o">,</span> <span class="s">"levis 
jeans"</span><span class="o">,</span> <span class="s">"型号"</span><span 
class="o">,</span> <spa [...]
+
+<span class="n">counter1</span><span class="o">.</span><span 
class="na">increment</span><span class="o">();</span>
+<span class="n">counter2</span><span class="o">.</span><span 
class="na">increment</span><span class="o">();</span>
+
+<span class="n">Assert</span><span class="o">.</span><span 
class="na">assertEquals</span><span class="o">(</span><span 
class="mi">2</span><span class="o">,</span><span class="n">counter1</span><span 
class="o">.</span><span class="na">getValue</span><span class="o">());</span>
+<span class="n">Assert</span><span class="o">.</span><span 
class="na">assertEquals</span><span class="o">(</span><span 
class="mi">2</span><span class="o">,</span><span class="n">counter2</span><span 
class="o">.</span><span class="na">getValue</span><span class="o">());</span>
+<span class="n">Assert</span><span class="o">.</span><span 
class="na">assertEquals</span><span class="o">(</span><span 
class="mf">2.0</span><span class="o">,</span><span 
class="n">MonitorManager</span><span class="o">.</span><span 
class="na">getInstance</span><span class="o">().</span><span 
class="na">measure</span><span class="o">().</span><span 
class="na">get</span><span class="o">(</span><span class="s">"订单数量(商品名=levis 
jeans,型号=512)"</span><span class="o">),</span><span class="mi">0</ [...]
+</code></pre>
+</div>
+
 
<p><strong>获取Monitor的方法性能较低,请在初始化阶段一次获取所需的Monitor,然后将它们缓存起来,请参照前面OrderController的做法。</strong></p>
 
 <p><strong>提示:Servo已经被Netflix标记为DEPRECATED,我们将在1.0.0-m2中使用Netflix 
spectator替换,扩展自定义Metrics的方式会有调整</strong></p>
diff --git 
a/content/cn/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html 
b/content/cn/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html
index 1e44547..2f4439b 100644
--- 
a/content/cn/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html
+++ 
b/content/cn/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html
@@ -718,8 +718,9 @@ Prometheus推荐Pull模式拉取Metrics数据,被监控微服务作为Producer
 <p>其中job_name: 
‘servicecomb’即自定义的job配置,目标是本地微服务localhost:9696,关于prometheus.yml的配置更多信息可以参考<a 
href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/";>这篇文章</a>。</p>
 
 <h3 id="验证输出">验证输出</h3>
-<p>Prometheus Simple HTTP 
Server使用/metrics作为默认URL,metrics-prometheus会使用9696作为默认端口,微服务启动后你可以使用http://localhost:9696/metrics
 访问它。
-使用Prometheus Simple HTTP Server接口发布的数据是Prometheus采集的标准格式:</p>
+<p>Prometheus Simple HTTP 
Server使用/metrics作为默认URL,metrics-prometheus会使用9696作为默认端口,微服务启动后你可以使用http://localhost:9696/metrics
 访问它。</p>
+
+<p>使用Prometheus Simple HTTP Server接口发布的数据是Prometheus采集的标准格式:</p>
 <div class="language-text highlighter-rouge"><pre class="highlight"><code># 
HELP ServiceComb Metrics ServiceComb Metrics
 # TYPE ServiceComb Metrics untyped
 jvm{name="cpuRunningThreads",statistic="gauge",} 45.0
@@ -745,8 +746,9 @@ 
servicecomb_invocation_calculator_calculatorRestEndpoint_calculate{role="produce
 <h3 id="配置grafana可选">配置Grafana(可选)</h3>
 <p>如何在Grafana中添加Prometheus作为数据源请参考<a 
href="https://prometheus.io/docs/visualization/grafana/";>这篇文章</a>。</p>
 <h2 id="运行效果">运行效果</h2>
-<p>配置好Prometheus并启动了微服务之后,就可以打开Prometheus Web界面(默认地址是http://localhost:9090/ 
),在Metrics列表中看到ServiceComb开头的Java Chassis Metrics,如下图所示:
-<img src="/assets/images/MetricsInPrometheus.png" alt="MetricsInPrometheus" 
/></p>
+<p>配置好Prometheus并启动了微服务之后,就可以打开Prometheus Web界面(默认地址是http://localhost:9090/ 
),在Metrics列表中看到ServiceComb开头的Java Chassis Metrics,如下图所示:</p>
+
+<p><img src="/assets/images/MetricsInPrometheus.png" alt="MetricsInPrometheus" 
/></p>
 
 <p>为了能够达到更好的查询效果,在Grafana中添加Prometheus作为数据源,通过Grafana查询数据如下图示:</p>
 
diff --git a/content/feed.xml b/content/feed.xml
index 4391983..2d35b08 100644
--- a/content/feed.xml
+++ b/content/feed.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?><feed 
xmlns="http://www.w3.org/2005/Atom"; ><generator uri="https://jekyllrb.com/"; 
version="3.4.3">Jekyll</generator><link href="/feed.xml" rel="self" 
type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" 
/><updated>2018-04-04T15:52:34+08:00</updated><id>/</id><title 
type="html">Apache ServiceComb (incubating)</title><subtitle>The homepage of 
ServiceComb</subtitle><author><name>{&quot;name&quot;=&gt;nil, 
&quot;avatar&quot;=&gt; [...]
+<?xml version="1.0" encoding="utf-8"?><feed 
xmlns="http://www.w3.org/2005/Atom"; ><generator uri="https://jekyllrb.com/"; 
version="3.4.3">Jekyll</generator><link href="/feed.xml" rel="self" 
type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" 
/><updated>2018-04-07T22:09:43+08:00</updated><id>/</id><title 
type="html">Apache ServiceComb (incubating)</title><subtitle>The homepage of 
ServiceComb</subtitle><author><name>{&quot;name&quot;=&gt;nil, 
&quot;avatar&quot;=&gt; [...]
 
 &lt;ul&gt;
   
&lt;li&gt;&lt;strong&gt;嵌套调用&lt;/strong&gt;。如网上购物时,会依次经过下单、支付服务和第三方支付这几个子事务,其中,下单依赖于支付服务的返回状态,而支付服务也包含了多种可选的支付方式,并依赖于具体支付方式返回的结果。通过Saga,可以清晰地看到一个完整事务中各个服务之间的关系,在异常时也能快速定位出现问题的子事务。&lt;/li&gt;
diff --git a/content/sitemap.xml b/content/sitemap.xml
index bb68269..edb36df 100644
--- a/content/sitemap.xml
+++ b/content/sitemap.xml
@@ -647,7 +647,7 @@
 </url>
 <url>
 <loc>/assets/slides/20171221/data.consistency.live.pdf</loc>
-<lastmod>2017-12-22T14:18:20+08:00</lastmod>
+<lastmod>2018-04-07T22:08:23+08:00</lastmod>
 </url>
 <url>
 <loc>/assets/slides/20180111/ServiceComb_Metrics_Introduction.pdf</loc>
diff --git a/content/users/edge-in-1.0.0-m1/index.html 
b/content/users/edge-in-1.0.0-m1/index.html
index 4b96e6a..95e67be 100644
--- a/content/users/edge-in-1.0.0-m1/index.html
+++ b/content/users/edge-in-1.0.0-m1/index.html
@@ -717,7 +717,7 @@
 <p>Edge Service always use to provide monitoring, resiliency, security, and 
more, not only dynamic routing. We recommend extend custom handlers, there is 
an example named AuthHandler in demo-edge.</p>
 
 <h2 id="other-reference">Other Reference</h2>
-<p>In demo/demo-edge we had provided a simple demo to show abilities of Edge 
Service:</p>
+<p>In demo/demo-edge we had provided a simple demo to show abilities of Edge 
Service:</p>
 <ol>
   <li>edge-service:Edge Service, include AuthHandler;</li>
   <li>authentication:Simulate authentication, accept requests from 
AuthHandler;</li>
diff --git a/content/users/metrics-in-1.0.0-m1/index.html 
b/content/users/metrics-in-1.0.0-m1/index.html
index 95e6816..69b6876 100644
--- a/content/users/metrics-in-1.0.0-m1/index.html
+++ b/content/users/metrics-in-1.0.0-m1/index.html
@@ -943,6 +943,7 @@ Tag name and value below:</p>
     <span class="n">node</span><span class="o">.</span><span 
class="na">getChildrenNode</span><span class="o">(</span><span 
class="s">"1"</span><span class="o">).</span><span 
class="na">getChildrenNode</span><span class="o">(</span><span 
class="s">"20"</span><span class="o">).</span><span 
class="na">getFirstMatchMetricValue</span><span class="o">(</span><span 
class="s">"K3"</span><span class="o">,</span><span class="s">"30"</span><span 
class="o">);</span>
 </code></pre>
 </div>
+
 <p><em>More detail can be found in 
demo/perf/PerfMetricsFilePublisher.java</em></p>
 
 <h2 id="how-to-extend-custom-metrics">How to Extend Custom Metrics</h2>
@@ -1013,32 +1014,35 @@ Tag name and value below:</p>
 <span class="o">}</span>
 </code></pre>
 </div>
+
 <p>Notice:</p>
-<ol>
-  <li>Metric ID is join name and all tags that pass to MonitorManager when 
getting monitor,so please keep uniqueness,metrics output of front example are:
-```java
-Map&lt;String,Double&gt; metrics = MonitorManager.getInstance().measure();</li>
-</ol>
 
-<p>//metrics.keySet() include:
-//     orderCount(product=levis jeans,model=512)
-//     orderGenerated(statistic=tps)
-//     orderGenerated(statistic=latency,unit=MILLISECONDS)
-//     orderGenerated(statistic=max,unit=MILLISECONDS)</p>
-<div class="highlighter-rouge"><pre class="highlight"><code>
-2. All get monitor method in MonitorManager act as **get or new**,so use same 
name and tags will return same one monitor:
-```java
-    Counter counter1 = 
MonitorManager.getInstance().getCounter("orderGenerated", "product", "levis 
jeans", "model", "512");
-    Counter counter2 = 
MonitorManager.getInstance().getCounter("orderGenerated", "product", "levis 
jeans", "model", "512");
-
-    counter1.increment();
-    counter2.increment();
-
-    Assert.assertEquals(2,counter1.getValue());
-    Assert.assertEquals(2,counter2.getValue());
-    
Assert.assertEquals(2.0,MonitorManager.getInstance().measure().get("orderGenerated(product=levis
 jeans,model=512)"),0);
+<p>1.Metric ID is join name and all tags that pass to MonitorManager when 
getting monitor,so please keep uniqueness,metrics output of front example 
are:</p>
+
+<div class="language-java highlighter-rouge"><pre 
class="highlight"><code><span class="n">Map</span><span 
class="o">&lt;</span><span class="n">String</span><span class="o">,</span><span 
class="n">Double</span><span class="o">&gt;</span> <span 
class="n">metrics</span> <span class="o">=</span> <span 
class="n">MonitorManager</span><span class="o">.</span><span 
class="na">getInstance</span><span class="o">().</span><span 
class="na">measure</span><span class="o">();</span>
+
+<span class="c1">//metrics.keySet() include:</span>
+<span class="c1">//    orderCount(product=levis jeans,model=512)</span>
+<span class="c1">//    orderGenerated(statistic=tps)</span>
+<span class="c1">//    
orderGenerated(statistic=latency,unit=MILLISECONDS)</span>
+<span class="c1">//    orderGenerated(statistic=max,unit=MILLISECONDS)</span>
 </code></pre>
 </div>
+
+<p>2.All get monitor method in MonitorManager act as <strong>get or 
new</strong>,so use same name and tags will return same one monitor:</p>
+
+<div class="language-java highlighter-rouge"><pre 
class="highlight"><code><span class="n">Counter</span> <span 
class="n">counter1</span> <span class="o">=</span> <span 
class="n">MonitorManager</span><span class="o">.</span><span 
class="na">getInstance</span><span class="o">().</span><span 
class="na">getCounter</span><span class="o">(</span><span 
class="s">"orderGenerated"</span><span class="o">,</span> <span 
class="s">"product"</span><span class="o">,</span> <span class="s">"levis 
jeans" [...]
+<span class="n">Counter</span> <span class="n">counter2</span> <span 
class="o">=</span> <span class="n">MonitorManager</span><span 
class="o">.</span><span class="na">getInstance</span><span 
class="o">().</span><span class="na">getCounter</span><span 
class="o">(</span><span class="s">"orderGenerated"</span><span 
class="o">,</span> <span class="s">"product"</span><span class="o">,</span> 
<span class="s">"levis jeans"</span><span class="o">,</span> <span 
class="s">"model"</span><span class= [...]
+
+<span class="n">counter1</span><span class="o">.</span><span 
class="na">increment</span><span class="o">();</span>
+<span class="n">counter2</span><span class="o">.</span><span 
class="na">increment</span><span class="o">();</span>
+
+<span class="n">Assert</span><span class="o">.</span><span 
class="na">assertEquals</span><span class="o">(</span><span 
class="mi">2</span><span class="o">,</span><span class="n">counter1</span><span 
class="o">.</span><span class="na">getValue</span><span class="o">());</span>
+<span class="n">Assert</span><span class="o">.</span><span 
class="na">assertEquals</span><span class="o">(</span><span 
class="mi">2</span><span class="o">,</span><span class="n">counter2</span><span 
class="o">.</span><span class="na">getValue</span><span class="o">());</span>
+<span class="n">Assert</span><span class="o">.</span><span 
class="na">assertEquals</span><span class="o">(</span><span 
class="mf">2.0</span><span class="o">,</span><span 
class="n">MonitorManager</span><span class="o">.</span><span 
class="na">getInstance</span><span class="o">().</span><span 
class="na">measure</span><span class="o">().</span><span 
class="na">get</span><span class="o">(</span><span 
class="s">"orderGenerated(product=levis jeans,model=512)"</span><span 
class="o">),</span><sp [...]
+</code></pre>
+</div>
+
 <p><strong>Performance of get monitor from MonitorManager is slightly lower,so 
please get all monitors what needed when init,then cache them for later 
use,like OrderController example.</strong></p>
 
 <p><strong>Notice: Servo had marked with DEPRECATED by Netflix, we will use 
Netflix spectator instead in 1.0.0-m2, the way of extending custom metrics will 
be adjusted</strong></p>
diff --git 
a/content/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html 
b/content/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html
index 452ba53..368804f 100644
--- a/content/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html
+++ b/content/users/metrics-integration-with-prometheus-in-1.0.0-m1/index.html
@@ -701,8 +701,9 @@ As an integration(optional) module,the implementation code 
is in metrics-integra
 <p>The job_name: ‘servicecomb’ is our custom job,it will collect metrics data 
from local microservice localhost:9696,more information about configuration of 
prometheus can found <a 
href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/";>here</a>.</p>
 
 <h3 id="verify-output">Verify Output</h3>
-<p>Prometheus Simple HTTP Server use /metrics as default 
URL,metrics-prometheus will use 9696 as default port,after microservice start 
up you can get metrics data at http://localhost:9696/metrics . 
-Prometheus Simple HTTP Server provider interface will publish the standard 
format which prometheus needed:</p>
+<p>Prometheus Simple HTTP Server use /metrics as default 
URL,metrics-prometheus will use 9696 as default port,after microservice start 
up you can get metrics data at http://localhost:9696/metrics.</p>
+
+<p>Prometheus Simple HTTP Server provider interface will publish the standard 
format which prometheus needed:</p>
 <div class="language-text highlighter-rouge"><pre class="highlight"><code># 
HELP ServiceComb Metrics ServiceComb Metrics
 # TYPE ServiceComb Metrics untyped
 jvm{name="cpuRunningThreads",statistic="gauge",} 45.0
@@ -728,11 +729,13 @@ 
servicecomb_invocation_calculator_calculatorRestEndpoint_calculate{role="produce
 <h3 id="config-grafanaoptional">Config Grafana(optional)</h3>
 <p>How add prometheus as a datasource in grafana can found <a 
href="https://prometheus.io/docs/visualization/grafana/";>here</a>.</p>
 <h2 id="effect-show">Effect Show</h2>
-<p>After complete prometheus config and start up microservice,we can open 
prometheus web site(default address is http://localhost:9090/),in metrics list 
java chassis metrics with prefix ‘servicecomb’ can be seen:
-<img src="/assets/images/MetricsInPrometheus.png" alt="MetricsInPrometheus" 
/></p>
+<p>After complete prometheus config and start up microservice,we can open 
prometheus web site(default address is http://localhost:9090/),in metrics list 
java chassis metrics with prefix ‘servicecomb’ can be seen:</p>
+
+<p><img src="/assets/images/MetricsInPrometheus.png" alt="MetricsInPrometheus" 
/></p>
+
+<p>For get more better data query experience,add prometheus as a datasource in 
grafana then query metrics data by it:</p>
 
-<p>For get more better data query experience,add prometheus as a datasource in 
grafana then query metrics data by it:<br />
-<img src="/assets/images/MetricsInGrafana.png" alt="MetricsInGrafana" /></p>
+<p><img src="/assets/images/MetricsInGrafana.png" alt="MetricsInGrafana" /></p>
 
         
       </section>

-- 
To stop receiving notification emails like this one, please contact
ningji...@apache.org.

Reply via email to