-
Notifications
You must be signed in to change notification settings - Fork 47
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
An invalid log "breaks" the sink #73
Comments
Hi @saleem-mirza, do you have an update on this issue? It comes with a nice reproduction path and fixing this bug would really help to make the sinks output more reliable. |
@jessetan this sink just serialize dynamically whatever it gets. Limiting it to "n" number of events blindly is not a good idea. A better approach would be limit/sanitize an object before feeding to sink. Please let me know your thoughts. |
I'm not familiar with inner workings of Serilog and Serilog sinks (thanks for your hard work!), but from an application perspective, I would expect to be able to send anything to Serilog and it would log equally well to all sinks. |
Right now, even if (partial) information from one log entry would be lost, it would still be an improvement. Just wondering: what do other sinks do in such cases? |
In my opinion, application should limit what is being logged. It is not a good idea to just dump a large object blindly. If any object is breaking logging/application, it should be investigated for reason. |
I have released another variant of this sink recently. The new sink logs it structurally instead of expanding object. However, it is not compatible with existing sink. https://github.com/saleem-mirza/serilog-sinks-azure-analytics/tree/vnext |
Describe the bug
If there is any kind of error during a
LogEvent
's logging, then it breaks the sink entirely, because it does not get rid of the sourceLogEvent
.To Reproduce
Attached a project. You have to insert your own
authenticationId
andworkspaceId
.AzureAnalyticsExample.zip
Expected behavior
Get rid of the LogEvent and maybe log that 1
LogEvent
was removed because of the following error: ...Screenshots
![image](https://user-images.githubusercontent.com/17674740/204741988-fe917805-4955-4c0b-96d6-d252a225913e.png)
Console
Azure
![image](https://user-images.githubusercontent.com/17674740/204742094-1254b449-de9d-43b5-b88d-9e8034fead80.png)
Additional context
#49 is a subset of this
The text was updated successfully, but these errors were encountered: