Tail endpoint web socket framesize (original) (raw)

Hi,

I’m making use of the /tail endpoint using a web socket client that has a default maximum frame size of 65536 bytes.

I can see in production that this limit is being hit and have reproduced the issue also in an integration test against a real instance of Loki. If I open a websocket and log a message of size around 65536, then the issue is triggered. If I log 2 messages that are half that size then the issue is also triggered.

I can of course configure my client to handle a larger frame size but how large do I need to go in order to ensure I won’t just hit this issue again at a higher value? Is there a configuration option that controls how much data Loki will emit within a single frame?

I don’t think any of my log messages in production are anywhere near 64KB but I can see that multiple messages will get merged into a single frame. I can see there is a limit parameter I can pass that defaults to 100 - is that per frame? If so, then what do I do if the vast majority of logs are small in size but the occasional batch can come along that are larger?