Run logfire regardless of environment
This commit is contained in:
parent
26b9d2ed20
commit
5edae13cc0
1 changed files with 9 additions and 9 deletions
|
|
@ -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")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue