---
title: Enabling the Profiler for GraalVM Native Image
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Continuous Profiler > Enabling the Profiler > Enabling the Profiler for
  GraalVM Native Image
---

# Enabling the Profiler for GraalVM Native Image

{% alert level="warning" %}
Datadog Profiler support for GraalVM native-image is in Preview. Datadog recommends evaluating the profiler in a non-sensitive environment before deploying in production.
{% /alert %}

This page describes how to enable profiling for applications compiled as GraalVM native images. For standard JVM applications, see [Enabling the Java Profiler](https://docs.datadoghq.com/profiler/enabling/java.md).

## Requirements{% #requirements %}

For a summary of the minimum and recommended runtime and tracer versions across all languages, read [Supported Language and Tracer Versions](https://docs.datadoghq.com/profiler/enabling/supported_versions.md).

{% dl %}

{% dt %}
Minimum version
{% /dt %}

{% dd %}
GraalVM 17+
{% /dd %}

{% dt %}
Supported platforms
{% /dt %}

{% dd %}
Linux, Windows, macOS
{% /dd %}

{% dt %}
Available profile types
{% /dt %}

{% dd %}
CPU, Allocations
{% /dd %}

{% /dl %}

## Installation{% #installation %}

### 1. Build your native image with the Datadog tracer

Follow the [Tracer Setup Instructions](https://docs.datadoghq.com/tracing/trace_collection/compatibility/java.md?tab=graalvm#setup) to build your GraalVM native image with the Datadog Java Profiler instrumentation.

### 2. Run with profiling enabled

After the service binary is built, enable the profiler using environment variables:

```shell
export DD_SERVICE=<YOUR_SERVICE>
export DD_ENV=<YOUR_ENV>
export DD_VERSION=<YOUR_VERSION>
export DD_PROFILING_ENABLED=true
export DD_PROFILING_DIRECTALLOCATION_ENABLED=true
./my_service
```

### 3. Verify profiles are collected

After a couple of minutes, your profiles appear on the [Datadog APM > Profiler page](https://app.datadoghq.com/profiling).

## Configuration{% #configuration %}

In addition to the environment, service, and version variables shown in the installation steps, you can apply custom tags to uploaded profiles with `DD_TAGS` (a comma-separated list of `<key>:<value>` pairs such as `layer:api, team:intake`).

For profile type configuration options, see the [Configuration reference](https://docs.datadoghq.com/profiler/profiler_troubleshooting/java.md#configuration-reference) in the Java profiler troubleshooting guide.

## Limitations{% #limitations %}

- Only JFR-based profiling is supported for GraalVM native-image applications.
- Wallclock and live heap profiling are not available.

## Not sure what to do next?{% #not-sure-what-to-do-next %}

The [Getting Started with Profiler](https://docs.datadoghq.com/getting_started/profiler.md) guide takes a sample service with a performance problem and shows you how to use Continuous Profiler to understand and fix the problem.

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

- [Getting Started with Profiler](https://docs.datadoghq.com/getting_started/profiler.md)
- [Learn more about available profile visualizations](https://docs.datadoghq.com/profiler/profile_visualizations.md)
- [Fix problems you encounter while using the profiler](https://docs.datadoghq.com/profiler/profiler_troubleshooting/java.md)
