feat(observability): add OpenTelemetry process bootstrap

This commit is contained in:
Anish Sarkar 2026-05-21 23:01:54 +05:30
parent 60049936e3
commit eb2e2b253b
7 changed files with 413 additions and 21 deletions

View file

@ -37,6 +37,10 @@ def get_celery_session_maker() -> async_sessionmaker:
poolclass=NullPool,
echo=False,
)
with contextlib.suppress(Exception):
from app.observability.bootstrap import instrument_sqlalchemy_engine
instrument_sqlalchemy_engine(_celery_engine)
_celery_session_maker = async_sessionmaker(
_celery_engine, expire_on_commit=False
)