In one of our spring-reactive projects, I exposed the default HTTP-Client metrices. This gives me some insider information about upstream. But, now I need a breakdown of the response time as we see in Postman. I would like to know if it is possible to expose it using the current implementation or through a third-party library.
Here I have attached a piece of code, through which I am exposing some WebClient attributes.
HttpClient client = HttpClient.create(ConnectionProvider.builder("fixed")
.maxConnections(700)
.maxIdleTime(Duration.ofMillis(config.getPoolMaxIdleTime()))
.maxLifeTime(Duration.ofMillis(config.getPoolMaxLifeTime()))
.metrics(true) //metrices exposed here
.build())
.option(ChannelOption.SO_TIMEOUT, config.getSocketTimeout())
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, config.getConnectionTimeout())
.doOnConnected(connection -> connection
.addHandler(new ReadTimeoutHandler(config.getReadTimeout(), TimeUnit.MILLISECONDS))
.addHandler(new WriteTimeoutHandler(config.getWriteTimeout(), TimeUnit.MILLISECONDS))
);
This is how Postman breakdown response time in their tool.
