Logfire Configuration
The logfire_config attribute of the Soliplex installation configuration
allows defining policies for how Logfire is
configured
at server startup.
Default behavior
If the logfire_config attribute is not present in the Soliplex installation
configuration, Soliplex configures it as follows:
logfire.configure(send_to_logfire="if-token-present")
logfire.instrument_pydantic_ai()
logfire.instrument_fastapi(app, capture_headers=True)
That is, the logfire library will only send spans to the default Logfire
server if the LOGFIRE_TOKEN environment variable is set: all other
configuration is done via OS environment variables (not in the Soliplex
configuration). See the Logfire
docs on environment variables.
Required attributes
tokenshould name the secret which contains the token issued by Logfire. E.g.:
Optional attributes
service_namedefines the service name reported to Logfire for the appliction. See this page for details
It can be a literal, or else use a configured installation environment value. E.g.:
service_versiondefines the service version reported to Logfire for the appliction. See this page for details
It can be a literal, or else use a configured installation environment value. E.g.:
environmentdefines the environment reported to Logfire for the appliction. See this page for details
It can be a literal, or else use a configured installation environment value. E.g.:
data_dirdefines the path to local data recorded by Logfire. See this page for details
It can be a literal, or else use a configured installation environment value. E.g.:
min_leveldefines the minimum log level reported to Logfire. See this page for details.
It can be a literal, or else use a configured installation environment value. E.g.:
base_url(string or None, None by default) is the URL of the Logfire server. This value would ordinarily only be used when self-hosting Logfire, as the library will discover the cloud-hosted URL from the token.
It can be a literal, or else use a configured installation environment value. E.g.:
inspect_arguments(boolean or None, None by default) See this page for details.
add_baggage_to_attributes(boolean, True by default) See this page for details.
distributed_tracing(boolean or None, None by default). See this page for details.