title: How to use Micrometer Timer to record duration of async method (returns Mono or Flux)
body: <p>I'd like to use Micrometer to record the execution time of an async method when it eventually happens.  Is there a recommended way to do this?</p>
  
  <p>Example: Kafka Replying Template.  I want to record the time it takes to actually execute the sendAndReceive call (sends a message on a request topic and receives a response on a reply topic).</p>
  
  <pre><code>    public Mono&lt;String&gt; sendRequest(Mono&lt;String&gt; request) {
          return request
              .map(r -&gt; new ProducerRecord&lt;String, String&gt;(requestsTopic, r))
              .map(pr -&gt; {
                  pr.headers()
                          .add(new RecordHeader(KafkaHeaders.REPLY_TOPIC,
                                  "reply-topic".getBytes()));
                  return pr;
              })
              .map(pr -&gt; replyingKafkaTemplate.sendAndReceive(pr))
              ... // further maps, filters, etc.
  </code></pre>
  
  <p>Something like </p>
  
  <pre><code>responseGenerationTimer.record(() -&gt; replyingKafkaTemplate.sendAndReceive(pr)))
  </code></pre>
  
  <p>won't work here; it just records the time that it takes to create the <code>Supplier</code>, not the actual execution time.</p>