mattwcole / gelf-extensions-logging

GELF provider for Microsoft.Extensions.Logging
MIT License
109 stars 42 forks source link

Add support for custom UDP chunk size #55

Closed iqueiroz closed 3 years ago

iqueiroz commented 3 years ago

Using the client with Graylog hosted on Azure Kubernetes I found out that big log messages were missing on my stream. Troubleshooting it I notice that messages longer than 1493 bytes were never being received in the UDP port. To be sure of it I dropped the Graylog Input listener and used netcat to start listening on the same UDP port and submitted messages of different sizes. Running Graylog on a VirtualBox machine I could not reproduce this issue, only when its running on AKS.

I found this related issue on Graylog repository: https://github.com/Graylog2/graylog2-server/issues/4317 Quoting joschi:

Most GELF libraries support configuring the chunk size, so you might want to reduce the size in your network if you currently have problems.

Expanding the code I notice that the max chunk size is defined in a constant, making it impossible to configure the client to my network issue.

My environment

Graylog version: 4.0.2 Hosting: Azure AKS Client: .NET Core 3.1 + Windows

mattwcole commented 3 years ago

Sorry for the delay getting back to you, great contribution, thank you. Hope it solves your missing messages. I'll release a pre-release package ASAP!

mattwcole commented 3 years ago

Released as prerelease v2.2.0-pre1.