Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CPU usage metrics #37

Merged
merged 1 commit into from
Aug 2, 2022
Merged

Fix CPU usage metrics #37

merged 1 commit into from
Aug 2, 2022

Conversation

SuperQ
Copy link
Contributor

@SuperQ SuperQ commented Jul 23, 2022

The CPU usage metrics from ECS are pass-through of Docker stats API.

  • Switch the API json struct to use upstream Docker types.
  • The API specifies the units are in nanoseconds, not jiffies.

Fixes: #34

Signed-off-by: SuperQ [email protected]

@SuperQ SuperQ requested review from rakyll and roidelapluie July 23, 2022 10:51
@SuperQ SuperQ force-pushed the superq/fix_jiffies branch 2 times, most recently from f86b04a to 2fe3f9a Compare July 23, 2022 10:54
The CPU usage metrics from ECS are pass-through of Docker stats API.
* Switch the API json struct to use upstream Docker types.
* The API specifies the units are in nanoseconds, not jiffies.

Fixes: #34

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ force-pushed the superq/fix_jiffies branch from 2fe3f9a to 6b84904 Compare July 23, 2022 12:02
@SuperQ SuperQ requested a review from sysadmind July 29, 2022 10:21
Copy link

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

It looks like that per CPU metric is linux only. I'm not sure if that matters in the context of this exporter, but ECS does seem to support Windows containers.

@jseiser
Copy link

jseiser commented Aug 1, 2022

@SuperQ

Any chance you can get this merged/built?

Thanks.

@SuperQ SuperQ merged commit d400207 into main Aug 2, 2022
@SuperQ SuperQ deleted the superq/fix_jiffies branch August 2, 2022 12:32
SuperQ added a commit that referenced this pull request Aug 2, 2022
* [BUGFIX] Fix CPU usage metrics #37

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Aug 2, 2022
SuperQ added a commit that referenced this pull request Aug 2, 2022
* [BUGFIX] Fix CPU usage metrics #37

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Aug 2, 2022
* [BUGFIX] Fix CPU usage metrics #37

Signed-off-by: SuperQ <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to treat ecs_cpu_seconds_total
4 participants