pygelf
pygelf copied to clipboard
DNS lookup happening on every log message (UDP)
When using GelfUdpHandler with a hostname (rather than an IP address) as a destination, it gets resolved by DNS on every log message, which is a big performance concern. This is behaviour inherited from Python's DatagramHandler (see https://bugs.python.org/issue47149), but presumably pygelf could work around it by resolving the hostname itself on startup.
Thanks, I'll look into this.
There is some interesting discussion happening on the bpo bug mentioned above regarding handling DNS TTL.