You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicecomb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/01 06:07:00 UTC

[jira] [Commented] (SCB-356) Fix metrics write file samples add status code to file name

    [ https://issues.apache.org/jira/browse/SCB-356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381560#comment-16381560 ] 

ASF GitHub Bot commented on SCB-356:
------------------------------------

WillemJiang closed pull request #561: [SCB-356] update metrics write file samples : add status code to file name
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/561
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 1f9c21f43..c3f3d59ce 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 @@ private String convertMetricKey(String key) {
       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();
     }
   }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Fix metrics write file samples add status code to file name
> -----------------------------------------------------------
>
>                 Key: SCB-356
>                 URL: https://issues.apache.org/jira/browse/SCB-356
>             Project: Apache ServiceComb
>          Issue Type: Sub-task
>          Components: Java-Chassis
>    Affects Versions: java-chassis-1.0.0-m1
>            Reporter: yangyongzheng
>            Assignee: yangyongzheng
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m1
>
>
> Add status code to metrics output file name for better effect
> before :
> mwf.mwf-log4j-springboot.mwf-log4j-springboot.demoServiceEndpoint.fun.producer.execution.latency.dat
> now
> mwf.mwf-log4j-springboot.mwf-log4j-springboot.demoServiceEndpoint.fun.producer.execution.latency.**200**.dat
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)