---
title: "Java APM with Heroku"
slug: "java-apm-with-heroku"
updated: 2020-08-10T21:06:54Z
published: 2020-08-10T21:06:54Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Java APM with Heroku

This document details how to install the **Java APM Profiler** in your **Java** application running on **Heroku**.

## Java Application Setup

### Configure Application

- Download Profiler at: **[https://download.stackify.com/stackify-java-apm/stackify-java-apm.jar](https://download.stackify.com/stackify-java-apm/stackify-java-apm.jar)**
- Add profiler JAR to heroku project root directory.
- Adjust **ProcFile** to include the profiler w/ the `-javaagent` option:

```
web: java -javaagent:./stackify-java-apm.jar -jar your_application.jar
```

### Add Buildpack

```
heroku buildpacks:add -i=1 https://github.com/stackify/heroku-buildpack-stackify.git
```

### Configure Buildpack

```
heroku config:set STACKIFY_KEY="XXXXXXXXXX"
heroku config:set STACKIFY_APPLICATION_NAME="My Application" 
heroku config:set STACKIFY_ENVIRONMENT_NAME="Production"
```

Set `STACKIFY_KEY` to your **Stackify Activation Key**.

## Verify

Deploy changes to Heroku and make requests. You can then verify results in the Retrace dashboard.
