-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing context information for Event: JSON representation exceeds the body size limit XXX; #202
Comments
You can set If possible, manually truncating the event before sending is the best solution. |
Hey @liammclennan , However, I don't like the fact that the context is lost when the error occurs. So you can only find out where the error occurred and not what happened. Such an error can also happen because the user makes a special data query that can no longer be reproduce afterwards. Can the truncate be done at a central location? I have tried the following approach, which I don't like and doesn't work: I cannot access the complete event in the Thanks for your help! |
It is probably best to manually build your log data, instead of serializing arbitrarily large objects. |
Thanks again for raising this @FynnNikolaus; we've reviewed this again and think that controlling this at the point the entity is logged will be the better solution here. If you're still running into any issues though or need help figuring out what that might look like, please let us know. |
I have a question about the "eventBodyLimitBytes" attribute of Serilog. Unfortunately, there are places in our code that lead to an event that exceeds the limit. Unfortunately, the entire context of what was actually logged is lost in the retroactive view. Is there a practicable way to prevent this other than manually truncate the event in the code?
Thank you and best regards
Fynn
The text was updated successfully, but these errors were encountered: