Skip to content

RedisTelemetryMiddleware

faststream.redis.opentelemetry.RedisTelemetryMiddleware #

RedisTelemetryMiddleware(*, tracer_provider=None, meter_provider=None, meter=None)

Bases: TelemetryMiddleware

Source code in faststream/redis/opentelemetry/middleware.py
def __init__(
    self,
    *,
    tracer_provider: Optional[TracerProvider] = None,
    meter_provider: Optional[MeterProvider] = None,
    meter: Optional[Meter] = None,
) -> None:
    super().__init__(
        settings_provider_factory=lambda _: RedisTelemetrySettingsProvider(),
        tracer_provider=tracer_provider,
        meter_provider=meter_provider,
        meter=meter,
        include_messages_counters=True,
    )