Skip to content

Catchpoint Tracing examples for Java applications deploying to Kubernetes

License

Notifications You must be signed in to change notification settings

catchpoint/Tracing.examples-kubernetes-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catchpoint Tracing Examples - Kubernetes/Java

Pre-Requirements

  1. JDK (1.8+)
  2. Maven (3.x)
  3. Please make sure Docker Desktop is installed and Kubernetes is activated. Read this for details.
  4. Please make sure Kubernetes CLI (kubernetes-cli/kubectl) is installed. See here for details.

Setup with OpenTelemetry From the Beginning

This setup shows how you can install OpenTelemetry resources into Kubernetes first and deploy application later then. So deployed applications will be auto instrumented.

Setup OpenTelemetry Resources in Kubernetes

  1. Replace <CATCHPOINT-TRACING-API-KEY> with your Catchpoint Tracing API key in otel/collector.yaml file.
  2. Then run the setup script which installs OpenTelemetry Operator and OpenTelemetry Instrumentation CR (Custom Resource) into Kubernetes:
    ./otel/setup-otel.sh

Deploy the Applications into Kubernetes with OTEL

  1. Run the deployment script which deploys database and applications with OpenTelemetry configuration into Kubernetes:
    ./apps/deploy-apps-with-otel-conf.sh
  2. Wait until all services are activated.
  3. Go to http://localhost:30000.

Install OpenTelemetry After Setup

Deploy the Applications into Kubernetes without OTEL

  1. Run the deployment script which deploys database and applications without OpenTelemetry configuration into Kubernetes:
    ./apps/deploy-apps.sh
  2. Wait until all services are activated.
  3. Go to http://localhost:30000.

Setup OpenTelemetry Resources in Kubernetes

  1. Replace <CATCHPOINT-TRACING-API-KEY> with your Catchpoint Tracing API key in otel/collector.yaml file.
  2. Then run the setup script which installs OpenTelemetry Operator and OpenTelemetry Instrumentation CR (Custom Resource) into Kubernetes:
    ./otel/setup-otel.sh

Patch Services to be Traced by OpenTelemetry

  1. Run the patch script which updates application deployments by adding OpenTelemetry Auto Instrumentation Annotation (instrumentation.opentelemetry.io/inject-java) to the services to be traced:
    ./apps/patch-apps-with-otel-conf.sh
  2. Wait until all services are restarted.
  3. Go to http://localhost:30000.

Destroy

Destroy the Deployment of Applications

  1. Run the application destroy script which deletes applications and database deployed to Kubernetes:
    ./apps/destroy-apps.sh
  2. Wait until all resources are deleted.

Destroy the Resources of OpenTelemetry

  1. Run the OpenTelemetry destroy script for deleting the OpenTelemetry resources (operator and instrumentation CR),
    ./otel/destroy-otel.sh
  2. Wait until all resources are deleted.

About

Catchpoint Tracing examples for Java applications deploying to Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published