Tutorial: Auto-instrumentation of a Java app by OpenTelemetry for K8s Environment

Tutorial: Auto-instrumentation of a Java app by OpenTelemetry for K8s Environment

This tutorial demonstrates how to auto-instrument a Java app by OpenTelemetry for Kuberenetes easily with the help of a sample Java app. It also shows how to connect it to the hosted collector, and trace the transactions in Sumo Logic. Learn the prerequisites and the detailed step-by-step auto-instrumentation process in this tutorial.

Reference Links:

  1. For more information on the built-in Roles and their Capabilities in Sumo Logic, visit the doc page:
  2. https://help.sumologic.com/Manage/Users-and-Roles/Manage-Roles/03-Create-and-Manage-Roles#built-in-administrator-and-analyst-roles
  3. For creating Access ID and Access Key, refer to the doc page:
  4. https://help.sumologic.com/Manage/Security/Access-Keys#manage-your-access-keys-on-preferences-page
  5. For the most recent format of the helm chart command, refer to the doc page:
  6. https://tinyurl.com/2p9ev2vb
  7. For more information on Setting up traces collection for Kubernetes environment, visit the doc page: https://help.sumologic.com/Traces/Getting_Started_with_Transaction_Tracing/Set_up_traces_collection_for_Kubernetes_environments
  8. For the appropriate endpoint URL of the installation, refer to the doc page:
  9. https://help.sumologic.com/Traces/Getting_Started_with_Transaction_Tracing/Set_up_traces_collection_for_Kubernetes_environments#pointing-tracing-client-to-the-collector

Links to refer to or download useful material to try the steps independently:

  1. About Spring PetClinic Sample Application: https://github.com/spring-petclinic/spring-framework-petclinic
  2. Download Dockerfile: https://github.com/SumoLogic/opentelemetry-petclinic/blob/main/Dockerfile
  3. Build your Java image (Docker image building process): https://docs.docker.com/language/java/build-images/
  4. For the ready-to-use docker image, use the link: public.ecr.aws/sumologic/opentelemetry-petclinic
  5. The latest OpenTelemetry-PetClinic image can be found in the AWS ECR gallery: https://gallery.ecr.aws/sumologic/opentelemetry-petclinic
  6. Download the.yaml template for the Spring PetClinic App: https://github.com/SumoLogic/opentelemetry-petclinic/blob/main/k8s-yaml/opentelemetry-petclinic.yaml