Setup Tracing with OpenTelemetry and Jaeger - OpenIdentityPlatform/OpenAM GitHub Wiki

Preconditions

Download the OpenTelemetry agent file opentelemetry-javaagent.jar by link https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest each OpenAM и OpenIG host

If Jaeger is not installed it can be run as a Docker container:

docker run -d --name jaeger \
  -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
  -e COLLECTOR_OTLP_ENABLED=true \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 14250:14250 \
  -p 14268:14268 \
  -p 14269:14269 \
  -p 9411:9411 \
  jaegertracing/all-in-one:1.43

OpenAM

Set environment variables

Variable Example Description
OTEL_TRACES_EXPORTER jaeger An exporter of traces
OTEL_SERVICE_NAME openam Service name for monitoring
OTEL_EXPORTER_JAEGER_TIMEOUT 10000 Jaeger connection timeout in milliseconds
OTEL_EXPORTER_JAEGER_ENDPOINT http://localhost:14250 gRPC Jaeger URL endpoint
JAVA_TOOL_OPTIONS -javaagent:/path/to/opentelemetry-javaagent.jar Path to OpenTelemetry Java agent

Restart OpenAM instance

OpenIG

Set environment variables

Variable Example Description
OTEL_TRACES_EXPORTER jaeger An exporter of traces
OTEL_SERVICE_NAME openig Service name for monitoring
OTEL_EXPORTER_JAEGER_TIMEOUT 10000 Jaeger connection timeout in milliseconds
OTEL_EXPORTER_JAEGER_ENDPOINT http://localhost:14250 gRPC Jaeger URL endpoint
JAVA_TOOL_OPTIONS -javaagent:/path/to/opentelemetry-javaagent.jar Path to OpenTelemetry Java agent

Restart OpenIG instance