funky-eyes commented on code in PR #7882:
URL: https://github.com/apache/incubator-seata/pull/7882#discussion_r2667191951
##########
namingserver/src/main/java/org/apache/seata/namingserver/manager/ClusterWatcherManager.java:
##########
@@ -85,8 +93,15 @@ public void onChangeEvent(ClusterChangeEvent event) {
GROUP_UPDATE_TERM.put(event.getGroup(), event.getTerm());
// Notifications are made of changes in cluster information
- Optional.ofNullable(WATCHERS.remove(event.getGroup()))
- .ifPresent(watchers ->
watchers.parallelStream().forEach(this::notify));
+
Optional.ofNullable(WATCHERS.remove(event.getGroup())).ifPresent(watchers -> {
+ watchers.parallelStream().forEach(this::notify);
+ // Increment cluster change push counter
+ if (!watchers.isEmpty()) {
+
metricsManager.incrementClusterChangePushCount(event.getGroup());
Review Comment:
Here, only the "group" is included. Is it possible to also include the
namespace and cluster information as tags?
##########
namingserver/src/main/resources/application.yml:
##########
@@ -51,14 +51,30 @@ console:
# addr:
# - 127.0.0.1:8081
seata:
+ namingserver:
+ metrics:
+ enabled: true
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
csrf-ignore-urls: /naming/v1/**,/api/v1/naming/**
ignore:
urls:
/,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json,/naming/v1/health,/error
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "prometheus,health,info,metrics"
+ metrics:
+ tags:
+ application: ${spring.application.name}
+ distribution:
+ percentiles:
+ http.server.requests: 0.5, 0.9, 0.95, 0.99, 0.999
+ percentiles-histogram:
+ http.server.requests: true
Review Comment:
```suggestion
percentiles:
http.server.requests: 0.5, 0.99, 0.999
```
I believe that for now, these three percentiles should suffice, and we
should not enable percentiles-histogram, as it would result in excessive data
being generated in Prometheus.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]