---
title: Enable Dynamic Instrumentation for Go
description: >-
  Set up Dynamic Instrumentation for Go applications to add probes and capture
  data without code changes.
breadcrumbs: >-
  Docs > APM > Application Instrumentation > Dynamic Instrumentation > Enabling
  Dynamic Instrumentation > Enable Dynamic Instrumentation for Go
---

# Enable Dynamic Instrumentation for Go

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

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site). ().
{% /alert %}

{% /callout %}

{% callout %}
##### Limited Availability

Dynamic Instrumentation for Go is in Limited Availability and may not be available for your organization. Request access to join the waiting list.Note: Some limitations apply.

[Request Access](https://www.datadoghq.com/product-preview/live-debugger/)
{% /callout %}

Dynamic Instrumentation is a feature of the Datadog tracing library that lets you add instrumentation to your application at runtime without code changes or redeployments. Follow these instructions to set up Dynamic Instrumentation for Go.

## Prerequisites{% #prerequisites %}

Before you begin, review the [Dynamic Instrumentation prerequisites](https://docs.datadoghq.com/dynamic_instrumentation/#prerequisites). Go applications also require:

- [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest?platform=overview) version 7.73.0 or higher, running on the same host as your application.
- Go tracing library version 1.74.6 or higher (major version 1), or version 2.2.3 or higher (major version 2). See the [installation instructions](https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/go/) for setup details.
- Linux kernel version 5.17 or higher.

## Installation{% #installation %}

To use Dynamic Instrumentation, you must enable it in both the Datadog Agent and your application.

### Datadog Agent{% #datadog-agent %}

Enable Dynamic Instrumentation in the Agent configuration using one of the following methods, depending on how you deploy the Agent:

{% tab title="Configuration YAML file" %}
Update `system-probe.yaml` (located alongside `datadog.yaml`) with the following. For more information, see [Agent configuration files](https://docs.datadoghq.com/agent/configuration/agent-configuration-files/?tab=agentv6v7#agent-main-configuration-file).

```yaml
dynamic_instrumentation:
  enabled: true
```

{% /tab %}

{% tab title="Environment variable" %}
Add the following to your Datadog Agent manifest:

```
DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
```

{% /tab %}

{% tab title="Helm" %}
Add the following to your Helm chart:

```yaml
datadog:
  dynamicInstrumentationGo:
    enabled: true
```

{% /tab %}

### Application (tracing library){% #application-tracing-library %}

1. Run your service with Dynamic Instrumentation enabled by setting the following environment variable:

   ```
   DD_DYNAMIC_INSTRUMENTATION_ENABLED=true
   ```

1. Configure [Unified Service Tags](https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/?tab=kubernetes) so that you can filter and group your instrumentations and target active clients across these dimensions:

   - `DD_SERVICE`
   - `DD_ENV`
   - `DD_VERSION`

1. Restart your service.

1. After the service starts, you can add and manage instrumentations from the [**APM** > **Live Debugger**](https://app.datadoghq.com/debugging) page.

## What to do next{% #what-to-do-next %}

See the [Live Debugger documentation](https://docs.datadoghq.com/tracing/live_debugger/) for information about adding instrumentations, capturing application state, and browsing and indexing the collected data.

## Supported features{% #supported-features %}

- Adding probes for method calls, returns, and specific code lines
- Symbol search for probe location selection
- Capturing variables and return values available at the selected probe location
- [Sensitive data redaction](https://docs.datadoghq.com/dynamic_instrumentation/sensitive-data-scrubbing/#redact-based-on-variable-values-with-sensitive-data-scanner)
- [Source code integration](https://docs.datadoghq.com/integrations/guide/source-code-integration/?tab=go#embed-git-information-in-your-build-artifacts)

## Unsupported features{% #unsupported-features %}

- Dynamic Instrumentation for logs, metrics, spans, and span tag probes
- Log templates and condition expressions
- PII redaction based on specific classes or types
- Propagation of additional `DD_TAGS` set on the service to probe result tags
- Environments where eBPF is unavailable, including many serverless platforms such as AWS Lambda and AWS Fargate

## Further reading{% #further-reading %}

- [Getting Started with Datadog Agent](https://docs.datadoghq.com/agent)
