Skip to content

BaseRedisMetricsSettingsProvider

faststream.redis.prometheus.provider.BaseRedisMetricsSettingsProvider #

BaseRedisMetricsSettingsProvider()

Bases: MetricsSettingsProvider[dict[str, Any], RedisPublishCommand]

Source code in faststream/redis/prometheus/provider.py
def __init__(self) -> None:
    self.messaging_system = "redis"

messaging_system instance-attribute #

messaging_system = 'redis'

get_publish_destination_name_from_cmd #

get_publish_destination_name_from_cmd(cmd)
Source code in faststream/redis/prometheus/provider.py
def get_publish_destination_name_from_cmd(
    self,
    cmd: RedisPublishCommand,
) -> str:
    return cmd.destination

get_consume_attrs_from_message #

get_consume_attrs_from_message(msg)
Source code in faststream/prometheus/provider.py
def get_consume_attrs_from_message(
    self,
    msg: "StreamMessage[AnyMsg]",
) -> "ConsumeAttrs": ...