From 1a264c519ba2931d0c17a7f9cb09afe531ab6495 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 13 Nov 2019 15:35:57 +0000 Subject: [PATCH] Document Huey integration (#69) Document the integration added in https://github.com/scoutapp/scout_apm_python/pull/367 --- source/includes/_python.md | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/source/includes/_python.md b/source/includes/_python.md index 2200ab62b8a..c077543345a 100644 --- a/source/includes/_python.md +++ b/source/includes/_python.md @@ -30,6 +30,7 @@ The libraries below require a small number of configuration updates. Click on th * [Falcon](#falcon) * [Flask](#flask) * [Flask SQLAlchemy](#flask-sqlalchemy) +* [Huey](#huey) * [Nameko](#nameko) * [Pyramid](#pyramid) * [SQLAlchemy](#sqlalchemy) @@ -443,6 +444,65 @@ from scout_apm.flask.sqlalchemy import instrument_sqlalchemy instrument_sqlalchemy(engine) ``` +## Huey + +Scout supports Huey 2.0+. + +Add the following to instrument your Huey application: + + + + + + + + + + + + + + + + +
+ 1 + +

Install the scout-apm package:

+
+pip install scout-apm
+
+
+ 2 + +

Add Scout to your Huey application:

+
+from huey import SqliteHuey
+from scout_apm.api import Config
+from scout_apm.huey import attach_scout
+
+broker = SqliteHuey()
+
+
+Config.set(
+    monitor=True,
+    name="A FRIENDLY NAME FOR YOUR APP",
+    key="[AVAILABLE IN THE SCOUT UI]",
+)
+attach_scout(huey)
+
+ +

If you wish to configure Scout via environment variables, use SCOUT_MONITOR, SCOUT_NAME and SCOUT_KEY instead of calling Config.set().

+ +

+If you've installed Scout via the Heroku Addon, the provisioning process automatically sets SCOUT_MONITOR and SCOUT_KEY via config vars. Only SCOUT_NAME is required. +

+
3 +

Deploy.

+

It takes approximatively five minutes for your data to first appear within the Scout UI.

+

Tasks will appear in the "Background Jobs" area of the Scout UI.

+
+ ## Nameko General instructions for a Nameko app: