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
Optionally log POST request body #1880
Comments
Its not lost! its among the top asks in uservoice! The current suggestion/workaround is for customers to write the RequestBody using Ilogger. And have application insights capture the ilogger trace. Since ilogger traces gets automatically correlated with Request telemetry, it should be possible to find the body. |
Hi @cijothomas! do you happen to have a sample for the item above, i have an mvc project in 4.6 that i want to be able to log the request and response to app insights and not sure what approach to take based on the comment here. Regards |
@leninc The recommendation currently is: I don't have working sample to correctly capture request/response body. |
@cijothomas thanks for the quick response, will look into this |
This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-logging/?view=aspnetcore-6.0 .New middleware from asp.net core 6.0 makes this easy to do. |
@cijothomas I activated the new HttpLogging middleware, can see the output from it in my console window, however it is not visible/attached to my App Insights. What am I missing? |
Previously reported here: microsoft/ApplicationInsights-aspnetcore#686
Sounds like it may be happening per microsoft/ApplicationInsights-aspnetcore#686 (comment) but didn't want it to fall off the radar for those who would find it useful.
The text was updated successfully, but these errors were encountered: