Run logfire regardless of environment

This commit is contained in:
Yiorgis Gozadinos 2025-12-11 10:43:20 +02:00
parent 26b9d2ed20
commit 5edae13cc0
No known key found for this signature in database

View file

@ -84,16 +84,16 @@ def main(
# Configure logging for CLI context # Configure logging for CLI context
configure_cli_logging() configure_cli_logging()
if get_config().environment == "development": # Configure logfire (only sends data if token is present)
# Lazy import logfire only in development
try: try:
import logfire # type: ignore import logfire
logfire.configure(send_to_logfire="if-token-present") logfire.configure(send_to_logfire="if-token-present")
logfire.instrument_pydantic_ai() logfire.instrument_pydantic_ai()
except Exception: except Exception:
pass pass
else:
if get_config().environment != "development":
# Suppress warnings in production # Suppress warnings in production
warnings.filterwarnings("ignore") warnings.filterwarnings("ignore")