Bases: BaseConfluentMetricsSettingsProvider['Message']
Source code in faststream/confluent/prometheus/provider.py
| def __init__(self) -> None:
self.messaging_system = "kafka"
|
messaging_system instance-attribute
messaging_system = 'kafka'
get_consume_attrs_from_message
Source code in faststream/confluent/prometheus/provider.py
35
36
37
38
39
40
41
42
43
44 | @override
def get_consume_attrs_from_message(
self,
msg: "StreamMessage[Message]",
) -> ConsumeAttrs:
return {
"destination_name": cast("str", msg.raw_message.topic()),
"message_size": len(msg.body),
"messages_count": 1,
}
|
get_publish_destination_name_from_cmd
Source code in faststream/confluent/prometheus/provider.py
| @override
def get_publish_destination_name_from_cmd(
self,
cmd: "PublishCommand",
) -> str:
return cmd.destination
|