Skip to content

Commit b2dabb4

Browse files
committed
Merge remote-tracking branch 'origin/3.2' into version
* origin/3.2: Bump version to 3.1.8-SNAPSHOT Add Consumer Metrics (apache#11542) Backport of remove apache-rat-plugin. (apache#11523) (apache#11592) Add hessian allow Prepare 3.1.7 release
2 parents a4833bf + c43b631 commit b2dabb4

File tree

17 files changed

+294
-168
lines changed

17 files changed

+294
-168
lines changed

.github/workflows/build-and-test-pr.yml

-9
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,6 @@ jobs:
7979
with:
8080
name: "class-file"
8181
path: ${{ github.workspace }}/class.zip
82-
- name: "Pack rat file if failure"
83-
if: failure()
84-
run: 7z a ${{ github.workspace }}/rat.zip *rat.txt -r
85-
- name: "Upload rat file if failure"
86-
if: failure()
87-
uses: actions/upload-artifact@v3
88-
with:
89-
name: "rat-file"
90-
path: ${{ github.workspace }}/rat.zip
9182
- name: "Pack checkstyle file if failure"
9283
if: failure()
9384
run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/FilterChainBuilder.java

+4
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ public Result invoke(Invocation invocation) throws RpcException {
237237
return asyncResult;
238238
}
239239

240+
public Invoker<T> getFilterInvoker() {
241+
return filterInvoker;
242+
}
243+
240244
@Override
241245
public Class<T> getInterface() {
242246
return filterInvoker.getInterface();

dubbo-common/src/main/resources/security/serialize.allowlist

+1
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ java.util.UUID
124124
java.util.WeakHashMap
125125
org.apache.dubbo
126126
com.alibaba.dubbo
127+
com.alibaba.com.caucho.hessian.io.java8

dubbo-config/dubbo-config-api/src/test/java/org/apache/dubbo/config/ReferenceConfigTest.java

+13-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.apache.dubbo.rpc.Exporter;
3636
import org.apache.dubbo.rpc.Invoker;
3737
import org.apache.dubbo.rpc.ProxyFactory;
38+
import org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder;
3839
import org.apache.dubbo.rpc.cluster.support.registry.ZoneAwareClusterInvoker;
3940
import org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker;
4041
import org.apache.dubbo.rpc.listener.ListenerInvokerWrapper;
@@ -480,8 +481,18 @@ void testCreateInvokerForLocalRefer() {
480481
referenceConfig.init();
481482
Assertions.assertTrue(referenceConfig.getInvoker() instanceof MockClusterInvoker);
482483
Invoker<?> withFilter = ((MockClusterInvoker<?>) referenceConfig.getInvoker()).getDirectory().getAllInvokers().get(0);
483-
Assertions.assertTrue(withFilter instanceof ListenerInvokerWrapper);
484-
Assertions.assertTrue(((ListenerInvokerWrapper<?>) withFilter).getInvoker() instanceof InjvmInvoker);
484+
Assertions.assertTrue(withFilter instanceof ListenerInvokerWrapper
485+
|| withFilter instanceof FilterChainBuilder.CallbackRegistrationInvoker);
486+
if (withFilter instanceof ListenerInvokerWrapper) {
487+
Assertions.assertTrue(((ListenerInvokerWrapper<?>) withFilter).getInvoker() instanceof InjvmInvoker);
488+
}
489+
if (withFilter instanceof FilterChainBuilder.CallbackRegistrationInvoker) {
490+
Invoker filterInvoker = ((FilterChainBuilder.CallbackRegistrationInvoker) withFilter).getFilterInvoker();
491+
FilterChainBuilder.CopyOfFilterChainNode filterInvoker1 = (FilterChainBuilder.CopyOfFilterChainNode) filterInvoker;
492+
ListenerInvokerWrapper originalInvoker = (ListenerInvokerWrapper) filterInvoker1.getOriginalInvoker();
493+
Invoker invoker = originalInvoker.getInvoker();
494+
Assertions.assertTrue(invoker instanceof InjvmInvoker);
495+
}
485496
URL url = withFilter.getUrl();
486497
Assertions.assertEquals("application1", url.getParameter("application"));
487498
Assertions.assertEquals("value1", url.getParameter("key1"));

dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/model/MethodMetric.java

+51-29
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@
1717

1818
package org.apache.dubbo.metrics.model;
1919

20-
import org.apache.dubbo.common.constants.CommonConstants;
2120
import org.apache.dubbo.rpc.Invocation;
21+
import org.apache.dubbo.rpc.Invoker;
2222
import org.apache.dubbo.rpc.RpcInvocation;
2323

2424
import java.util.HashMap;
2525
import java.util.Map;
2626
import java.util.Objects;
27+
import java.util.Optional;
2728

29+
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER_SIDE;
30+
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_CHAR_SEPARATOR;
31+
import static org.apache.dubbo.common.constants.CommonConstants.PATH_SEPARATOR;
2832
import static org.apache.dubbo.common.constants.MetricsConstants.TAG_IP;
2933
import static org.apache.dubbo.common.constants.MetricsConstants.TAG_HOSTNAME;
3034
import static org.apache.dubbo.common.constants.MetricsConstants.TAG_APPLICATION_NAME;
@@ -41,6 +45,7 @@
4145
*/
4246
public class MethodMetric implements Metric {
4347
private String applicationName;
48+
private String side;
4449
private String interfaceName;
4550
private String methodName;
4651
private String group;
@@ -100,30 +105,6 @@ public Map<String, String> getTags() {
100105
return tags;
101106
}
102107

103-
@Override
104-
public boolean equals(Object o) {
105-
if (this == o) return true;
106-
if (o == null || getClass() != o.getClass()) return false;
107-
MethodMetric that = (MethodMetric) o;
108-
return Objects.equals(interfaceName, that.interfaceName) && Objects.equals(methodName, that.methodName)
109-
&& Objects.equals(group, that.group) && Objects.equals(version, that.version);
110-
}
111-
112-
@Override
113-
public int hashCode() {
114-
return Objects.hash(interfaceName, methodName, group, version);
115-
}
116-
117-
@Override
118-
public String toString() {
119-
return "MethodMetric{" +
120-
"interfaceName='" + interfaceName + '\'' +
121-
", methodName='" + methodName + '\'' +
122-
", group='" + group + '\'' +
123-
", version='" + version + '\'' +
124-
'}';
125-
}
126-
127108
private void init(Invocation invocation) {
128109
String serviceUniqueName = invocation.getTargetServiceUniqueName();
129110
String methodName = invocation.getMethodName();
@@ -135,21 +116,62 @@ && isGenericCall(((RpcInvocation) invocation).getParameterTypesDesc(), methodNam
135116
}
136117
String group = null;
137118
String interfaceAndVersion;
138-
String[] arr = serviceUniqueName.split(CommonConstants.PATH_SEPARATOR);
119+
String[] arr = serviceUniqueName.split(PATH_SEPARATOR);
139120
if (arr.length == 2) {
140121
group = arr[0];
141122
interfaceAndVersion = arr[1];
142123
} else {
143124
interfaceAndVersion = arr[0];
144125
}
145-
146-
String[] ivArr = interfaceAndVersion.split(CommonConstants.GROUP_CHAR_SEPARATOR);
126+
String[] ivArr = interfaceAndVersion.split(GROUP_CHAR_SEPARATOR);
147127
String interfaceName = ivArr[0];
148128
String version = ivArr.length == 2 ? ivArr[1] : null;
149-
129+
Optional<? extends Invoker<?>> invoker = Optional.ofNullable(invocation.getInvoker());
130+
this.side = invoker.isPresent() ? invoker.get().getUrl().getSide() : PROVIDER_SIDE;
150131
this.interfaceName = interfaceName;
151132
this.methodName = methodName;
152133
this.group = group;
153134
this.version = version;
154135
}
136+
137+
public String getApplicationName() {
138+
return applicationName;
139+
}
140+
141+
public void setApplicationName(String applicationName) {
142+
this.applicationName = applicationName;
143+
}
144+
145+
public String getSide() {
146+
return side;
147+
}
148+
149+
public void setSide(String side) {
150+
this.side = side;
151+
}
152+
153+
@Override
154+
public String toString() {
155+
return "MethodMetric{" +
156+
"applicationName='" + applicationName + '\'' +
157+
", side='" + side + '\'' +
158+
", interfaceName='" + interfaceName + '\'' +
159+
", methodName='" + methodName + '\'' +
160+
", group='" + group + '\'' +
161+
", version='" + version + '\'' +
162+
'}';
163+
}
164+
165+
@Override
166+
public boolean equals(Object o) {
167+
if (this == o) return true;
168+
if (o == null || getClass() != o.getClass()) return false;
169+
MethodMetric that = (MethodMetric) o;
170+
return Objects.equals(applicationName, that.applicationName) && Objects.equals(side, that.side) && Objects.equals(interfaceName, that.interfaceName) && Objects.equals(methodName, that.methodName) && Objects.equals(group, that.group) && Objects.equals(version, that.version);
171+
}
172+
173+
@Override
174+
public int hashCode() {
175+
return Objects.hash(applicationName, side, interfaceName, methodName, group, version);
176+
}
155177
}

dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/model/MetricsKey.java

+27-27
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,32 @@ public enum MetricsKey {
2121
APPLICATION_METRIC_INFO("dubbo.application.info.total", "Total Application Info"),
2222

2323
// provider metrics key
24-
PROVIDER_METRIC_REQUESTS("dubbo.provider.requests.total", "Total Requests"),
25-
PROVIDER_METRIC_REQUESTS_SUCCEED("dubbo.provider.requests.succeed.total", "Succeed Requests"),
26-
PROVIDER_METRIC_REQUEST_BUSINESS_FAILED("dubbo.provider.requests.business.failed.total","Failed Business Requests"),
27-
PROVIDER_METRIC_REQUESTS_PROCESSING("dubbo.provider.requests.processing", "Processing Requests"),
28-
PROVIDER_METRIC_REQUESTS_TIMEOUT("dubbo.provider.requests.timeout.total", "Total Timeout Failed Requests"),
29-
PROVIDER_METRIC_REQUESTS_LIMIT("dubbo.provider.requests.limit.total", "Total Limit Failed Requests"),
30-
PROVIDER_METRIC_REQUESTS_FAILED("dubbo.provider.requests.unknown.failed.total", "Unknown Failed Requests"),
31-
PROVIDER_METRIC_REQUESTS_TOTAL_FAILED("dubbo.provider.requests.failed.total", "Total Failed Requests"),
24+
METRIC_REQUESTS("dubbo.%s.requests.total", "Total Requests"),
25+
METRIC_REQUESTS_SUCCEED("dubbo.%s.requests.succeed.total", "Succeed Requests"),
26+
METRIC_REQUEST_BUSINESS_FAILED("dubbo.%s.requests.business.failed.total","Failed Business Requests"),
27+
METRIC_REQUESTS_PROCESSING("dubbo.%s.requests.processing", "Processing Requests"),
28+
METRIC_REQUESTS_TIMEOUT("dubbo.%s.requests.timeout.total", "Total Timeout Failed Requests"),
29+
METRIC_REQUESTS_LIMIT("dubbo.%s.requests.limit.total", "Total Limit Failed Requests"),
30+
METRIC_REQUESTS_FAILED("dubbo.%s.requests.unknown.failed.total", "Unknown Failed Requests"),
31+
METRIC_REQUESTS_TOTAL_FAILED("dubbo.%s.requests.failed.total", "Total Failed Requests"),
3232

3333

34-
PROVIDER_METRIC_REQUESTS_TOTAL_AGG("dubbo.provider.requests.total.aggregate", "Aggregated Total Requests"),
35-
PROVIDER_METRIC_REQUESTS_SUCCEED_AGG("dubbo.provider.requests.succeed.aggregate", "Aggregated Succeed Requests"),
36-
PROVIDER_METRIC_REQUESTS_FAILED_AGG("dubbo.provider.requests.failed.aggregate", "Aggregated Failed Requests"),
37-
PROVIDER_METRIC_REQUESTS_BUSINESS_FAILED_AGG("dubbo.provider.requests.business.failed.aggregate", "Aggregated Business Failed Requests"),
38-
PROVIDER_METRIC_REQUESTS_TIMEOUT_AGG("dubbo.provider.requests.timeout.failed.aggregate", "Aggregated timeout Failed Requests"),
39-
PROVIDER_METRIC_REQUESTS_LIMIT_AGG("dubbo.provider.requests.limit.aggregate", "Aggregated limit Requests"),
40-
PROVIDER_METRIC_REQUESTS_TOTAL_FAILED_AGG("dubbo.provider.requests.failed.total.aggregate", "Aggregated failed total Requests"),
34+
METRIC_REQUESTS_TOTAL_AGG("dubbo.%s.requests.total.aggregate", "Aggregated Total Requests"),
35+
METRIC_REQUESTS_SUCCEED_AGG("dubbo.%s.requests.succeed.aggregate", "Aggregated Succeed Requests"),
36+
METRIC_REQUESTS_FAILED_AGG("dubbo.%s.requests.failed.aggregate", "Aggregated Failed Requests"),
37+
METRIC_REQUESTS_BUSINESS_FAILED_AGG("dubbo.%s.requests.business.failed.aggregate", "Aggregated Business Failed Requests"),
38+
METRIC_REQUESTS_TIMEOUT_AGG("dubbo.%s.requests.timeout.failed.aggregate", "Aggregated timeout Failed Requests"),
39+
METRIC_REQUESTS_LIMIT_AGG("dubbo.%s.requests.limit.aggregate", "Aggregated limit Requests"),
40+
METRIC_REQUESTS_TOTAL_FAILED_AGG("dubbo.%s.requests.failed.total.aggregate", "Aggregated failed total Requests"),
4141

42-
PROVIDER_METRIC_QPS("dubbo.provider.qps.seconds", "Query Per Seconds"),
43-
PROVIDER_METRIC_RT_LAST("dubbo.provider.rt.seconds.last", "Last Response Time"),
44-
PROVIDER_METRIC_RT_MIN("dubbo.provider.rt.seconds.min", "Min Response Time"),
45-
PROVIDER_METRIC_RT_MAX("dubbo.provider.rt.seconds.max", "Max Response Time"),
46-
PROVIDER_METRIC_RT_SUM("dubbo.provider.rt.seconds.sum", "Sum Response Time"),
47-
PROVIDER_METRIC_RT_AVG("dubbo.provider.rt.seconds.avg", "Average Response Time"),
48-
PROVIDER_METRIC_RT_P99("dubbo.provider.rt.seconds.p99", "Response Time P99"),
49-
PROVIDER_METRIC_RT_P95("dubbo.provider.rt.seconds.p95", "Response Time P95"),
42+
METRIC_QPS("dubbo.%s.qps.seconds", "Query Per Seconds"),
43+
METRIC_RT_LAST("dubbo.%s.rt.seconds.last", "Last Response Time"),
44+
METRIC_RT_MIN("dubbo.%s.rt.seconds.min", "Min Response Time"),
45+
METRIC_RT_MAX("dubbo.%s.rt.seconds.max", "Max Response Time"),
46+
METRIC_RT_SUM("dubbo.%s.rt.seconds.sum", "Sum Response Time"),
47+
METRIC_RT_AVG("dubbo.%s.rt.seconds.avg", "Average Response Time"),
48+
METRIC_RT_P99("dubbo.%s.rt.seconds.p99", "Response Time P99"),
49+
METRIC_RT_P95("dubbo.%s.rt.seconds.p95", "Response Time P95"),
5050

5151
GENERIC_METRIC_REQUESTS("dubbo.%s.requests.total", "Total %s Requests"),
5252
GENERIC_METRIC_REQUESTS_SUCCEED("dubbo.%s.requests.succeed.total", "Succeed %s Requests"),
@@ -65,17 +65,17 @@ public enum MetricsKey {
6565
THREAD_POOL_MAX_SIZE("dubbo.thread.pool.max.size","Thread Pool Max Size"),
6666
THREAD_POOL_ACTIVE_SIZE("dubbo.thread.pool.active.size","Thread Pool Active Size"),
6767
THREAD_POOL_THREAD_COUNT("dubbo.thread.pool.thread.count","Thread Pool Thread Count"),
68-
THREAD_POOL_QUEUE_SIZE("dubbo.thread.pool.queue.size","Thread Pool Queue Size"),
69-
70-
// consumer metrics key
71-
;
68+
THREAD_POOL_QUEUE_SIZE("dubbo.thread.pool.queue.size","Thread Pool Queue Size");
7269

7370
private final String name;
7471
private final String description;
7572

7673
public final String getName() {
7774
return this.name;
7875
}
76+
public final String getNameByType(String type) {
77+
return String.format(name, type);
78+
}
7979

8080
public final String getDescription() {
8181
return this.description;

dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/model/sample/GaugeMetricSample.java

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public GaugeMetricSample(MetricsKey metricsKey, Map<String, String> tags, Metric
3535
this.supplier = supplier;
3636
}
3737

38+
public GaugeMetricSample(String name, String description, Map<String, String> tags, MetricsCategory category, Supplier<Number> supplier) {
39+
super(name, description, tags, Type.GAUGE, category);
40+
this.supplier = supplier;
41+
}
42+
3843
public GaugeMetricSample(String name, String description, Map<String, String> tags, MetricsCategory category, String baseUnit, Supplier<Number> supplier) {
3944
super(name, description, tags, Type.GAUGE, category, baseUnit);
4045
this.supplier = supplier;

dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/model/sample/MetricSample.java

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public String toString() {
121121
'}';
122122
}
123123

124+
124125
public enum Type {
125126
COUNTER,
126127
GAUGE,

dubbo-metrics/dubbo-metrics-default/src/main/java/org/apache/dubbo/metrics/collector/AggregateMetricsCollector.java

+32-16
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
package org.apache.dubbo.metrics.collector;
1919

20+
import java.util.ArrayList;
21+
import java.util.List;
22+
import java.util.concurrent.ConcurrentHashMap;
23+
import java.util.concurrent.ConcurrentMap;
24+
2025
import org.apache.dubbo.common.utils.ConcurrentHashMapUtils;
2126
import org.apache.dubbo.config.MetricsConfig;
2227
import org.apache.dubbo.config.context.ConfigManager;
@@ -33,11 +38,6 @@
3338
import org.apache.dubbo.metrics.model.sample.MetricSample;
3439
import org.apache.dubbo.rpc.model.ApplicationModel;
3540

36-
import java.util.ArrayList;
37-
import java.util.List;
38-
import java.util.concurrent.ConcurrentHashMap;
39-
import java.util.concurrent.ConcurrentMap;
40-
4141
import static org.apache.dubbo.metrics.model.MetricsCategory.QPS;
4242
import static org.apache.dubbo.metrics.model.MetricsCategory.REQUESTS;
4343
import static org.apache.dubbo.metrics.model.MetricsCategory.RT;
@@ -102,7 +102,7 @@ private void onRTEvent(RTEvent event) {
102102

103103
private void onRequestEvent(RequestEvent event) {
104104
MethodMetric metric = (MethodMetric) event.getSource();
105-
MetricsEvent.Type type = event.getType();
105+
RequestEvent.Type type = event.getType();
106106
TimeWindowCounter counter = null;
107107
switch (type) {
108108
case TOTAL:
@@ -152,23 +152,39 @@ public List<MetricSample> collect() {
152152
}
153153

154154
private void collectRequests(List<MetricSample> list) {
155-
totalRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_TOTAL_AGG, k.getTags(), REQUESTS, v::get)));
156-
succeedRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_SUCCEED_AGG, k.getTags(), REQUESTS, v::get)));
157-
unknownFailedRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_FAILED_AGG, k.getTags(), REQUESTS, v::get)));
158-
businessFailedRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_BUSINESS_FAILED_AGG, k.getTags(), REQUESTS, v::get)));
159-
timeoutRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_TIMEOUT_AGG, k.getTags(), REQUESTS, v::get)));
160-
limitRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_LIMIT_AGG, k.getTags(), REQUESTS, v::get)));
161-
totalFailedRequests.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_REQUESTS_TOTAL_FAILED_AGG, k.getTags(), REQUESTS, v::get)));
155+
totalRequests.forEach((k, v) ->
156+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_TOTAL_AGG, k, v)));
157+
succeedRequests.forEach((k, v) ->
158+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_SUCCEED_AGG, k, v)));
159+
unknownFailedRequests.forEach((k, v) ->
160+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_FAILED_AGG, k, v)));
161+
businessFailedRequests.forEach((k, v) ->
162+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_BUSINESS_FAILED_AGG, k, v)));
163+
timeoutRequests.forEach((k, v) ->
164+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_TIMEOUT_AGG, k, v)));
165+
limitRequests.forEach((k, v) ->
166+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_LIMIT_AGG, k, v)));
167+
totalFailedRequests.forEach((k, v) ->
168+
list.add(getGaugeMetricSample(MetricsKey.METRIC_REQUESTS_TOTAL_FAILED_AGG, k, v)));
169+
170+
}
171+
172+
private GaugeMetricSample getGaugeMetricSample(MetricsKey metricRequestsTotalAgg, MethodMetric k, TimeWindowCounter v) {
173+
return new GaugeMetricSample(metricRequestsTotalAgg.getNameByType(k.getSide()),
174+
metricRequestsTotalAgg.getDescription(), k.getTags(), REQUESTS, v::get);
162175
}
163176

