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_publish_destination_name_from_kwargs
get_publish_destination_name_from_kwargs(kwargs)
Source code in faststream/redis/prometheus/provider.py
| def get_publish_destination_name_from_kwargs(
self,
kwargs: "AnyDict",
) -> str:
return self._get_destination(kwargs)
|
get_consume_attrs_from_message
get_consume_attrs_from_message(msg)
Source code in faststream/redis/prometheus/provider.py
| def get_consume_attrs_from_message(
self,
msg: "StreamMessage[AnyDict]",
) -> ConsumeAttrs:
return {
"destination_name": self._get_destination(msg.raw_message),
"message_size": len(msg.body),
"messages_count": len(cast(Sized, msg._decoded_body)),
}
|