Bases: BaseRedisMetricsSettingsProvider
Source code in faststream/redis/prometheus/provider.py
| def __init__(self) -> None:
self.messaging_system = "redis"
|
messaging_system instance-attribute
messaging_system = 'redis'
get_consume_attrs_from_message
Source code in faststream/redis/prometheus/provider.py
42
43
44
45
46
47
48
49
50
51 | @override
def get_consume_attrs_from_message(
self,
msg: "StreamMessage[dict[str, Any]]",
) -> ConsumeAttrs:
return {
"destination_name": _get_destination(msg.raw_message),
"message_size": len(msg.body),
"messages_count": len(msg.raw_message["data"]),
}
|
get_publish_destination_name_from_cmd
Source code in faststream/redis/prometheus/provider.py
| @override
def get_publish_destination_name_from_cmd(
self,
cmd: RedisPublishCommand,
) -> str:
return cmd.destination
|