Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 2.75 KB

framework-splunk_otel_java_agent.md

File metadata and controls

64 lines (46 loc) · 2.75 KB

Splunk Distribution of OpenTelemetry Java Instrumentation

This buildpack framework automatically instruments your Java application with the Splunk distribution of OpenTelemetry Java Instrumentation to send trace data to Splunk Observability Cloud.

Detection Criterion Existence of a bound service containing the string splunk-o11y
Tags splunk-otel-java-agent=<version>

The buildpack detect script prints tags to standard output.

User-Provided Service

Provide your own "user provided service" (cups) instance and bind it to your application.

The service name MUST contain the string splunk-o11y.

For example, to create a service named splunk-o11y that represents Observability Cloud realm us0 and represents a user environment named cf-demo, use the following commands:

$ cf cups splunk-o11y -p \
   '{"splunk.realm": "us0", "splunk.access.token": "<redacted>", "otel.resource.attributes": "deployment.environment=cf-demo"}'
$ cf bind-service myApp splunk-o11y
$ cf restage myApp

Provide the following values using the credential field of the service:

Name Required? Description
splunk.access.token Yes Splunk org access token.
splunk.realm Yes Splunk realm where data will be sent. This is commonly us0, eu0, and so on. See Available regions or realms for more information.
otel.* or splunk.* Optional All additional credentials starting with these prefixes are appended to the application's JVM arguments as system properties.

Choosing a version

To override the default and choose a specific version, use the JBP_CONFIG_* mechanism and set the JBP_CONFIG_SPLUNK_OTEL_JAVA_AGENT environment variable for your application.

For example, to use version 1.16.0 of the Splunk OpenTelemetry Java Instrumentation, run:

$ cf set-env testapp JBP_CONFIG_SPLUNK_OTEL_JAVA_AGENT '{version: 1.16.0}'

In most cases you can use the latest or default version of the agent available.

Additional Resources