python-rq.json 2.7 KB

123456
  1. {
  2. "html": "<div class=\"section\" id=\"installation\">\n<h2>Installation</h2>\n<p>If you haven&#8217;t already, start by downloading Raven. The easiest way is\nwith <em>pip</em>:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span>pip install raven --upgrade\n</pre></div>\n</div>\n</div>\n\n\n<div class=\"section\" id=\"usage\">\n<h2>Usage</h2>\n<p>RQ natively supports binding with Sentry by passing your <code class=\"docutils literal\"><span class=\"pre\">SENTRY_DSN</span></code> through <code class=\"docutils literal\"><span class=\"pre\">rqworker</span></code>:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span>$ rqworker --sentry-dsn=&quot;___DSN___&quot;\n</pre></div>\n</div>\n</div>\n\n\n<div class=\"section\" id=\"extended-setup\">\n<h2>Extended Setup</h2>\n<p>If you want to pass additional information, such as <code class=\"docutils literal\"><span class=\"pre\">release</span></code>, you&#8217;ll need to bind your\nown instance of the Sentry <code class=\"docutils literal\"><span class=\"pre\">Client</span></code>:</p>\n<div class=\"highlight-python\"><div class=\"highlight\" style=\"background: #ffffff\"><pre style=\"line-height: 125%\"><span></span><span style=\"color: #2eb0f7\">from</span> <span style=\"color: #111111\">raven</span> <span style=\"color: #2eb0f7\">import</span> <span style=\"color: #111111\">Client</span>\n<span style=\"color: #2eb0f7\">from</span> <span style=\"color: #111111\">raven.transport.http</span> <span style=\"color: #2eb0f7\">import</span> <span style=\"color: #111111\">HTTPTransport</span>\n<span style=\"color: #2eb0f7\">from</span> <span style=\"color: #111111\">rq.contrib.sentry</span> <span style=\"color: #2eb0f7\">import</span> <span style=\"color: #111111\">register_sentry</span>\n\n<span style=\"color: #111111\">client</span> <span style=\"color: #4b4f5c\">=</span> <span style=\"color: #111111\">Client(</span><span style=\"color: #e8535a\">&#39;___DSN___&#39;</span><span style=\"color: #111111\">,</span> <span style=\"color: #111111\">transport</span><span style=\"color: #4b4f5c\">=</span><span style=\"color: #111111\">HTTPTransport)</span>\n<span style=\"color: #111111\">register_sentry(client,</span> <span style=\"color: #111111\">worker)</span>\n</pre></div>\n</div>\n<p>Please see <code class=\"docutils literal\"><span class=\"pre\">rq</span></code>&#8216;s documentation for more information:\n<a class=\"reference external\" href=\"http://python-rq.org/patterns/sentry/\">http://python-rq.org/patterns/sentry/</a></p>\n</div>\n",
  3. "link": "https://docs.getsentry.com/clients/python/integrations/rq/",
  4. "id": "python-rq",
  5. "name": "RQ"
  6. }