amenezes/async_metrics

View on GitHub
examples/aiohttp_example.py

Summary

Maintainability
A
0 mins
Test Coverage
import logging

from aiohttp import web

from async_metrics.ext.aiohttp import setup_async_metrics


logging.basicConfig(level=logging.INFO)

async def hello(request):
    return web.Response(body='main app')


app = web.Application()
app.add_routes([web.get('/', hello)])
setup_async_metrics(app)
web.run_app(app)