Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Is it possible to Include SQL query parameter values in Application Insights? #775

Closed
imeya opened this issue Oct 22, 2018 · 2 comments
Closed

Comments

@imeya
Copy link

imeya commented Oct 22, 2018

I have the following sql query in my project:
"select location from test where name = @name", and then I can see this query is logged in the application insights.

But I wonder if it's possible to record the value of the parameter "@name" in the query in application insights? like if the "@name"'s value is "jack", then in the application insights, it's logged this query as "select location from test where name = jack".

@Dmitry-Matveev
Copy link
Member

@imeya, Application Insights SDK does not collect SQL parameters by default (as per my understanding, it's done to decrease chances of collecting PII in the telemetry by default).

If you have a way to retrieve the values you'd like to put into Dependency Telemetry on your own - then you can set them in Telemetry Initializer on the outgoing telemetry item.

@imeya
Copy link
Author

imeya commented Nov 22, 2018

thank you.

@imeya imeya closed this as completed Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants