-
Notifications
You must be signed in to change notification settings - Fork 208
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
Allow customization of default properties collected by UseSerilogRequestLogging() #174
Comments
Hi Vadim, thanks for the suggestion. Right now I think making this change would lead to a lot of downstream churn in monitoring systems and so-on. I agree that the |
Just bump Major version of lib. My life is miserable as all these people do name things each time differently. I am suffering. |
This is nothing more than a conflict of subjective opinions. For example, I use |
I would say the main reason isn't in suffering. The main reason is the difference with the name of the property in Asp.Net Core logs and HttpClient. |
Thanks for the follow-up @vhatsura 👍 Right now I still expect the pain caused by a change (especially given that large numbers of monitoring systems work with these events) will be too great to justify it. In particular, large enterprise deployments will have many services using the old and new versions of any package concurrently, making monitoring much harder. Given that we support customization of It would fit in at: https://github.com/serilog/serilog-aspnetcore/blob/dev/src/Serilog.AspNetCore/AspNetCore/RequestLoggingMiddleware.cs#L88 The default would just do the same array construction that we currently do inline, but an override could substitute property names etc. We'd document it as returning one property per property token in the supplied message template - and this would be nice and easy for consumers to check by eye. What do you think? |
Elapsed
to ElapsedMilliseconds
Allowing customization of these properties would be the preferred way. We also rely on ElapsedInMiliseconds for our monitoring, and therefor we can't use this middleware as efficient. |
I suggest to change
Elapsed
toElapsedMilliseconds
by the following reasons:HttpClient
logs, defaultAspNetCore
logsThe text was updated successfully, but these errors were encountered: