OpenTelemetry Demo
Summary
This repo contains a environment for demonstrating OpenTelemetry tracing support in Promscale.
The Password Generator Service
A password generator service is instrumented with OpenTelemetry tracing. This is an absurd service and should not be taken as a shining example of architecture nor coding. It exists as a playground example to generate traces. The lower service generates random lowercase letters. The upper service service generates random uppercase letters. The digit service generates random digits, and the special service generates random special characters. There is a generator service which makes calls to the other services to compose a random password. Finally, there is a load script which continuously calls the generator service in order to simulate user load.
The lower service is a Ruby app using Sinatra framework while the other services use Python with Flask.
The Observability Infrastructure
All of the microservices forward their traces to an instance of the OpenTelemetry Collector. The collector sends the traces on to an instance of the Promscale Collector which stores them in a TimescaleDB database. An instance of the Jaeger UI is pointed to the Promscale instance, and an instance of Grafana is pointed at both Jaeger and the TimescaleDB database. In this way, you can use SQL to query the traces directly in the database, and visualize tracing data in Jaeger and Grafana dashboards.
Running the System
The system runs in docker, is configured via the docker compose file, and is operated with docker-compose. Run the following command from the root of the repo to (re)start the system.
docker-compose up --remove-orphans --build --detach
Once running, the following links will let you explore the various components of the system:
When you are ready to shutdown the system, use the following command.
docker-compose down
Connecting to TimescaleDB
You can use any SQL client that supports PostgreSQL to connect to the TimescaleDB database. The database is not password protected.
Use the psql client to connect to the Timescaledb instance via:
psql -h localhost -p 5999 -d otel_demo -U postgres
Examples
Note: the default Grafana login credentials are user "admin" and password "admin". Once you log in for the first time you will be asked to update your password.