Пример #1
0
 def counter(
     self,
     key: str,
     value: Union[int, float],
     sample_rate: Union[int, float, None] = None,
     tag_dict: Optional[dict] = None,
 ) -> NoReturn:
     protocol: "TelegrafStatsdProtocol" = TelegrafStatsdProtocol().counter(key, value, tag_dict)
     self.send_telegraf_statsd(protocol, sample_rate)
Пример #2
0
 def set(
     self,
     key: str,
     value: NUM_TYPE,
     sample_rate: Union[int, float, None] = None,
     tag_dict: Optional[dict] = None,
 ) -> None:
     protocol: "TelegrafStatsdProtocol" = TelegrafStatsdProtocol().set(key, value, tag_dict)
     self.send_telegraf_statsd(protocol, sample_rate)