Hello @chadical and @jjmurre ,
I will update Raven to the latest version.
As for obtaining a Sentry client in your own code, I would use self.server.user_ctx and self.server.user_ctx_lock.
The former is a process-wide dictionary-like object that can be used for sharing information across services. It is up to users to decide what it should contain, Zato will never use it for anything internally.
Note that there is one user_ctx per one process; thus, if you have one server with four sub-processes, each one will have its own user_ctx.
self.server.user_ctx_lock is a lock object - you can use it, for instance, to serialize write access to the function that creates a Sentry client.
Here is how it can look like
client = create_client()
self.server.user_ctx['my.sentry.client'] = client
# Obtain a Python process-wide lock
# Does the client exist already?
if not self.server.user_ctx.get('my.sentry.client'):
# Here it is guaranteed that the client exists,
# either because we have just created it in before_handle
# or because it was already available.
client = self.server.user_ctx['my.sentry.client']