You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/04/04 07:49:54 UTC

[incubator-servicecomb-website] 06/06: update metrics doc and resolve conflict

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

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

commit ee03fedee246072dd6d77584b30f3598f4eaacea
Author: zhengyangyong <ya...@huawei.com>
AuthorDate: Wed Apr 4 11:41:50 2018 +0800

    update metrics doc and resolve conflict
    
    Signed-off-by: zhengyangyong <ya...@huawei.com>
---
 _users/cn/metrics-in-1.0.0-m1.md |  8 +++++++-
 _users/metrics-in-1.0.0-m1.md    | 10 ++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/_users/cn/metrics-in-1.0.0-m1.md b/_users/cn/metrics-in-1.0.0-m1.md
index b2789b1..bd08c41 100644
--- a/_users/cn/metrics-in-1.0.0-m1.md
+++ b/_users/cn/metrics-in-1.0.0-m1.md
@@ -81,6 +81,8 @@ Metrics有很多种分类方式,在技术实现上我们偏向以取值方式
   获取此类Metrics的值,返回的是上一个周期的统计结果,具有一定的延后性。在Servo中,这个时间被称为[“Polling Intervals”](https://github.com/Netflix/servo/wiki/Getting-Started)。    
   从1.0.0-m1开始,可以通过microservice.yaml中的servicecomb.metrics.window_time配置设置周期,效果与servo.pollers一致。  
 
+**提示:Servo已经被Netflix标记为DEPRECATED,我们将在1.0.0-m2中使用Netflix spectator替换,将不需要设置周期**
+
 ## Metrics数据ID格式
 Java Chassis Metrics内置两种类型的Metric输出:
 ### JVM信息
@@ -169,6 +171,8 @@ MonitorManager manager = MonitorManager.getInstance();
 Map<String, Double> metrics = manager.measure();
 ```
 
+**提示:Servo已经被Netflix标记为DEPRECATED,我们将在1.0.0-m2中使用Netflix spectator替换,获取数据的接口会有调整**
+
 ## 如何使用数据
 Metrics数据将以Map<String, Double>的形式输出,为了能够方便用户获取指定Metric的值,提供了org.apache.servicecomb.foundation.metrics.publish.MetricsLoader工具类:
 ```java
@@ -273,7 +277,9 @@ Map<String,Double> metrics = MonitorManager.getInstance().measure();
 ```
 **获取Monitor的方法性能较低,请在初始化阶段一次获取所需的Monitor,然后将它们缓存起来,请参照前面OrderController的做法。**
 
+**提示:Servo已经被Netflix标记为DEPRECATED,我们将在1.0.0-m2中使用Netflix spectator替换,扩展自定义Metrics的方式会有调整**
+
 ## 参考示例
 我们已经开发完成了两个使用场景可以作为参考:  
-1. metrics-wirte-file:将Metrics数据写入文件,代码在samples\metrics-write-file-sample中;  
+1. demo/perf:在Console里打印Metrics;
 2. metrics-prometheus:将Metrics发布为prometheus Producer。  
\ No newline at end of file
diff --git a/_users/metrics-in-1.0.0-m1.md b/_users/metrics-in-1.0.0-m1.md
index c2eb06f..f46d845 100644
--- a/_users/metrics-in-1.0.0-m1.md
+++ b/_users/metrics-in-1.0.0-m1.md
@@ -81,6 +81,8 @@ Metrics had many classifications,we can divided them into two major types by how
   If get value of this type,the result returned is the last 'Step Cycle' counted.in Servo,this time called ['Polling Intervals'](https://github.com/Netflix/servo/wiki/Getting-Started).
   From 1.0.0-m1,can set **servicecomb.metrics.window_time** in microservice.yaml,it has same effect as set **servo.pollers**.   
 
+**Notice: Servo had marked with DEPRECATED by Netflix, we will use Netflix spectator instead in 1.0.0-m2, no need to set the window_time any more**
+
 ## Metrics ID Format
 From 1.0.0-m1,build-in two type Metric output:   
 ### JVM Information
@@ -169,6 +171,8 @@ MonitorManager manager = MonitorManager.getInstance();
 Map<String, Double> metrics = manager.measure();
 ```
 
+**Notice: Servo had marked with DEPRECATED by Netflix, we will use Netflix spectator instead in 1.0.0-m2, publish interface will be adjusted**
+
 ## How to Use Metrics Data
 Metrics data will output as Map<String,Double>,in order to let user easier fetch certain metric value,we provide org.apache.servicecomb.foundation.metrics.publish.MetricsLoader tool class:
 ```java
@@ -230,7 +234,7 @@ public class OrderController {
     //process order logic
     //...
     //process finished
-    long totalTime = System.nanoTime() - startTime;
+    long totalTime = System.nanoTime() - startTime;
 
     //increase order count
     this.orderCount.increment();
@@ -272,7 +276,9 @@ Map<String,Double> metrics = MonitorManager.getInstance().measure();
 ```
 **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.**
 
+**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**
+
 ## Other Reference 
 We had developed two use case for reference:  
-1. metrics-wirte-file:ouput metrics data into files,code is at samples\metrics-write-file-sample;  
+1. demo/perf:print Metrics in Console;  
 2. metrics-prometheus:integration with prometheus,publish metrics as prometheus producer.
\ No newline at end of file

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