An aiohttp middleware for reporting metrics to Datadog
Project description
An aiohttp middleware for reporting metrics to Datadog. Python 3.5+ is required.
Usage
from aiohttp import web
from aiohttp_datadog import DatadogMiddleware
app = web.Application(
middlewares=(
DatadogMiddleware(
"my_app",
{"host": "localhost", "port": 8126},
),
),
)
If you’re using a custom DogStatsd class, you can supply it via a keyword argument:
app = web.Application(
middlewares=(
DatadogMiddleware(
"my_app",
{"host": "localhost", "port": 8126},
dogstatsd_class=CatStatsd,
),
),
)
Or if you’re even more of a control freak, you can instantiate it yourself:
app = web.Application(
middlewares=(
DatadogMiddleware(
"my_app",
dogstatsd_instance=CatStatsd(meow=False),
),
),
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiohttp-datadog-0.5.0.tar.gz
(2.5 kB
view details)
Built Distribution
File details
Details for the file aiohttp-datadog-0.5.0.tar.gz
.
File metadata
- Download URL: aiohttp-datadog-0.5.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ddf1f52315b3d9b77581a4e8adfcd6b83ca6e063923eb1eb707811e5bcb7b69 |
|
MD5 | e5a8ead1e36149a425162ddda70d42a7 |
|
BLAKE2b-256 | ca27e8270b0bcd0f1e607d09ab312c737088e21798d1a1a51e30154094ccb6f2 |
File details
Details for the file aiohttp_datadog-0.5.0-py2.py3-none-any.whl
.
File metadata
- Download URL: aiohttp_datadog-0.5.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a334760d5d35ec6574a9c4f982ffd47b003fe194cf57a85bc26c63e066fcf488 |
|
MD5 | dd55bd488580184cb7287b7ac03beb9e |
|
BLAKE2b-256 | e00f0fc3914bc1c769f6af1fad246d76f08998bb1deb52a9fc0c88552df5b87f |