[SCB-327] Update metrics publish data module#550
Conversation
8f4fb45 to
72b6b33
Compare
|
Rebase and resolved conflicts |
| tps.increment(); | ||
| } | ||
|
|
||
| public Map<String, Double> measure(int windowTimeIndex) { |
There was a problem hiding this comment.
Do we still need to support window time here?
There was a problem hiding this comment.
I think we may remove this feature later
| this.appliedWindowTimes.put(appliedWindowTimes.get(i), i); | ||
|
|
||
| List<Long> sortedPollingSettings = Lists.newArrayList(parsePollingSettings); | ||
| System.getProperties().setProperty("servo.pollers", Strings.join(",", sortedPollingSettings.iterator())); |
There was a problem hiding this comment.
It's not good way to set the system properties here (as it could be overridden anytime), can we setup the servo poller directly?
There was a problem hiding this comment.
it seems servo read and parse this setting use System.getPropert;
Could not find another way yet.
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
…h code (200,500... etc) Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class Metric { |
There was a problem hiding this comment.
why wrap another class?
Metric just equals Measurement......
There was a problem hiding this comment.
we do not import spectator in current version;
this class had parse metric output id into name and tag map,easy use for grouping
| package org.apache.servicecomb.metrics.common; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; |
There was a problem hiding this comment.
common move to foundation-metrics
There was a problem hiding this comment.
metrics-common had deleted and move all content into foundation-metrics
| * @return RegistryMetric | ||
| */ | ||
| RegistryMetric metricsWithWindowTime(long windowTime); | ||
| Map<String, Double> metrics(); |
There was a problem hiding this comment.
why we need this interface?
…foundation-metrics Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
1c06e50 to
977a4ef
Compare
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
…n-metrics Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
…er to prevent low-probability test failed on ci Signed-off-by: zhengyangyong <yangyong.zheng@huawei.com>
Follow this checklist to help us incorporate your contribution quickly and easily:
[SCB-XXX] Fixes bug in ApproximateQuantiles, where you replaceSCB-XXXwith the appropriate JIRA issue.mvn clean installto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.adjust metrics publish format to spring cloud netflix style
Before:
servicecomb.instance.system.cpu.load
servicecomb.instance.system.cpu.runningThreads
servicecomb.instance.system.heap.init
servicecomb.instance.system.heap.max
servicecomb.instance.system.heap.commit
servicecomb.instance.system.heap.used
servicecomb.instance.system.nonHeap.init
servicecomb.instance.system.nonHeap.max
servicecomb.instance.system.nonHeap.commit
servicecomb.instance.system.nonHeap.used
servicecomb.instance | operationName.producer.waitInQueue.count
servicecomb.instance | operationName.producer.lifeTimeInQueue.average
servicecomb.instance | operationName.producer.lifeTimeInQueue.max
servicecomb.instance | operationName.producer.lifeTimeInQueue.min
servicecomb.instance | operationName.producer.executionTime.average
servicecomb.instance | operationName.producer.executionTime.max
servicecomb.instance | operationName.producer.executionTime.min
servicecomb.instance | operationName.producer.producerLatency.average
servicecomb.instance | operationName.producer.producerLatency.max
servicecomb.instance | operationName.producer.producerLatency.min
servicecomb.instance | operationName.producer.producerCall.total
servicecomb.instance | operationName.producer.producerCall.tps
servicecomb.instance | operationName.consumer.consumerLatency.average
servicecomb.instance | operationName.consumer.consumerLatency.max
servicecomb.instance | operationName.consumer.consumerLatency.min
servicecomb.instance | operationName.consumer.consumerCall.total
servicecomb.instance | operationName.consumer.consumerCall.tps
Current:
jvm(statistic=gauge,name={name})
{name} include :
cpuLoad,cpuRunningThreads,heapInit,heapMax,heapCommit,
heapUsed,nonHeapInit,nonHeapMax,nonHeapCommit,nonHeapUsed
servicecomb.invocation(operation={operationName},role={role},stage={stage},statistic={statistic},status={status})
A output sample:
