INNER CODE UNIT · Python

_setup_langsmith_tracing

skygazer42/MimirQ · app/main.py:258

def _setup_langsmith_tracing() -> None:
    if not bool(getattr(settings, "LANGSMITH_TRACING_ENABLED", False)):
        return
    try:
        from app.rag.tracing import setup_tracing

        setup_tracing()
    except Exception as exc:  # noqa: BLE001
        logger.warning("Failed to setup LangSmith tracing: %s", str(exc)[:200])


def _initialize_database_for_startup() -> None:
    runtime_migrations_enabled = bool(getattr(settings, "DB_RUNTIME_MIGRATIONS_ENABLED", True))
    create_all_enabled = bool(getattr(settings, "DB_CREATE_ALL_ON_STARTUP", True))

    if runtime_migrations_enabled:
        apply_runtime_migrations(engine)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…