From 888cfc53dada38364ccc39442625de8a83872a60 Mon Sep 17 00:00:00 2001 From: Xavier Garonnat Date: Tue, 11 May 2021 17:20:22 +0200 Subject: [PATCH] Allow empty environmentName for Data-related Added condition to support missing environmentName --- .../content/Data-related-TSG.ipynb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Data-related-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Data-related-TSG.ipynb index 0620ed5a..09b6f183 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Data-related-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Data-related-TSG.ipynb @@ -177,7 +177,7 @@ " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", " and customDimensions.aadTenantId == _aadTenantId\r\n", - " and customDimensions.environmentName == _environmentName\r\n", + " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0005'\r\n", "| summarize count() by bin(timestamp, 1d)\r\n", "| render timechart title= 'Number of long running SQL queries'" @@ -205,7 +205,7 @@ " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", " and customDimensions.aadTenantId == _aadTenantId\r\n", - " and customDimensions.environmentName == _environmentName\r\n", + " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0005'\r\n", " and customDimensions.alObjectId != '0'\r\n", "| extend sqlStatement = tostring(customDimensions.sqlStatement)\r\n", @@ -254,7 +254,7 @@ " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", " and customDimensions.aadTenantId == _aadTenantId\r\n", - " and customDimensions.environmentName == _environmentName\r\n", + " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0012'\r\n", "| summarize request_count=count() by bin(timestamp, 1d)\r\n", "| render timechart title= 'Number of database lock timeouts'" @@ -281,7 +281,7 @@ " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", " and customDimensions.aadTenantId == _aadTenantId\r\n", - " and customDimensions.environmentName == _environmentName\r\n", + " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0012'\r\n", "| extend sqlStatement = tostring(customDimensions.sqlStatement)\r\n", ", alObjectId = tostring(customDimensions.alObjectId)\r\n", @@ -333,7 +333,7 @@ " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", " and customDimensions.aadTenantId == _aadTenantId\r\n", - " and customDimensions.environmentName == _environmentName\r\n", + " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0006'\r\n", "| project numberOfRows = toint(customDimensions.numberOfRows)\r\n", ", sqlRowsRead = toint( customDimensions.sqlRowsRead )\r\n",