-
Notifications
You must be signed in to change notification settings - Fork 209
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
Add elapsedMs parameter to the EnrichDiagnosticContext delegate #389
Comments
Thanks for dropping us a line! How does the duration you want to pass through the |
Hi. Thanks for the quick reply. I don't expect the duration to differ - I would expect the same value. The desire is to be able to access that value when enriching the DiagnoticContext. |
Ah sorry, I see I misunderstood 😅 - thanks for the clarification. |
Add option to add ElapsedMs to the HttpContext before enrishing diagnostic contect.
Add option to add ElapsedMs to the HttpContext before enrishing diagnostic contect.
Add option to add ElapsedMs to the HttpContext before enrishing diagnostic contect.
@nblumhardt I have raised a PR with an alternative solution in order to avoid introducing breaking changes to the EnrichDiagnosticContext action. |
Is your feature request related to a problem? Please describe.
I want to use the diagnostic context to log a structured object containing enhanced request information. I would like this to include the elapsed duration, but the value is not accessible outside of the middleware. I believe this is a simple fix, to just include the elapsedMs value as a parameter to the EnrichDiagnosticContext action.
Describe the solution you'd like
RequestLoggingMiddleware.cs#L30
RequestLoggingMiddleware.cs#L85
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: