---
title: Go Runtime Metrics (OpenTelemetry)
description: Collect runtime metrics from your Go applications via OpenTelemetry.
breadcrumbs: Docs > Integrations > Go Runtime Metrics (OpenTelemetry)
---

# Go Runtime Metrics (OpenTelemetry)

{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #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{% #setup %}

See the dedicated documentation for [Go Runtime Metrics via OpenTelemetry](https://opentelemetry.io/docs/specs/semconv/runtime/go-metrics/).

### Opt-in Metrics{% #opt-in-metrics %}

The following metrics are opt-in and may require a newer or custom build of [`go.opentelemetry.io/contrib/instrumentation/runtime`](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/runtime):

- `go.memory.gc.cycles`
- `go.memory.gc.pause.duration`
- `go.cpu.time`

## Data Collected{% #data-collected %}

### Metrics{% #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{% #service-checks %}

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

### Events{% #events %}

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

## Support{% #support %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
