Verification and common problems - Python
A controlled event
import asyncio
from dock_ray import DockRayClient
async def main():
client = DockRayClient(token="...", private_key="...")
await client.capture_message("DockRay control message")
await client.close()
asyncio.run(main())
The call is a coroutine - without await or a running event loop, nothing is sent. An interpreter with warnings about unawaited coroutines enabled flags this straight away as a RuntimeWarning.
Common problems
client.enabled is False despite the variables being set
Check that the token and the private key reached the constructor as non-empty strings. DockRayClient() with no arguments is a valid, deliberately inert configuration, so a typo in an environment variable name or a skipped os.environ.get(...) produces exactly the same silent effect. The client never reads a server variable on its own - unlike the PHP integrations, here the calling code always supplies the credentials.
An event scheduled with send_later() never arrived
send_later() holds a reference to the task until it finishes, but the process itself has to survive until then. In a short script that exits right after scheduling the send, the task can be cut off midway. Shut the application down through await client.close() - it waits for every scheduled send before handing control back.
HTTPException shows up in the panel as a transaction, not an error
That is deliberate, not a bug. FastAPI handles HTTPException before it ever reaches the DockRay middleware, so a request ending in 404 or 422 is simply a transaction carrying that status code. If you want responses like these treated as errors, catch them with your own exception handler placed before the middleware and report them manually through capture_exception().
Authorization, Cookie and X-Api-Key are missing from request headers
The middleware strips them from the reported data always, regardless of configuration - it is not something you can switch back on. If diagnosing something needs their content, check it locally, outside the panel.
No transactions appear at all
Check whether the middleware is actually added (app.add_middleware(DockRayFastAPIMiddleware, ...)) and whether the path you are testing happens to sit on the exclude_paths list. It skips /health and /metrics by default.
A manually reported exception did not arrive
Check that the call to capture_exception() is really preceded by await or handed to send_later() - a coroutine nobody ran does nothing, and Python does not always flag it loudly.
The panel answers 200 but there is no event
A 200 {"success": false} response means the account has used up its monthly error quota. The integration does not treat that as a failure - and rightly so. You can see the quota on the account dashboard; until the end of the month it is counted from recorded usage, so deleting errors does not reset it.
Still not working
Work through the troubleshooting checklist, and if that does not help, write to us. Include the project name, the integration version and roughly when you ran the test: it shortens the way to an answer.