# Metrics discrepancy

**URL:** <https://community.dynatrace.com/t/metrics-discrepancy/47829>\
**Category:** Container platforms\
**Tags:** kubernetes\
**Created:** [September 19, 2024, 9:39am UTC](https://community.dynatrace.com/t/metrics-discrepancy/47829 "2024-09-19T09:39:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gibilisco](https://avatars.discourse-cdn.com/v4/letter/g/ad7895/32.png) [@Gibilisco](https://community.dynatrace.com/u/Gibilisco)\
**Post date:** [September 19, 2024, 9:39am UTC](https://community.dynatrace.com/t/metrics-discrepancy/47829/1 "2024-09-19T09:39:11Z")

</div>

Hi,

I’ve noticed that the following two metrics have some discrepancies. The first one is the CPU usage of all the containers `builtin:containers.cpu.usageMilliCores` of a workload summed up. It’s the default query used in the workload dashboard.

The latter one is the cpu\_used metric `builtin:kubernetes.workload.cpu_usage` directly defined on the workload.

There are two strange behaviors:  
&nbsp;- The time series are almost equal (but almost)

- The latter one seems shifted 1 minutes ahead.

 ![Gibilisco_0-1726738542739.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/3/e3b548bb34eb23ee7fb42f65e08b5d39e4a4a639.png)

What might be the cause?&nbsp;  
This example is taken from a deployment with 4 pods, there might be more complex cases in which the difference is more significant.

---

<div class="post-metadata">

**Author:** ![p\_devulapalli](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p_devulapalli/32/41590_2.png) [@p\_devulapalli](https://community.dynatrace.com/u/p_devulapalli)\
**Post date:** [September 20, 2024, 12:30am UTC](https://community.dynatrace.com/t/metrics-discrepancy/47829/2 "2024-09-20T00:30:31Z")

</div>

I think the difference between the two metrics is to do with the scope&nbsp;containers.cpu.usageMilliCores is specific to individual container CPU usage and kubernetes.workload.cpu\_usage provides aggregate of CPU usage of all containers/pods within a specific Kubernetes workload.

A workload might contain a single container or multiple containers/pods, in your case how many containers do you have part of the workload you are trying to compare the CPU util?
