| 12345678910111213141516171819 | # (c) Nelen & Schuurmansfrom asgiref.sync import sync_to_asyncfrom fluent.sender import FluentSenderfrom clean_python import Gatewayfrom clean_python import Json__all__ = ["FluentbitGateway"]class FluentbitGateway(Gateway):    def __init__(self, tag: str, host: str, port: int):        self._sender = FluentSender(tag, host=host, port=port)    @sync_to_async    def add(self, item: Json) -> Json:        self._sender.emit(item.pop("tag_suffix", ""), item)        return item
 |