Is there a recommended way of handling large messages so they are not completely dropped by graylog? I added the following patch, but only having used graylog/GELF for a couple days, I imagine there is a better way to handle this case as it drops all but the base set of fields.
class GELFRabbitHandler(BaseGELFHandler, SocketHandler):
def makePickle(self, record):
message_dict = self._make_gelf_dict(record)
data = json.dumps(message_dict)
if len(data) > 32766:
data = json.dumps({
'version': message_dict['version'],
'host': message_dict['host'],
'short_message': 'OVERSIZED_MESSAGE: ' + message_dict['short_message'][:2048],
'timestamp': message_dict['timestamp'],
'level': message_dict['level'],
'facility': message_dict['facility'],
}, cls=self.serializer)
return data
Is there a recommended way of handling large messages so they are not completely dropped by graylog? I added the following patch, but only having used graylog/GELF for a couple days, I imagine there is a better way to handle this case as it drops all but the base set of fields.