Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As we want this metric to measure the time that the user takes to call poll() , we will store a long lastPollMs  in  in KafkaConsumer. We will calculate the elapsed time (and update lastPollMs) on every call to poll.

On each call to poll(), we will calculate the elapsed time since lastPollMs, record it in the Sensor which has Avg   & Max, and update lastPollMs .

...