This repository provides a quick start example about how to use OpenTelemetry to enable observability features in web and batch applications using automatic and manual instrumentation.
- Python >= 3.10
- Docker >= 20.10
Clone this repository, change your personal working directory to it (cd <repo_path>
), then:
- Deploy OpenTelemetry Collector and Jaeger using Docker Compose:
docker compose -f services.yaml up -d
- Start the web server:
bash start-server.sh
There is a single endpoint available at /
that is going to execute some dummy functions that will leave their own trace.
After their execution, the web server will trigger one batch job. Their traces will be reported as an extension of the parent span.
You can trigger the endpoint via web browser opening http://localhost:9000/
or via CLI using cURL curl -X GET http://localhost:9000/
After you trigger the endpoint, access Jaeger UI via http://localhost:16686/search
then click Find Traces
button and finally click the top trace on the list [1].
You will see the traces of the services involved in the execution [2].
Close the web server clicking Ctrl + C
in the same console you used to started it. Finish the services execution using docker compose -f services.yaml down