164177
private void collectQPS(List<MetricSample> list) {
165-
qps.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_QPS, k.getTags(), QPS, () -> v.get() / v.bucketLivedSeconds())));
178+
qps.forEach((k, v) -> list.add(new GaugeMetricSample(MetricsKey.METRIC_QPS.getNameByType(k.getSide()),
179+
MetricsKey.METRIC_QPS.getDescription(), k.getTags(), QPS, () -> v.get() / v.bucketLivedSeconds())));
166180
}
167181

168182
private void collectRT(List<MetricSample> list) {
169183
rt.forEach((k, v) -> {
170-
list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_RT_P99, k.getTags(), RT, () -> v.quantile(0.99)));
171-
list.add(new GaugeMetricSample(MetricsKey.PROVIDER_METRIC_RT_P95, k.getTags(), RT, () -> v.quantile(0.95)));
184+
list.add(new GaugeMetricSample(MetricsKey.METRIC_RT_P99.getNameByType(k.getSide()),
185+
MetricsKey.METRIC_RT_P99.getDescription(), k.getTags(), RT, () -> v.quantile(0.99)));
186+
list.add(new GaugeMetricSample(MetricsKey.METRIC_RT_P95.getNameByType(k.getSide()),
187+
MetricsKey.METRIC_RT_P95.getDescription(), k.getTags(), RT, () -> v.quantile(0.95)));
172188
});
173189
}
174190
}

0 commit comments

Comments
 (0)