Skip to content

RabbitPrometheusMiddleware

faststream.rabbit.prometheus.RabbitPrometheusMiddleware #

RabbitPrometheusMiddleware(*, registry, app_name=EMPTY, metrics_prefix='faststream', received_messages_size_buckets=None)

Bases: BasePrometheusMiddleware

Source code in faststream/rabbit/prometheus/middleware.py
def __init__(
    self,
    *,
    registry: "CollectorRegistry",
    app_name: str = EMPTY,
    metrics_prefix: str = "faststream",
    received_messages_size_buckets: Optional[Sequence[float]] = None,
) -> None:
    super().__init__(
        settings_provider_factory=lambda _: RabbitMetricsSettingsProvider(),
        registry=registry,
        app_name=app_name,
        metrics_prefix=metrics_prefix,
        received_messages_size_buckets=received_messages_size_buckets,
    )