gcr.io/paketo-buildpacks/google-stackdriver
The Paketo Buildpack for Google Stackdriver is a Cloud Native Buildpack that contributes Stackdriver agents and configures them to connect to the service.
Behavior
This buildpack will participate if any of the following conditions are met
- A binding exists with
typeofStackdriverDebugger - A binding exists with
typeofStackdriverProfiler
The buildpack will do the following for Java applications:
- If
StackdriverDebuggerbinding exists contributes a Java debugger agent to a layer and configures$JAVA_TOOL_OPTIONSto use it - If
StackdriverProfilerbinding exists contributes a Java profiler agent to a layer and configures$JAVA_TOOL_OPTIONSto use it - Sets
$GOOGLE_APPLICATION_CREDENTIALSto the path of theApplicationCredentialssecret
The buildpack will do the following for NodeJS applications:
- If
StackdriverDebuggerbinding exists- Contributes a NodeJS debugger agent to a layer and configures
$NODE_MODULESto use it - If main module does not already require
@google-cloud/debug-agentmodule, prepends the main module withrequire('@google-cloud/debug-agent').start();
- Contributes a NodeJS debugger agent to a layer and configures
- If
StackdriverProfilerbinding exists- Contributes a NodeJS profiler agent to a layer and configures
$NODE_MODULESto use it - If main module does not already require
@google-cloud/profilermodule, prepends the main module withrequire('@google-cloud/profiler').start();
- Contributes a NodeJS profiler agent to a layer and configures
- Sets
$GOOGLE_APPLICATION_CREDENTIALSto the path of theApplicationCredentialssecret
Configuration
| Environment Variable | Description |
|---|---|
$BPL_GOOGLE_STACKDRIVER_MODULE |
Configure the name of the application. Defaults to default-module. |
$BPL_GOOGLE_STACKDRIVER_PROJECT_ID |
Configure the project id for the application. Defaults to <EMPTY>. |
$BPL_GOOGLE_STACKDRIVER_VERSION |
Configure the version of the application. Defaults to <EMPTY>. |
Bindings
The buildpack optionally accepts the following bindings:
Type: dependency-mapping
| Key | Value | Description |
|---|---|---|
<dependency-digest> |
<uri> |
If needed, the buildpack will fetch the dependency with digest <dependency-digest> from <uri> |
License
This buildpack is released under version 2.0 of the Apache License.