Skip to content
main
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.rst

aiohttp-datadog

CI Status

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),
        ),
    ),
)

About

An aiohttp middleware for reporting metrics to Datadog

Topics

Resources

License

Packages

No packages published

Languages