summaryrefslogtreecommitdiff
path: root/docs/integrations/zerorpc.rst
blob: c60833bb89080a61cb06363f795f51c7f08cc2cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ZeroRPC
=======

ZeroRPC is a light-weight, reliable and language-agnostic library for
distributed communication between server-side processes.

Installation
------------

If you haven't already, start by downloading Raven. The easiest way is
with *pip*::

	pip install raven --upgrade

Setup
-----

The ZeroRPC integration comes as middleware for ZeroRPC. The middleware can be
configured like the original Raven client (using keyword arguments) and
registered into ZeroRPC's context manager::

    import zerorpc

    from raven.contrib.zerorpc import SentryMiddleware

    sentry = SentryMiddleware(dsn='___DSN___')
    zerorpc.Context.get_instance().register_middleware(sentry)

By default, the middleware will hide internal frames from ZeroRPC when it
submits exceptions to Sentry. This behavior can be disabled by passing the
``hide_zerorpc_frames`` parameter to the middleware::

    sentry = SentryMiddleware(hide_zerorpc_frames=False, dsn='___DSN___')

Compatibility
-------------

- ZeroRPC-Python < 0.4.0 is compatible with Raven <= 3.1.0;
- ZeroRPC-Python >= 0.4.0 requires Raven > 3.1.0.