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/03/01 06:06:23 UTC

[incubator-servicecomb-java-chassis] branch master updated: SCB-356 update metrics write file samples : add status code to file name

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-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c457f4  SCB-356 update metrics write file samples : add status code to file name
8c457f4 is described below

commit 8c457f450849e1dedc2db39d9d36bc70c5571d42
Author: zhengyangyong <ya...@huawei.com>
AuthorDate: Wed Feb 28 11:53:30 2018 +0800

    SCB-356 update metrics write file samples : add status code to file name
    
    Signed-off-by: zhengyangyong <ya...@huawei.com>
---
 .../apache/servicecomb/samples/mwf/SimpleFileContentConvertor.java    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/SimpleFileContentConvertor.java b/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/SimpleFileContentConvertor.java
index 1f9c21f..c3f3d59 100644
--- a/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/SimpleFileContentConvertor.java
+++ b/samples/metrics-write-file-sample/metrics-write-file/src/main/java/org/apache/servicecomb/samples/mwf/SimpleFileContentConvertor.java
@@ -76,6 +76,10 @@ public class SimpleFileContentConvertor implements FileContentConvertor {
       builder.append(tags.get(MetricsConst.TAG_STAGE));
       builder.append(".");
       builder.append(tags.get(MetricsConst.TAG_STATISTIC));
+      if (tags.containsKey(MetricsConst.TAG_STATUS)) {
+        builder.append(".");
+        builder.append(tags.get(MetricsConst.TAG_STATUS));
+      }
       return builder.toString();
     }
   }

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