AppInsights: PII is logged even if logPersonalInformation is false
See original GitHub issueVersion
4.11.0
Describe the bug
BBF always logs the user’s text.
To Reproduce
- Have bot with AppInsights integration. Configure the bot to not log the user’s personal information as per doc https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-telemetry?view=azure-bot-service-4.0&tabs=csharp.
- Talk to the bot
- Look into any event that logs the Recognizer telemetry, e.g. ValueRecognizerResult
- Check the customDimensions, you will find “Text” property there. Example:
{
"conversationId": "0a9d58c0-3301-11eb-bf90-2102e829151f|livechat",
"activityType": "message",
"channelId": "emulator",
"activityId": "2d360170-3301-11eb-98d6-891267dfc0ed",
"TopIntentScore": "Microsoft.Bot.Builder.IntentScore",
"Entities": {
"instance": {
"Ordinal": [
{
"Name": "Ordinal",
"Value": 2,
"Start": 4,
"End": 9,
"Text": "second"
}
]
}
},
"TopIntent": "test2",
"Intents": {
"test2": { "score":0.989161491394043 }
},
"Text": "the second test"
}
Expected behavior
User’s text should not be logged if logPersonalInformation == false
Additional context
-
The issue is that the
LogPersonalInformation
property is inTelemetryLoggerMiddleware
. It should be a property inIBotTelemetryClient
(it should be virtual onBotTelemetryClient
). -
FillRecognizerResultTelemetryProperties
method should check the property on the logger and it shouldn’t log text or alteredtext ifLogPersonalInformation == false
. -
Also, we need to do additional analysis to ensure that we don’t log PII in recognizerResult.Properties object.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Add telemetry to your bot - Bot Service
Telemetry logging enables bot applications to send event data to telemetry services such as Application Insights. Telemetry offers insights ...
Read more >Not all log levels are being logged in Application Insights
We had the same problem, and our solution was to set a filter to LogLevel.Trace , and match the filter category with the...
Read more >Redacting sensitive information with Application Insights in C#
This article teaches you how to redact sensitive information in Application Insights when you send traces from your .NET applications.
Read more >Azure Application Insights Tutorial | Amazing telemetry service
In this video I will show you why Azure Application Insights is the ... Querying application telemetry logs - Code-less monitoring Next ...
Read more >How To Get The Orchestrator Jobs Logs In Azure ...
Follow the below steps,. Go to the Orchestrator App Service and under the Settings Option there is a Application Insights-> Click on Enable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Zerryth, yes, TelemetryLoggerMiddleware handles PII as expected. This bug is about the fact that there other places in BBF that log PII data. Examples that I found:
Update: still working on this.
I’ve spoken with Eric regarding best practices/design issue that arises around
Recognizer
LogPersonalInformation
flagLogPersonalInformation
wanting to be aBoolExpression
(which needs dependency onAdaptiveExpressions
) for adaptive bits, but only abool
for non-adaptiveIt goes deeper, however Eric said maybe we should discuss best practices with Gabo, since current solution we can think of isn’t that pretty