diff options
author | Matt Robenolt <matt@ydekproductions.com> | 2017-04-27 11:49:50 -0700 |
---|---|---|
committer | Matt Robenolt <matt@ydekproductions.com> | 2017-04-27 11:49:50 -0700 |
commit | 5e753ab2449cff0d6273ee9d744ca0666c013795 (patch) | |
tree | 39edf8735a208716acdec9921443467aa526b824 | |
parent | 27ec4d2fdbfc1383edcb920bd16a59f4a71a81ff (diff) | |
download | raven-5e753ab2449cff0d6273ee9d744ca0666c013795.tar.gz |
Fix syntax highlighting in advanced docs
-rw-r--r-- | docs/advanced.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/advanced.rst b/docs/advanced.rst index 3f07c17..3d3312c 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -274,10 +274,14 @@ There are two ways to sample messages: - Add sample_rate to the Client object - This sends a percentage of messages the reaching the Client to Sentry +.. code-block:: python + client = Client('___DSN___', sample_rate=0.5) # send 50% of events - Sample individual messages +.. code-block:: python + client = Client('___DSN___') # No sample_rate provided try: @@ -288,6 +292,8 @@ There are two ways to sample messages: Alternatively, if you have SentryHandler configured in your logging stack, you can send ``sample_rate`` in the ``extra`` kwarg in each log like this +.. code-block:: python + some_logger.warning('foo', extra={'sample_rate': 0.5}) # Send 50% of this event A Note on uWSGI |