For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/integrations/otel-go-runtime-metrics.md. A documentation index is available at /llms.txt.

Go Runtime Metrics (OpenTelemetry)

To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.

Overview

The Go OpenTelemetry integration allows you to collect runtime metrics from your Go applications instrumented with OpenTelemetry, covering the metrics defined in the Go runtime semantic conventions.

Setup

See the dedicated documentation for Go Runtime Metrics via OpenTelemetry.

Opt-in Metrics

The following metrics are opt-in and may require a newer or custom build of go.opentelemetry.io/contrib/instrumentation/runtime:

  • go.memory.gc.cycles
  • go.memory.gc.pause.duration
  • go.cpu.time

Data Collected

Metrics

go.goroutine.count
(gauge)
Count of live goroutines.
Shown as thread
go.processor.limit
(gauge)
The number of OS threads that can execute user-level Go code simultaneously (GOMAXPROCS).
Shown as resource
go.config.gogc
(gauge)
Heap size target percentage configured by the user (GOGC).
Shown as percent
go.memory.used
(gauge)
Memory used by the Go runtime.
Shown as byte
go.memory.limit
(gauge)
Go runtime memory limit configured by the user (GOMEMLIMIT).
Shown as byte
go.memory.allocated
(count)
Memory allocated to the heap by the application.
Shown as byte
go.memory.allocations
(count)
Count of allocations to the heap by the application.
Shown as object
go.memory.gc.goal
(gauge)
Heap size target for the end of the GC cycle.
Shown as byte
go.memory.gc.cycles
(count)
Count of completed garbage collection cycles.
Shown as occurrence
go.memory.gc.pause.duration
(gauge)
Time taken for stop-the-world pauses during garbage collection.
Shown as second
go.schedule.duration
(gauge)
The time goroutines spend in the scheduler waiting to be run.
Shown as second
go.cpu.time
(count)
Accumulated CPU time spent by this process.
Shown as second

Service Checks

The Go Runtime Metrics (OpenTelemetry) integration does not include any service checks.

Events

The Go Runtime Metrics (OpenTelemetry) integration does not include any events.

Support

Need help? Contact Datadog support.