Skip to content

Metric collector v2#286

Open
reggeenr wants to merge 18 commits intomainfrom
metric-collector-v2
Open

Metric collector v2#286
reggeenr wants to merge 18 commits intomainfrom
metric-collector-v2

Conversation

@reggeenr
Copy link
Collaborator

@reggeenr reggeenr commented Feb 13, 2026

This PR enables resource metric integration within Code Engine by running a metrics-collector that emits CPU, and memory usage metrics to IBM Cloud Logs.

Furthermore, this PR contains a dashboard that can be imported into IBM Cloud Monitoring:
monitoring-dashboard-ce-component-resources

On top, this PR demonstrates a away on how Code Engine jobs and apps can emit custom metrics, which are sent to Sysdig

See Readme for further details: https://github.com/IBM/CodeEngine/blob/metric-collector-v2/metrics-collector/README.md

@reggeenr reggeenr requested a review from norman465 March 2, 2026 23:32
- `au-syd` - Australia (Sydney)
- `jp-osa` - Japan (Osaka)
- `ca-tor` - Canada (Toronto)
- `br-sao` - Brazil (São Paulo)
Copy link
Member

Choose a reason for hiding this comment

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

eu-es?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for spotting.

Comment on lines +410 to +411
cpuCurrent := podMetric.Containers[0].Usage.Cpu().ToDec().AsApproximateFloat64() * 1000
memoryCurrent := podMetric.Containers[0].Usage.Memory().ToDec().AsApproximateFloat64() / 1000 / 1000
Copy link
Member

Choose a reason for hiding this comment

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

Is Containers[0] guaranteed to be the right container?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. For apps, jobs yes!
For builds it seems that the larger container appears in the list as the first container.

I will double-check.

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.

2 participants