Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Java SDK OpenTracing and OpenTelemetry Sample

This sample shows the Temporal Java SDK OpenTracing support. It shows how to set up OpenTracing, as well as OpenTelemetry. The sample uses the CNCF Jaeger distributed tracing platform.

Run the sample

Note, it is assumed that you have Temporal Server set up and running using Docker Compose. For more information on how to do this see the main readme.

  1. Start Jaeger via Docker:
docker run -d -p 5775:5775/udp -p 14250:14250 -p 16686:16686 -p 14268:14268 jaegertracing/all-in-one:latest

This starts Jaeger with udp port 5775 and grpc port 14250. Note that if these ports are different in your setup to reflect the changes in JagerUtils.

  1. Start the Worker:
  • For OpenTelemetry:
./gradlew -q execute -PmainClass=io.temporal.samples.opentracing.TracingWorker
  • For OpenTracing:
./gradlew -q execute -PmainClass=io.temporal.samples.opentracing.TracingWorker --args="OpenTracing"
  1. Start the Starter
  • For OpenTelemetry
./gradlew -q execute -PmainClass=io.temporal.samples.opentracing.Starter
  • For OpenTracing
./gradlew -q execute -PmainClass=io.temporal.samples.opentracing.Starter --args="OpenTracing"
  1. Go to your Jaeger UI on http://127.0.0.1:16686/search

  2. In the "Service" section select either "temporal-sample-opentelemetry" or "temporal-sample-opentracing", depending on your starting options.

  3. Check out the Operation dropdown to see all the different operations available

  4. In the Tags search input you can tag a specific workflow id, for example:

workflowId=tracingWorkflow
  1. Click on "Find Traces" in the Jager UI and see all look at all the spans info