Having added the ability to comment on other people's posted images, it would be nice to start gathering metrics.
To do so, we can introduce metrics similar to those shown in Chapter 5, Developer Tools for Spring Boot Apps, as follows:
@Controller public class CommentController { private final RabbitTemplate rabbitTemplate; private final MeterRegistry meterRegistry; public CommentController(RabbitTemplate rabbitTemplate, MeterRegistry meterRegistry) { this.rabbitTemplate = rabbitTemplate; this.meterRegistry = meterRegistry; } @PostMapping("/comments") public Mono<String> addComment(Mono<Comment> newComment) { return newComment.flatMap(comment -> Mono.fromRunnable(() -> rabbitTemplate...