title: Kafka Network Metrics using Metric API
body: <p>Is there any way to get the Request total time from <code>kafka.network:type=RequestMetrics,name=TotalTimeMs,request={Produce|FetchConsumer|FetchFollower}</code> using the Metrics java API?</p>
  
  <p>Using the below code, I am able to get the producer Metric.</p>
  
  <pre><code>for (Entry&lt;MetricName, ? extends Metric&gt; entry : producer.metrics().entrySet()) {
      System.out.println(entry.getKey().name() + " : " + entry.getValue().metricValue());
  }
  </code></pre>
  
  <p>But I am not sure how to get the TotalTimeMs metric.
  Can anybody point how to get the same?</p>