azure-webjobs-sdk
azure-webjobs-sdk copied to clipboard
Add option to enable query params logging in http request auto-collection
Currently auto-request logging specifically skips logging the query params in the request URL. I also validated by looking at the code: https://github.com/Azure/azure-webjobs-sdk/blob/b243ac087e6efcd75b432cce327fa95eca37eb98/src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/Initializers/WebJobsTelemetryInitializer.cs#L154 Can we expose a new option in logging->applicationInsights->httpAutoCollectionOptions configuration in host.json to enable full URL logging?
This is really relevant for rest api's where there could be parameters both from the url and the querystring, e.g. url pattern "/customers/{customerid}" and then a parameter "includeorderdata=true" can be added to the querystring. So the incoming url would be https://ourazurefunction/api/customers/12345?includeorderdata=true.
Hi @krish-gh , Moving this to feature request to keep a track of the request. Let us know if this has already been fulfilled
Hi team, this feature would be really appreciated!
We'd also be really interested in this. Switching from WebApp to Functions for our API offerings, we've lost the query parameters in our logs.
I'm also down in a deep rabbit hole and could have really used this to get out of a big mess.
Support for this was added in #3026 and looks to have been released in appinsights-v3.0.39.
You can enable it by setting the enableQueryStringTracing
parameter in your host.json
file:
{
"logging": {
"applicationInsights": {
"enableQueryStringTracing": true
}
}
}