This is an OpenTelemetry example of a Python project.
This Python project uses
- FastAPI
- SQLAlchemy
make secret
make setup
docker compose up -d
make startAnd then you visit http://localhost:8000 and refresh a few times. Wait 5 seconds.
Finally you visit http://localhost:9090, you will see these metrics:
- http_server_duration_milliseconds_{bucket,count,sum}
- db_client_connections_usage
You will see that the metrics provided the open source instrumentation packages are not very good. You need to write your own instrumentation or metrics collection to collect useful metrics.
Follow the the commit history of the repository. The commits are organized in a way that are expected to be followed.