Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.92 KB

File metadata and controls

49 lines (33 loc) · 1.92 KB

Splunk Distribution of OpenTelemetry Java Buildpack

A CloudFoundry buildpack to install and run the Splunk Distribution of the OpenTelemetry Java agent in CloudFoundry apps.

🚧 This project is currently in BETA. It is officially supported by Splunk. However, breaking changes MAY be introduced.

Installation

To build and install the buildpack without using the tile you need to have cfcli installed.

If you would like to install the buildpack, clone this repo, change to this directory, then run:

$ ./build.sh

# installs the buildpack on CloudFoundry
$ cf create-buildpack splunk_otel_java_buildpack splunk_otel_java_buildpack-linux.zip 99

Now you can use the buildpack when running your apps:

# app configuration
$ cf set-env my-app OTEL_RESOURCE_ATTRIBUTES "service.name=<application name>"
# ...

# java_buildpack is the main buildpack for JVM apps, it needs to be the final one
$ cf push my-app -b splunk_otel_java_buildpack -b https://github.com/cloudfoundry/java-buildpack

Configuration

Please read the Getting Started to learn how to configure the Splunk Distribution of OpenTelemetry Java. All javaagent configuration options there are supported by this buildpack.

If you want to use a specific version of the Java agent in your application, you can set the SPLUNK_OTEL_JAVA_VERSION environment variable before application deployment, either using cf set-env or the manifest.yml file:

$ cf set-env SPLUNK_OTEL_JAVA_VERSION 2.21.1

By default, the latest available agent version is used.

Note: the latest version won't use the buildpack cache, so if you want your deployments to be a bit quicker you may want to specify a concrete version.