fix: Add opentelemtry-based tracing

This adds tracing to fastapi, redis, and sqlalchemy. It uses the
recommended OLTP exporter to send the tracing data.
This commit is contained in:
Sven-Hendrik Haase 2024-08-03 13:20:04 +02:00
parent a54b6935a1
commit a2cbf01eef
No known key found for this signature in database
GPG key ID: 39E4B877E62EB915
6 changed files with 960 additions and 616 deletions

View file

@ -69,7 +69,6 @@ httpx = "^0.27.0"
itsdangerous = "^2.1.2"
lxml = "^5.2.1"
orjson = "^3.10.0"
protobuf = "^5.26.1"
pygit2 = "^1.14.1"
python-multipart = "^0.0.9"
redis = "^5.0.3"
@ -89,7 +88,6 @@ SQLAlchemy = "^1.4.52"
uvicorn = "^0.29.0"
gunicorn = "^21.2.0"
Hypercorn = "^0.16.0"
prometheus-fastapi-instrumentator = "^7.0.0"
pytest-xdist = "^3.5.0"
filelock = "^3.13.3"
posix-ipc = "^1.1.1"
@ -98,6 +96,15 @@ fastapi = "^0.110.0"
srcinfo = "^0.1.2"
tomlkit = "^0.12.0"
# Tracing
prometheus-fastapi-instrumentator = "^7.0.0"
opentelemetry-api = "^1.26.0"
opentelemetry-sdk = "^1.26.0"
opentelemetry-exporter-otlp-proto-http = "^1.26.0"
opentelemetry-instrumentation-fastapi = "^0.47b0"
opentelemetry-instrumentation-redis = "^0.47b0"
opentelemetry-instrumentation-sqlalchemy = "^0.47b0"
[tool.poetry.dev-dependencies]
coverage = "^7.4.4"
pytest = "^8.1.1"