Files

20 lines
572 B
Python
Raw Permalink Normal View History

import asyncio
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
from common.db import engine
from common.logging_config import configure_logging
2026-10-19 16:05:40 +03:30
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])
2026-10-19 16:05:40 +03:30
observe_db_pools({"default": engine})
observe_stream_lag(consumer.GROUP)
if __name__ == "__main__":
asyncio.run(consumer.run())