8000 Merge branch 'master' into trboehre/codeowners · ShYuPe/botbuilder-python@c8d4126 · GitHub
[go: up one dir, main page]

Skip to content

Commit c8d4126

Browse files
authored
Merge branch 'master' into trboehre/codeowners
2 parents 2c892e9 + 8b5d8aa commit c8d4126

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

libraries/botbuilder-core/botbuilder/core/telemetry_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
class TelemetryConstants:
66
"""Telemetry logger property names."""
77

8+
ATTACHMENTS_PROPERTY: str = "attachments"
89
CHANNEL_ID_PROPERTY: str = "channelId"
910
CONVERSATION_ID_PROPERTY: str = "conversationId"
1011
CONVERSATION_NAME_PROPERTY: str = "conversationName"

libraries/botbuilder-core/botbuilder/core/telemetry_logger_middleware.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ async def fill_send_event_properties(
211211

212212
# Use the LogPersonalInformation flag to toggle logging PII data, text and user name are common examples
213213
if self.log_personal_information:
214+
if activity.attachments and activity.attachments.strip():
215+
properties[
216+
TelemetryConstants.ATTACHMENTS_PROPERTY
217+
] = activity.attachments
214218
if activity.from_property.name and activity.from_property.name.strip():
215219
properties[
216220
TelemetryConstants.FROM_NAME_PROPERTY

0 commit comments

Comments
 (0)
0