Skip to content

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 :) ?

@SimonCropp
Copy link
Collaborator

can someone add some tests

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.

4 participants