- Clone this repo.
- Bring up the local dev stack with
docker compose up
from inside this directory. - Download the OpenTelemetry javaagent JAR and move it somewhere where it can be read by your app at runtime.
- Start your JVM app with the following environment variables defined:
JAVA_TOOL_OPTIONS=-javaagent:/path/to/javaagent/jar/from/prior/step/opentelemetry-javaagent.jar
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=name_of_your_app
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=local
- Explore your traces via the Jaeger UI on http://localhost:16686/
Note: depending on your platform you may need to use host.docker.internal
instead of localhost
to access the local Jaeger and OTel Collector instances.