Let's use a practical example for OpenCensus tracing in an application. To get started, we need to make sure that we have Docker installed on our machine. You should be able to use the installation documents at https://docs.docker.com/ in order to be certain that Docker is installed and runs correctly on your machine. Once this is completed, we can get going with creating, implementing, and viewing a sample application. Once we have Docker installed, we can pull important images for our instrumentation. In our example, we will use Redis (a key–value store) to store key–value events in our application and Zipkin (a distributed tracing system) to view these traces.
Let's pull our dependencies for this project:
- Redis, which is a key–value store that we are going to use in our sample application: