The Java Buildpack only supports a few properties to be set in the env keys that are passed to the agent, for example, to be able to enable Leakhunter and change its properties you must create an "offline buildpack". This document provides step by step instructions on modifying the Java Buildpack
APM Development is working on adding optional keys that can be passed in through the cf cups in future releases. In the meantime, you can use this process to customize your agent configuration in a CF environment.
$ git clone https://github.com/<your_github_username>/java-buildpack
- To add extra functionality to the buildpack, start by first forking the java buildpack into a separate Github repo.
Forking the buildpack can be done by visting the buildpack repo at
and clicking the “Fork” button near the top right corner.
Ensure that you are signed into Github, otherwise the fork operation cannot be completed.
- Once the buildpack is forked to your Github account, clone the repository to your local machine. The command is given below.
$ cd java-buildpack
- Once the repository is cloned to your local machine, edit the lib/java_buildpack/framework/introscope_agent.rb file.
Add a new method called leak_hunter, as shown below. This will be for the
Add another method called leak_sensitivity, as shown below. This
will be for the “introscope.agent.leakhunter.leakSensitivity” property.
- Once the above two methods are added, continue editing the same file as in step 3, but this time, edit the release method. Before the method ends call both of these methods in step 3, in the release method, as shown below.
- After completing step 4, you are finished with the coding portion. You must commit and push your changes with the command:
$ git commit -am “<message here>”
$ git push
- Next, edit your manifest.yml file by adding the key below:
- Deploy your agent to CloudFoundry, and when creating the service, pass the following keys
$ cf cups introscope -p “url, leak_hunter, leak_sensitivity”
url> Enter the agent manager URL here