Skip to content

Commit

Permalink
Email Insights page should let customers know to setup Diagnostic set…
Browse files Browse the repository at this point in the history
…tings to start capturing logs (#2831)

* add message

* update message

* update workbook

* update message

---------

Co-authored-by: Fanrui Sun <[email protected]>
  • Loading branch information
fanruisun and Fanrui Sun authored Nov 14, 2024
1 parent 2e6e2ea commit 1152918
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@
"version": "KqlItem/1.0",
"query": "let all = ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| project DeliveryStatus, ts=bin(TimeGenerated, iif(\"{email_time_bucket:label}\" == \"<unset>\", 4h, totimespan(\"{email_time_bucket:value}\")));\r\nall | summarize \r\n total=count(),\r\n success=countif(DeliveryStatus == \"Delivered\"),\r\n failures=countif(DeliveryStatus != \"Delivered\")\r\n by ts",
"size": 0,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"timeContextFromParameter": "email_time",
"queryType": 0,
"resourceType": "microsoft.communication/communicationservices",
Expand Down Expand Up @@ -646,6 +647,7 @@
"version": "KqlItem/1.0",
"query": "ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| extend ts=bin(TimeGenerated, iif(\"{email_time_bucket:label}\" == \"<unset>\", 4h, totimespan(\"{email_time_bucket:value}\")))\r\n| summarize successRate=((countif(DeliveryStatus == \"Delivered\") * 100.0)/count()) by ts;",
"size": 1,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"aggregation": 3,
"title": "Delivery Success Rate",
"timeContextFromParameter": "email_time",
Expand Down Expand Up @@ -736,6 +738,7 @@
"content": {
"version": "KqlItem/1.0",
"query": "let cvids = ACSEmailStatusUpdateOperational\r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize by CorrelationId;\r\nACSEmailSendMailOperational\r\n| join cvids on CorrelationId\r\n| extend sizeForAllRecipients=(Size * UniqueRecipientsCount)\r\n| summarize sizeForAllRecipients=sum(sizeForAllRecipients) by bin(TimeGenerated, iif(\"{email_time_bucket:label}\" == \"<unset>\", 4h, totimespan(\"{email_time_bucket:value}\")))",
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"size": 0,
"title": "Total Size For Emails Sent",
"timeContextFromParameter": "email_time",
Expand Down Expand Up @@ -808,6 +811,7 @@
"content": {
"version": "KqlItem/1.0",
"query": "let cvids = ACSEmailStatusUpdateOperational\r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize by CorrelationId;\r\nACSEmailSendMailOperational\r\n| join cvids on CorrelationId\r\n| extend sizeForAllRecipients=(Size * UniqueRecipientsCount)\r\n| summarize totalMessages=dcount(CorrelationId) by bin(TimeGenerated, iif(\"{email_time_bucket:label}\" == \"<unset>\", 4h, totimespan(\"{email_time_bucket:value}\")))",
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"size": 0,
"title": "Total Emails Sent",
"timeContextFromParameter": "email_time",
Expand Down Expand Up @@ -882,6 +886,7 @@
"version": "KqlItem/1.0",
"query": " ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\" and DeliveryStatus != \"Delivered\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize value=count() by DeliveryStatus=iff(DeliveryStatus != \"Failed\", DeliveryStatus, iff(tobool(IsHardBounce), \"Failed (hard bounce)\", \"Failed\")), ts=bin(TimeGenerated, 5m)",
"size": 3,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Error Summary",
"color": "blueDarkDark",
"timeContextFromParameter": "email_time",
Expand Down Expand Up @@ -911,6 +916,7 @@
"version": "KqlItem/1.0",
"query": " ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus !in (\"Delivered\", \"OutForDelivery\")\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize value=count() by SmtpStatusCode, EnhancedSmtpStatusCode",
"size": 1,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Error Code Details",
"color": "blueDarkDark",
"timeContextFromParameter": "email_time",
Expand Down Expand Up @@ -958,6 +964,7 @@
"version": "KqlItem/1.0",
"query": "ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| project Id=CorrelationId, [\"Mail To Address\"]=RecipientId, [\"Mail From Address\"]=strcat(SenderUsername, \"@\", SenderDomain), DeliveryStatus, Status=iff(DeliveryStatus == \"Delivered\", \"success\", \"error\"), [\"Date Sent\"]=TimeGenerated",
"size": 0,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Per-recipient Delivery Details",
"timeContextFromParameter": "email_time",
"queryType": 0,
Expand Down
7 changes: 7 additions & 0 deletions Workbooks/Communication Services/Overview/Overview.workbook
Original file line number Diff line number Diff line change
Expand Up @@ -3590,6 +3590,7 @@
"version": "KqlItem/1.0",
"query": "let all = ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| project DeliveryStatus, ts=bin(TimeGenerated, iif(\"{time_granularity:label}\" == \"<unset>\", 4h, totimespan(\"{time_granularity:value}\")));\r\nall | summarize \r\n total=count(),\r\n success=countif(DeliveryStatus == \"Delivered\"),\r\n failures=countif(DeliveryStatus != \"Delivered\")\r\n by ts",
"size": 0,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"timeContextFromParameter": "time_range",
"queryType": 0,
"resourceType": "microsoft.communication/communicationservices",
Expand Down Expand Up @@ -3885,6 +3886,7 @@
"version": "KqlItem/1.0",
"query": "ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| extend ts=bin(TimeGenerated, iif(\"{time_granularity:label}\" == \"<unset>\", 4h, totimespan(\"{time_granularity:value}\")))\r\n| summarize successRate=((countif(DeliveryStatus == \"Delivered\") * 100.0)/count()) by ts;",
"size": 1,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"aggregation": 3,
"title": "Delivery Success Rate",
"timeContextFromParameter": "time_range",
Expand Down Expand Up @@ -3976,6 +3978,7 @@
"version": "KqlItem/1.0",
"query": "let cvids = ACSEmailStatusUpdateOperational\r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize by CorrelationId;\r\nACSEmailSendMailOperational\r\n| join cvids on CorrelationId\r\n| extend sizeForAllRecipients=(Size * UniqueRecipientsCount)\r\n| summarize sizeForAllRecipients=sum(sizeForAllRecipients) by bin(TimeGenerated, iif(\"{time_granularity:label}\" == \"<unset>\", 4h, totimespan(\"{time_granularity:value}\")))",
"size": 0,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Total Size For Emails Sent",
"timeContextFromParameter": "time_range",
"queryType": 0,
Expand Down Expand Up @@ -4048,6 +4051,7 @@
"version": "KqlItem/1.0",
"query": "let cvids = ACSEmailStatusUpdateOperational\r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize by CorrelationId;\r\nACSEmailSendMailOperational\r\n| join cvids on CorrelationId\r\n| extend sizeForAllRecipients=(Size * UniqueRecipientsCount)\r\n| summarize totalMessages=dcount(CorrelationId) by bin(TimeGenerated, iif(\"{time_granularity:label}\" == \"<unset>\", 4h, totimespan(\"{time_granularity:value}\")))",
"size": 0,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Total Emails Sent",
"timeContextFromParameter": "time_range",
"queryType": 0,
Expand Down Expand Up @@ -4121,6 +4125,7 @@
"version": "KqlItem/1.0",
"query": " ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\" and DeliveryStatus != \"Delivered\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize value=count() by DeliveryStatus=iff(DeliveryStatus != \"Failed\", DeliveryStatus, iff(tobool(IsHardBounce), \"Failed (hard bounce)\", \"Failed\")), ts=bin(TimeGenerated, 5m)",
"size": 3,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Error Summary",
"color": "blueDarkDark",
"timeContextFromParameter": "time_range",
Expand Down Expand Up @@ -4150,6 +4155,7 @@
"version": "KqlItem/1.0",
"query": " ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus !in (\"Delivered\", \"OutForDelivery\")\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| summarize value=count() by SmtpStatusCode, EnhancedSmtpStatusCode",
"size": 1,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Error Code Details",
"color": "blueDarkDark",
"timeContextFromParameter": "email_time",
Expand Down Expand Up @@ -4197,6 +4203,7 @@
"version": "KqlItem/1.0",
"query": "ACSEmailStatusUpdateOperational \r\n| where OperationName == \"DeliveryStatusUpdate\" and isnotempty(DeliveryStatus) and DeliveryStatus != \"OutForDelivery\"\r\n| where ('{email_mailfrom:value}' == \"All senders\") or (strcat(SenderUsername, '@', SenderDomain) == '{email_mailfrom:value}')\r\n| project Id=CorrelationId, [\"Mail To Address\"]=RecipientId, [\"Mail From Address\"]=strcat(SenderUsername, \"@\", SenderDomain), DeliveryStatus, Status=iff(DeliveryStatus == \"Delivered\", \"success\", \"error\"), [\"Date Sent\"]=TimeGenerated",
"size": 0,
"noDataMessage": "This view requires to enable the Diagnostic setting as a pre-requisite. Please follow the instructions on this page to do so: https://learn.microsoft.com/en-us/azure/communication-services/concepts/analytics/enable-logging. Make sure to select these logs: \"Email Service Delivery Status Update Logs\", \"Email Service Send Mail logs\", \"Email Service User Engagement Logs\".",
"title": "Per-recipient Delivery Details",
"timeContextFromParameter": "time_range",
"queryType": 0,
Expand Down

0 comments on commit 1152918

Please sign in to comment.