Hypertrace is an open source distributed tracing and observability platform. It has numerous use-cases in the microservices world. Most of the infrastructure in the world runs on Linux, so you might want to try Hypertrace on a Linux machine and Ubuntu being the most popular distro, this blog will help you to get started quickly with Hypertrace on Ubuntu.
Let's go step-by-step and see how you can get Hypertrace up and running with Docker engine on Ubuntu. But even if you are using another Linux distro, you will follow similar steps. Specifically, I will be using Ubuntu 18.04 on Intel core i7 for this quick demo.
Make sure you have the latest Docker Engine and Docker Compose installed.
To get started with Hypertrace on Ubuntu you need to install the latest version of Docker Engine (at least 17.12.0+) and latest Docker Compose (at least 1.21.0+). You can check docker engine and docker compose versions like below:
ubuntu@ip-172-31-4-135:~$ docker --version Docker version 19.03.13, build 4484c46d9d
ubuntu@ip-172-31-4-135:~$ docker-compose --version docker-compose version 1.27.4, build 40524192
If you have both installed you can move to the next step. However, if you haven't then check out these Detailed installation instructions to install Docker Engine and Docker Compose which are available in the Docker documentation.
Once Docker is running, continue to the next step.
Check your Resources
To run Hypertrace and the sample app, you should allocate about 4 GB of memory and 4 CPUs (Docker considers a complete machine as a node so if your machine has more resources that minimum you should be good!). With a powerful CPU, you may be able to run on less, but we have found this to be a good tradeoff. Most modern machines should be able to meet these requirements.
Clone the Hypertrace repo
git clone https://github.com/hypertrace/hypertrace
Run Docker Compose
To pull the images required for Hypertrace, navigate to the Docker folder and run docker-compose pull as shown below
cd hypertrace/docker sudo docker-compose -f docker-compose.yml pull
Okay! Now that we have all of the images in place, let's start Hypertrace!
sudo docker-compose -f docker-compose.yml up
Once you see the message
started Hypertrace UI service on port 2020 as shown below. Visit http://localhost:2020 to view Hypertrace in action.
Sending traces from the sample app
Well, that was easy! Now let's send some traces so that we can see Hypertrace in action and explore its features! If your application is already instrumented to send traces to Zipkin or Jaeger, it will work with Hypertrace out of the box.
Even if you don't have an application instrumented you can get started quickly with our simple sample application. To run the sample app, open another terminal window and run
sudo docker-compose -f docker-compose-zipkin-example.yml up
Open your web browser to http://localhost:8081 and refresh the web page a few times to generate some sample requests. Now, go back to Hypertrace at http://localhost:2020 and click the Refresh button to see the traces and insights generated by your application using Hypertrace. It might take up to 10 seconds for your trace data to appear. But as they say, “Good things take time.”.
If you need a platform and UI overview and want to understand what information each section serves, you can read the platform and UI overview here.
In a nutshell,
You can run Hypertrace on Ubuntu (or almost any Linux distro) in 3 easy steps and start exploring it right away with your own instrumented application or our sample application!
- Install Docker Engine on Ubuntu: https://docs.docker.com/engine/install/ubuntu/
- Install Docker Compose on Ubuntu: https://docs.docker.com/compose/install/
|Jayesh is founding engineer at Traceable and he works on Hypertrace and Hypertrace community building. He loves reading and you can find him on twitter and linkedin to discuss anything around tech.|