Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
50 lines (36 loc) · 2.2 KB

File metadata and controls

50 lines (36 loc) · 2.2 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

OpenTelemetry Javaagent

The OpenTelemetry Javaagent buildpack framework will cause an application to be automatically instrumented with the OpenTelemetry Javaagent Instrumentation.

Data will be sent directly to the OpenTelemetry Collector.

Detection Criterion Existence of a bound service containing the string otel-collector
Tags opentelemetry-javaagent=<version>

Tags are printed to standard output by the buildpack detect script

User-Provided Service

Users are currently expected to create-user-provided-service (cups) of the collector and bind it to their application. The service MUST contain the string otel-collector.

For example, to create a service named otel-collector that represents an environment named cf-demo, you could use the following commands:

$ cf cups otel-collector -p '{"otel.exporter.otlp.endpoint" : "https://my-collector-endpoint", "otel.exporter.otlp.headers" : "authorization=Basic SOMEBAS64STRING","otel.exporter.otlp.protocol" : "grpc", "otel.traces.exporter" : "otlp", "otel.metrics.exporter" : "otlp", "otel.resource.attributes": "deployment.environment=cf-demo"}'
$ cf bind-service myApp otel-collector
$ cf restage myApp

Additional configuration options for the Agent can be found here

Choosing a version

Most users should skip this and simply use the latest version of the agent available (the default). To override the default and choose a specific version, you can use the JBP_CONFIG_* mechanism and set the JBP_CONFIG_OPENTELEMETRY_JAVAAGENT environment variable for your application.

For example, to use version 1.27.0 of the OpenTelemetry Javaagent Instrumentation, you could run:

$ cf set-env testapp JBP_CONFIG_OPENTELEMETRY_JAVAAGENT '{version: 1.27.0}'

Additional Resources

Morty Proxy This is a proxified and sanitized view of the page, visit original site.