You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "focuse8 (via GitHub)" <gi...@apache.org> on 2023/12/20 03:51:22 UTC
[I] metrics version doesn't change when receiving event in AggregateMetricsCollector [dubbo]
focuse8 opened a new issue, #13544:
URL: https://github.com/apache/dubbo/issues/13544
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 3.2.10
* Operating System version: xxx
* Java version: 1.8
### Steps to reproduce this issue
`public void onEvent(RequestEvent event) {
if (enableQps) {
MethodMetric metric = calcWindowCounter(event, MetricsKey.METRIC_REQUESTS);
TimeWindowCounter qpsCounter = qps.get(metric);
if (qpsCounter == null) {
qpsCounter = ConcurrentHashMapUtils.computeIfAbsent(
qps,
metric,
methodMetric -> new TimeWindowCounter(
bucketNum, TimeUnit.MILLISECONDS.toSeconds(qpsTimeWindowMillSeconds)));
samplesChanged.set(true);
}
qpsCounter.increment();
}
}`
the source above in AggregateMetricsCollector.class shows that the field "samplesChanged" changed only if there is a new TimeWindowCounter.
A event causing qps to change won't be collected. Is that expected?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] metrics version doesn't change when receiving event in AggregateMetricsCollector [dubbo]
Posted by "focuse8 (via GitHub)" <gi...@apache.org>.
focuse8 commented on issue #13544:
URL: https://github.com/apache/dubbo/issues/13544#issuecomment-1865407262
Got it! Thank you! I thought the value of GaugeMetricSample was a number . it is the Object of TimeWindowQuantile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] metrics version doesn't change when receiving event in AggregateMetricsCollector [dubbo]
Posted by "focuse8 (via GitHub)" <gi...@apache.org>.
focuse8 closed issue #13544: metrics version doesn't change when receiving event in AggregateMetricsCollector
URL: https://github.com/apache/dubbo/issues/13544
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] metrics version doesn't change when receiving event in AggregateMetricsCollector [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13544:
URL: https://github.com/apache/dubbo/issues/13544#issuecomment-1865373025
`samplesChanged` is design to notify micrometer that any metric collectors are changed, which we need to register a new metrics to micrometer. If metrics value it self changed, micrometer can perceive it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [I] metrics version doesn't change when receiving event in AggregateMetricsCollector [dubbo]
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #13544:
URL: https://github.com/apache/dubbo/issues/13544#issuecomment-1865375272
You can check in `org.apache.dubbo.metrics.report.AbstractMetricsReporter#registerSample`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org