summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Fitzhardinge <ben@fitzhardinge.net>2017-11-07 17:37:03 +0800
committerAshley Camba <ashwoods@gmail.com>2017-11-07 14:15:55 +0100
commit442d38c4f69bf699a19dc22cb4c1a7baad3fb42c (patch)
tree6844c42c738f56a11bc7abfb2cb968fb7a599b31
parent57b67920d7169a98681e52a75521e1e9f281c74c (diff)
downloadraven-442d38c4f69bf699a19dc22cb4c1a7baad3fb42c.tar.gz
added doco for user context and tags for logging integrations
-rw-r--r--docs/integrations/logging.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/integrations/logging.rst b/docs/integrations/logging.rst
index 13d6e40..ed7342c 100644
--- a/docs/integrations/logging.rst
+++ b/docs/integrations/logging.rst
@@ -117,6 +117,13 @@ capturing for all messages::
logger.error('There was an error, with a stacktrace!')
+Passing tags and user context is also available through extra::
+
+ logger.error('There was an error, with user context and tags'), extra={
+ 'user': {'email': 'test@test.com},
+ 'tags': {'database': '1.0'},
+ })
+
You may also pass additional information to be stored as meta information with
the event. As long as the key name is not reserved and not private (_foo) it
will be displayed on the Sentry dashboard. To do this, pass it as ``data``