Add CPU & Memory Utilization to OpenTelemetry Spans at the Task Level
complete
H
Henna Abbas
Description:
Customers using the CircleCI OTel integration have access to spans for pipelines, workflows, jobs, tasks, and steps — but CPU and memory utilization data is not currently emitted at the task/executor level.
Without this, customers cannot build custom alerting to detect over- or under-provisioned executors, which is a key use case for teams looking to optimize resource usage and control compute costs.
Proposed solution:
Emit CPU and memory utilization as span attributes at the task/executor level. Suggested attribute names aligned with OTel semantic conventions:
- process.cpu.utilization
- system.memory.usage/system.memory.utilization
Impact:
- Enables executor right-sizing without requiring third-party agents or parallel jobs
- Supports custom alerting on resource anomalies directly from pipeline telemetry
- Strengthens CircleCI's OTel integration
H
Henna Abbas
marked this post as
complete
C
Conor McDermottroe
The following attributes are now attached to OTel spans relating to tasks (when resource usage data is available):
- com.circleci.resource.usage.cpu.max
- com.circleci.resource.usage.cpu.mean
- com.circleci.resource.usage.cpu.min
- com.circleci.resource.usage.cpu.p90
- com.circleci.resource.usage.memory.max
- com.circleci.resource.usage.memory.mean
- com.circleci.resource.usage.memory.min
- com.circleci.resource.usage.memory.p90
- com.circleci.resource.usage.network.bytes_received
- com.circleci.resource.usage.network.bytes_sent