import asyncio from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor from common.db import engine from common.logging_config import configure_logging from common.metrics import observe_db_pools, observe_stream_lag from common.telemetry import setup_telemetry from . import consumer configure_logging("audit") setup_telemetry(service_name="audit") SQLAlchemyInstrumentor().instrument(engines=[engine.sync_engine]) observe_db_pools({"default": engine}) observe_stream_lag(consumer.GROUP) if __name__ == "__main__": asyncio.run(consumer.run())