Error sending events., start with the error already in your application logs. Python SDK 1.4.42 and later include a reason and a batch size with verbose logging off. Check the version in the environment that runs your application with python -m pip show lunary.
Read a production error
LeaveLUNARY_VERBOSE unset or set it to false. The lunary logger defaults to WARNING, and its child lunary.consumer logs event delivery failures at ERROR. Your application’s Python logging handlers can capture these records alongside your other logs. If you configure log filtering, include lunary.consumer at ERROR and keep the timestamp and timezone.
http_status=n/a means the SDK has no HTTP error status to report. For example, a read timeout can occur after the server received the batch, so the event count alone cannot tell you how many events were lost.
If an older SDK prints only Error sending events., use the timestamp to look up the request to /v1/runs/ingest in your gateway or ingestion logs. For hosted Lunary, share the timestamp, timezone and SDK version with support. Upgrading adds the reason to future errors.
HTTP responses
Failures without an HTTP status
Trace batch activity without logging event contents
If errors are quiet but traces seem delayed, you can watch the worker in a short diagnostic run. Start with verbose mode off, then enable DEBUG on the consumer logger only. In an application that already configures logging, use its existing handler and make sure its level admits DEBUG fromlunary.consumer.
Use verbose logging for one reproduction
For a serialized event or a send traceback, start a fresh process withLUNARY_VERBOSE=true before importing lunary. Both true and True enable this behavior. Run your own reproduction script against a test project with synthetic input.
lunary to the root logger. Look for Add event: followed by serialized event data, then the consumer’s batch messages. Add event: means the event was queued. A failed send also includes a Python traceback. To return to normal logging, end that process and start the application with the variable unset or false.
In a running application, lunary.config(verbose=True) enables send-error tracebacks and the SDK’s event-debug code. The existing logger and handler levels still control whether DEBUG records appear. This call does not install the startup stderr handler. If your application passes a custom ssl_verify setting, retain it when calling config. Changing a logger level alone does not enable verbose event serialization or send-error tracebacks.
Verbose output can include prompts, model outputs, user metadata, endpoint URLs and an explicitly supplied event key. Share the standard delivery error line for production investigations. Review and redact any verbose output or traceback before sharing it.
Recognize tracking and integration messages
When asking support to investigate, include the SDK version, timestamp with timezone, whether you use hosted or self-hosted Lunary, and the exact standard error line. For an integration error, include the provider and client version as well. Keep API keys and event contents out of the report.