Mathias Rönnlund
Mathias Rönnlund

Reputation: 4817

Querystring passed to Azure Function is not logged by Application Insights

We have an Http triggered Azure Function that takes 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.

In Application Insights the url part is being logged but we cannot see the querystring anywhere.

Upvotes: 4

Views: 1380

Answers (1)

krishg
krishg

Reputation: 6508

The default http request auto-collector specifically removes the query string and I don't see any option to include it. Code reference. Here is the open github issue. Unfortunately nothing much can be done at this moment. As an alternative, you can log custom telemetry from your code as an workaround for the time-being (note only for C# or JavaScript based function).

Upvotes: 6

Related Questions