<p>Can someone briefly explain what is the difference between <code>istio_request_bytes_count</code> and <code>istio_request_bytes_sum</code>?. And why is the &quot;istio_request_bytes&quot; standard metric is missing?</p>

<p><a href="https://istio.io/latest/docs/reference/config/metrics/" rel="nofollow noreferrer">Istio Standard Metrics</a> notes that <code>istio_request_bytes</code> is a <code>DISTRIBUTION</code> type metric.  In Prometheus, this would appear as a <a href="https://prometheus.io/docs/concepts/metric_types/#histogram" rel="nofollow noreferrer">histogram metric</a>.  So, you should see three metrics:</p>
<ul>
<li><code>istio_request_bytes_count</code> is the number of requests</li>
<li><code>istio_request_bytes_sum</code> is the total number of bytes, added together across all requests</li>
<li><code>istio_request_bytes_bucket{le=&quot;1024&quot;}</code> is the total number of requests where the request size is 1 KiB or smaller</li>
</ul>
<p>You can calculate the average request size by dividing the sum by the count.  You can also use Prometheus functions like <a href="https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile" rel="nofollow noreferrer"><code>histogram_quantile()</code></a> to calculate the median (50th-percentile) size.</p>
<p>This also applies to the other standard metrics.  A common thing to measure is 95th-percentile latency (&quot;p95&quot;); how long does it take 95% of the requests to execute, where the remaining 5% take longer than this?  <code>histogram_quantile(0.95, istio_request_duration_milliseconds_bucket[1h])</code> could compute this over the most recent hour.</p>
