The Paketo Buildpack for New Relic is a Cloud Native Buildpack that contributes the New Relic Agent and configures it to connect to the service.
This buildpack will participate if all the following conditions are met
- A binding exists with
typeofNewRelic
The buildpack will do the following for Java applications:
- Contributes a Java agent to a layer and configures
$JAVA_TOOL_OPTIONSto use it- Contributes a default
newrelic.yml
- Contributes a default
- Contribute extensions if available
- Transforms the contents of the binding secret to environment variables with the pattern
NEW_RELIC_<KEY>=<VALUE>
The buildpack will do the following for PHP applications:
- Contributes a PHP agent to a layer and configures
$PHP_INI_SCAN_DIRto use it - Transforms the contents of the binding secret to environment variables with the pattern
NEW_RELIC_<KEY>=<VALUE>
The buildpack will do the following for Python applications:
- Copies configuration file in
${buildpack}/resources/newrelic.inito the root folder of your application. - You may override this file by including a
newrelic.inifile at the root of your application. - You will need to install the New Relic Python Agent, you can do this by adding New Relic as requirement in
requirements.txtat the root of your application.
The buildpack will do the following for Dotnet (.NET) Core applications:
- Contributes a Dotnet agent to a layer and configures
$CORECLR_NEWRELIC_HOME&$CORECLR_PROFILER_PATHto use it - You can override the default global
newrelic.configfile with an app-local file containing custom configuration. See the new-relic docs for config precedence information. - Transforms the contents of the binding secret to environment variables with the pattern
NEW_RELIC_<KEY>=<VALUE>
| Environment Variable | Description |
|---|---|
$BP_NEW_RELIC_EXT_SHA256 |
Configure the SHA256 hash of the New Relic extensions archive |
$BP_NEW_RELIC_EXT_STRIP |
Configure the number of directory components to strip from the New Relic extensions archive. Defaults to 0. |
$BP_NEW_RELIC_EXT_URI |
Configure the download location of the New Relic extensions |
$BP_NEW_RELIC_EXT_VERSION |
Configure the version of the New Relic extensions |
The buildpack optionally accepts the following bindings:
| Key | Value | Description |
|---|---|---|
<dependency-digest> |
<uri> |
If needed, the buildpack will fetch the dependency with digest <dependency-digest> from <uri> |
This buildpack is released under version 2.0 of the Apache License.