Skip to content

zettaRepo/otel-with-java

 
 

Repository files navigation

OpenTelemetry in Java with Elastic APM

This project showcase how to instrument a microservice written in Java using OpenTelemetry, to produce telemetry data (traces and metrics) to Elastic APM.

Run with the collector

Using this model, the Java application sends the traces and metrics to a collector that forwards them to Elastic APM.

docker compose -f run-with-collector.yaml up -d

Run without the collector

Using this model, the Java application sends the traces and metrics directly to Elastic APM.

docker compose -f run-without-collector.yaml up -d

Accessing Elastic APM

After executing the services you can reach the Elastic APM application in the following URL:

http://localhost:5601/app/apm

Manually executing the Java application

Once everything is running there will periodic requests being sent to the microservice so you don't need to issue any requests by yourself. However, if you want to do it anyway just execute:

curl -X GET http://localhost:8888/hello

License

This project is licensed under the Apache 2.0 License.

About

OpenTelemetry in Java with Elastic APM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 84.4%
  • Shell 9.1%
  • Dockerfile 6.5%