mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-17 07:17:18 +00:00
feat(telemetry): add isolated beta quality diagnostics and release identity
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from langbot.pkg.telemetry import diagnostics
|
||||
|
||||
import datetime
|
||||
import enum
|
||||
import sqlite3
|
||||
@@ -153,6 +155,7 @@ class PersistenceManager:
|
||||
default=None,
|
||||
)
|
||||
|
||||
@diagnostics.observe('lifecycle', 'persistence.initialize', source='startup', stage='execute')
|
||||
async def initialize(self):
|
||||
database_type = self.ap.instance_config.data.get('database', {}).get('use', 'sqlite')
|
||||
self.ap.logger.info(f'Initializing database type: {database_type}...')
|
||||
@@ -1648,6 +1651,7 @@ class PersistenceManager:
|
||||
|
||||
# =================================
|
||||
|
||||
@diagnostics.observe('lifecycle', 'persistence.run_alembic_migrations', source='startup', stage='execute')
|
||||
async def _run_alembic_migrations(self, target_revision: str = 'head'):
|
||||
"""Run the supported Alembic-based 4.x migrations."""
|
||||
from . import alembic_runner
|
||||
|
||||
Reference in New Issue
Block a user