Status | |
---|---|
Stability | development |
Distributions | contrib |
Issues | |
Code Owners | @mx-psi, @rogercoll |
The OpenTelemetry Cgroup Auto-Config Extension is designed to optimize Go runtime performance in containerized environments by automatically configuring GOMAXPROCS and GOMEMLIMIT based on the Linux cgroup filesystem. This extension leverages automaxprocs or gomaxecs for AWS ECS Tasks and automemlimit packages to dynamically adjust Go runtime variables, ensuring efficient resource usage aligned with container limits.
The following settings can be configured:
-
gomaxprocs
: Configures the behavior of settingGOMAXPROCS
, the maximum number of CPUs for Go runtime. Options:enabled
: A boolean value to enable or disable automatic configuration ofGOMAXPROCS
based on the system’s cgroup settings (default: true).
-
gomemlimit
: Configures the behavior of settingGOMEMLIMIT
, the maximum memory limit for Go runtime. Options:enabled
: A boolean value to enable or disable automatic configuration ofGOMEMLIMIT
(default: true).ratio
: A floating-point value between 0 and 1 that represents the fraction of the detected memory limit to allocate for the Go runtime (default: 0.9).
extension:
# processor name: cgroupruntime
cgroupruntime:
gomaxprocs:
enabled: true
gomemlimit:
enabled: true
ratio: 0.8
See CONTRIBUTING.md for information on how to contribute to this extension.