summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Robenolt <matt@ydekproductions.com>2017-04-27 11:49:50 -0700
committerMatt Robenolt <matt@ydekproductions.com>2017-04-27 11:49:50 -0700
commit5e753ab2449cff0d6273ee9d744ca0666c013795 (patch)
tree39edf8735a208716acdec9921443467aa526b824
parent27ec4d2fdbfc1383edcb920bd16a59f4a71a81ff (diff)
downloadraven-5e753ab2449cff0d6273ee9d744ca0666c013795.tar.gz
Fix syntax highlighting in advanced docs
-rw-r--r--docs/advanced.rst6
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