Skip to content
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

Support for limiting entries in DbUpdateExceptionDestructurer #673

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mrtristan
Copy link
Contributor

We have to use DbUpdateExceptionDestructurer for the reasons expressed in the Readme, however some of our processes yield rather large updates that may fail which leads to absolutely massive log entries when an exception is thrown. This causes impact down the line as the logs get shipped to services like Datadog which stop parsing log lines at a certain size which leads to partial unprocessable json, etc.

I think the cleanest way to handle this situation is to have an opt-in concept of a maximum quantity of entries that are present in the log.

# Conflicts:
#	Source/Serilog.Exceptions.EntityFrameworkCore/Serilog.Exceptions.EntityFrameworkCore.csproj
@RehanSaeed
Copy link
Owner

This question turns up now and again. Would this help?

#397 (comment)

@mrtristan
Copy link
Contributor Author

@RehanSaeed no, it's less about which properties and more about how many properties across how many objects yielding the log size. i'm not limiting properties in this PR, just how many objects in total are emitted with a hint to say what's been truncated

@krzysiek-b
Copy link

I also would like to limit the number of entries which will be logged. How can I help so we can merge this PR :) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants