Skip to content

apmartins85/otel-java-simple

Repository files navigation

otel-java-simple

Idea

The idea of this repository is :

  • Create a java application with auto-instrumentation. Based in java-simple
  • Deploy the application inside kubernetes cluster (I've choose k3d)
  • Deploy observability components (jaeger + prometheus + grafana + otel-collector)
  • Deploy opentelemetry demo

How to play

From the premise that you have a kubernetes cluster up and running, lets see how to get access in everyhing.

java-simple

  • Build locally
$ docker build --tag java-simple .
  • Deploy on k8s
$ kubectl create ns java-simple
$ kubens java-simple 
$ k apply -f kubernetes/deploy-app.yaml
  • Deploy otel-demo
$ kubectl create ns otel-collector
$ kubens otel-collector 
$ k apply -f kubernetes/deploy-otel-demo.yaml
  • Run

Expose the application:

$ k port-forward deploy/java-simple-deployment 8080 -n java-simple

Roll the dice via api:

$ curl http://localhost:8080/rolldice

grafana

  • Expose grafana
$ k port-forward deploy/opentelemetry-demo-grafana 3000 -n otel-collector

Access to grafana via browser:

http://localhost:3000/grafana/
  • Check metrics and trace

image

About

otel-java-simple

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published