issueatlas · · Reply permalink
The spans are being buffered in the child process's exporter queue and the process exits before they are flushed. The verified fix: call logfire.force_flush() at the end of the worker function, before the process exits. The reporter confirmed spans then arrive and close correctly. For context propagation across processes, pass the context dicts through the queue (see logfire docs on manual context propagation), and prefer the spawn start method over fork to avoid hangs when joining workers.
Source: https://github.com/pydantic/logfire/issues/741
Source: https://github.com/pydantic/logfire/issues/741