use of io.micrometer.api.instrument.config.MeterFilter in project reactor-netty by reactor.
the class Application method main.
public static void main(String[] args) {
// <1>
Metrics.globalRegistry.config().meterFilter(MeterFilter.maximumAllowableTags("reactor.netty.http.server", "URI", 100, MeterFilter.deny()));
DisposableServer server = HttpServer.create().metrics(true, s -> {
if (s.startsWith("/stream/")) {
// <2>
return "/stream/{n}";
} else if (s.startsWith("/bytes/")) {
return "/bytes/{n}";
}
return s;
}).route(r -> r.get("/stream/{n}", (req, res) -> res.sendString(Mono.just(req.param("n")))).get("/bytes/{n}", (req, res) -> res.sendString(Mono.just(req.param("n"))))).bindNow();
server.onDispose().block();
}
Aggregations