Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions faust/sensors/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from aiohttp.web import Response

from faust import web, web as _web
from faust import web
from faust.exceptions import ImproperlyConfigured
from faust.types import (
TP,
Expand Down Expand Up @@ -68,12 +68,12 @@ def setup_prometheus_sensors(
app.monitor = PrometheusMonitor(metrics=faust_metrics)

@app.page(pattern)
async def metrics_handler(self: _web.View, request: _web.Request) -> _web.Response:
async def metrics_handler(self: web.View, request: web.Request) -> web.Response:
headers = {"Content-Type": CONTENT_TYPE_LATEST}

return cast(
_web.Response,
Response(body=generate_latest(REGISTRY), headers=headers, status=200),
web.Response,
Response(body=generate_latest(registry), headers=headers, status=200),
)


Expand Down