quantranhong1999 commented on code in PR #2483: URL: https://github.com/apache/james-project/pull/2483#discussion_r1827121504
########## server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPServer.java: ########## @@ -90,10 +95,19 @@ public void start() { .orElse(RANDOM_PORT)) .handle((request, response) -> handleVersionRoute(request).handleRequest(request, response)) .wiretap(wireTapEnabled()) + .metrics(true, Function.identity()) Review Comment: > And out of question what does Function.identity() allow to do? https://projectreactor.io/docs/netty/release/api/reactor/netty/http/server/HttpServer.html#metrics-boolean-java.util.function.Function- ``` uriTagValue function receives the actual uri and returns the uri tag value that will be used for the metrics with [Metrics.URI](https://projectreactor.io/docs/netty/release/api/reactor/netty/Metrics.html#URI) tag. For example instead of using the actual uri "/users/1" as uri tag value, templated uri "/users/{id}" can be used. Note: It is strongly recommended to provide template-like form for the URIs. Without a conversion to a template-like form, each URI creates a distinct tag, which takes a lot of memory for the metrics. ``` We mostly do not have routes that have path variables. BTW I configured the 100 upper limit for the URI tags as the docs recommend, so we should be good. -- 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-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org