The JProfiler Profiler Framework contributes JProfiler configuration to the application at runtime.
| Detection Criterion | enabled set via JBP_CONFIG_JPROFILER_PROFILER |
| Tags | jprofiler-profiler=<version> |
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to Configuration and Extension.
The framework can be configured by setting the JBP_CONFIG_JPROFILER_PROFILER environment variable. The value must be valid inline YAML.
| Name | Description |
|---|---|
enabled |
Whether to enable the JProfiler Profiler. Defaults to false. |
port |
The port that the JProfiler Profiler will listen on. Defaults to 8849. |
nowait |
Whether to start the process without waiting for JProfiler to connect first. Defaults to true. |
Enable JProfiler on the default port:
JBP_CONFIG_JPROFILER_PROFILER: '{enabled: true}'Enable JProfiler on a custom port, waiting for connection:
JBP_CONFIG_JPROFILER_PROFILER: '{enabled: true, port: 9000, nowait: false}'After starting an application with the JProfiler Profiler enabled, an SSH tunnel must be created to the container. To create that SSH container, execute the following command:
$ cf ssh -N -T -L <LOCAL_PORT>:localhost:<REMOTE_PORT> <APPLICATION_NAME>The REMOTE_PORT should match the port configuration for the application (8849 by default). The LOCAL_PORT can be any open port on your computer, but typically matches the REMOTE_PORT where possible.
Once the SSH tunnel has been created, your JProfiler Profiler should connect to localhost:<LOCAL_PORT> for debugging.
