mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: make logfire disabled by default
Initially started by https://github.com/learnhouse/learnhouse/pull/496
This commit is contained in:
parent
b425cd2984
commit
05abc93017
4 changed files with 20 additions and 4 deletions
|
|
@ -37,8 +37,13 @@ app.add_middleware(
|
|||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
logfire.configure(console=False, service_name=learnhouse_config.site_name,)
|
||||
logfire.instrument_fastapi(app)
|
||||
# Only enable logfire if explicitly configured
|
||||
if learnhouse_config.general_config.logfire_enabled:
|
||||
logfire.configure(console=False, service_name=learnhouse_config.site_name,)
|
||||
logfire.instrument_fastapi(app)
|
||||
# Instrument database after logfire is configured
|
||||
from src.core.events.database import engine
|
||||
logfire.instrument_sqlalchemy(engine=engine)
|
||||
|
||||
# Gzip Middleware (will add brotli later)
|
||||
app.add_middleware(GZipMiddleware, minimum_size=1000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue