From e2bd49abdb4ff9f97d67fb2db2e01bedac6073a8 Mon Sep 17 00:00:00 2001 From: Kennie Nybo Pontoppidan Date: Wed, 22 Dec 2021 13:27:27 -0600 Subject: [PATCH] support for empty aad tenant id --- .../content/Data-related-TSG.ipynb | 480 ++- .../Deprecated-Webservice-protocols-TSG.ipynb | 300 +- .../content/Extensions-TSG.ipynb | 406 ++- .../content/Login-issues-TSG.ipynb | 2845 ++++++++++++++++- .../content/Microsoft-Connectors-TSG.ipynb | 762 ++++- .../content/Performance-overview-TSG.ipynb | 8 +- .../Performance-partner-code-TSG.ipynb | 1585 +++++++-- .../content/Web-services-TSG.ipynb | 2211 ++++++------- 8 files changed, 6668 insertions(+), 1929 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 1b2bb249..1d5ad0e8 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 @@ -1,76 +1,155 @@ { + "metadata": { + "kernelspec": { + "name": "python3", + "display_name": "Python 3 (ipykernel)", + "language": "python" + }, + "language_info": { + "name": "python", + "version": "3.8.10", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } + } + }, + "nbformat_minor": 2, + "nbformat": 4, "cells": [ { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" - }, "source": [ "# Dynamics 365 Business Central Troubleshooting Guide (TSG), data-related issues\n", "\n", "This notebook contains Kusto queries that can help getting to the root cause of an data-related issue for an environment. \n", "\n", "NB! Some of the signal used in this notebook is only available in newer versions of Business Central, so check the version of your environment if some sections do not return any data. The signal documentation states in which version a given signal was introduced.\n" - ] + ], + "metadata": { + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1c8ccef4-8850-4f44-8791-c79457fea419" - }, "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it?) and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" - ] + ], + "metadata": { + "azdata_cell_guid": "1c8ccef4-8850-4f44-8791-c79457fea419", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "5d02aa4b-9e41-474f-b643-2fbd482077af" - }, - "outputs": [], "source": [ "# load the KQLmagic module\n", "%reload_ext Kqlmagic" - ] + ], + "metadata": { + "azdata_cell_guid": "5d02aa4b-9e41-474f-b643-2fbd482077af", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 2 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] - }, - "outputs": [], "source": [ "# Connect to the Application Insights API\n", "%kql appinsights://appid='';appkey=''" - ] + ], + "metadata": { + "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 3 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" - }, "source": [ "## 2\\. Define filters\n", "\n", "This workbook is designed for troubleshooting a single environment. Please provide values for aadTenantId and environmentName (or use a config file)." - ] + ], + "metadata": { + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [ - "hide_input" - ] - }, - "outputs": [], "source": [ - "# TSG filter variables\n", + "# Add values for AAD tenant id, environment name, and date range.\n", + "# It is possible to leave the value for AAD tenant id or environment name blank (if you want to analyze across all values of the parameter)\n", "\n", "# You can either use configuration file (INI file format) or set filters directly. \n", "\n", @@ -80,13 +159,13 @@ "\n", "\n", "# Add AAD tenant id and environment name here\n", - "aadTenantId = \"MyaaDtenantId\"\n", - "environmentName = \"MyEnvironment\"\n", + "aadTenantId = \"\"\n", + "environmentName = \"\"\n", "\n", "# date filters for the analysis\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\n", - "startDate = \"2020-11-20\"\n", - "endDate = \"2020-11-24\"\n", + "startDate = \"2021-11-20\"\n", + "endDate = \"2022-01-01\"\n", "\n", "\n", "\n", @@ -115,25 +194,44 @@ "print(\"environmentName \" + environmentName)\n", "print(\"startDate \" + startDate)\n", "print(\"endDate \" + endDate)" - ] + ], + "metadata": { + "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nstartDate 2021-11-20\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 4 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" - }, "source": [ "# Analyze database usage\n", "Now you can run Kusto queries to look for possible root causes for issues about data.\n", "\n", "Either click **Run All** above to run all sections, or scroll down to the type of analysis you want to do and manually run queries" - ] + ], + "metadata": { + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" - }, "source": [ "## Long Running SQL Queries\n", "\n", @@ -142,16 +240,18 @@ "Database telemetry docs: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-long-running-sql-query-trace\n", "\n", "KQL samples: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Long%20Running%20SQL%20Queries.kql" - ] + ], + "metadata": { + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -162,20 +262,60 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0005'\n", "| summarize count() by bin(timestamp, 1d)\n", "| render timechart title= 'Number of long running SQL queries'" - ] + ], + "metadata": { + "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.897): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 5, + "output_type": "execute_result" + } + ], + "execution_count": 5 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "f1bfdf32-3d81-4365-be37-9fff41957aac" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -189,7 +329,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0005'\n", " and customDimensions.alObjectId != '0'\n", @@ -203,13 +343,86 @@ "| summarize count(), sumOfExecutionTimeInMS=sum(executionTimeInMS), medianExecutionTimeInMS=percentile(executionTimeInMS, 50) by alObjectId, alObjectName, extensionName\n", "| order by medianExecutionTimeInMS desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "f1bfdf32-3d81-4365-be37-9fff41957aac", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [alObjectId, alObjectName, extensionName, count_, sumOfExecutionTimeInMS, medianExecutionTimeInMS]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
alObjectIdalObjectNameextensionNamecount_sumOfExecutionTimeInMSmedianExecutionTimeInMS
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "extensionName", + "type": "string" + }, + { + "name": "count_", + "type": "integer" + }, + { + "name": "sumOfExecutionTimeInMS", + "type": "number" + }, + { + "name": "medianExecutionTimeInMS", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.959): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 6, + "output_type": "execute_result" + } + ], + "execution_count": 6 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "3583cd0b-94e2-456d-954a-4b592f4a9d73" - }, "source": [ "## Database locks\n", "\n", @@ -218,15 +431,18 @@ "Database locks telemetry docs: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-database-locks-trace\n", "\n", "KQL samples: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/LockTimeouts.kql\n" - ] + ], + "metadata": { + "azdata_cell_guid": "3583cd0b-94e2-456d-954a-4b592f4a9d73", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -237,20 +453,59 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0012'\n", "| summarize request_count=count() by bin(timestamp, 1d)\n", "| render timechart title= 'Number of database lock timeouts'" - ] + ], + "metadata": { + "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.618): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 7, + "output_type": "execute_result" + } + ], + "execution_count": 7 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "803ac61e-3400-4aae-9e59-9b80e7df06bc" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -264,7 +519,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0012'\n", "| extend sqlStatement = tostring(customDimensions.sqlStatement)\n", @@ -275,13 +530,20 @@ "| summarize count() by alObjectId, alObjectName, extensionName\n", "| order by count_ desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "803ac61e-3400-4aae-9e59-9b80e7df06bc", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "76e60e16-40e3-4819-9e78-bfbe04a3cd0b" - }, "source": [ "## Reports\n", "\n", @@ -292,15 +554,18 @@ "KQL samples: \n", "* https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Reports.kql\n", "* https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/PerformanceTuning/ReportExecution.kql" - ] + ], + "metadata": { + "azdata_cell_guid": "76e60e16-40e3-4819-9e78-bfbe04a3cd0b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "73449c15-26aa-49b6-94a9-3d2f8608380d" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -316,7 +581,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0006'\n", "| project numberOfRows = toint(customDimensions.numberOfRows)\n", @@ -331,28 +596,17 @@ ", datasetratio = toreal(totalRows)/totalSQLExecutes\n", "| order by sqlratio asc\n", "| limit 10" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 + ], + "metadata": { + "azdata_cell_guid": "73449c15-26aa-49b6-94a9-3d2f8608380d", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" + "outputs": [], + "execution_count": null } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + ] +} \ No newline at end of file diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Deprecated-Webservice-protocols-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Deprecated-Webservice-protocols-TSG.ipynb index 9da6c713..166751cc 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Deprecated-Webservice-protocols-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Deprecated-Webservice-protocols-TSG.ipynb @@ -1,10 +1,34 @@ { + "metadata": { + "kernelspec": { + "name": "python3", + "display_name": "Python 3 (ipykernel)", + "language": "python" + }, + "language_info": { + "name": "python", + "version": "3.8.10", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } + } + }, + "nbformat_minor": 2, + "nbformat": 4, "cells": [ { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" - }, "source": [ "# Dynamics 365 Business Central Troubleshooting Guide (TSG) - Usage of deprecated web service protocols\n", "\n", @@ -13,64 +37,121 @@ "NB! The signal used in this notebook is only available in versions 16.1 (or newer) of Business Central, so check the version of your environment if you don't see any data.\n", "\n", "Web service request signal is documented here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace " - ] + ], + "metadata": { + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046" - }, "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it? Install instructions: https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides) and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" - ] + ], + "metadata": { + "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "2215d24c-babd-46aa-a4f6-6988159487c7" - }, - "outputs": [], "source": [ "# load the KQLmagic module\n", "%reload_ext Kqlmagic" - ] + ], + "metadata": { + "azdata_cell_guid": "2215d24c-babd-46aa-a4f6-6988159487c7", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 1 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] - }, - "outputs": [], "source": [ "# Connect to the Application Insights API\n", "%kql appinsights://appid='';appkey=''" - ] + ], + "metadata": { + "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 2 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" - }, "source": [ "## 2\\. Define filters\n", "\n", "This workbook is designed for troubleshooting environments in an AAD subscription. Please provide values for aadTenantId below (or use a config file)." - ] + ], + "metadata": { + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [] - }, - "outputs": [], "source": [ - "# TSG filter variables\n", + "# Add values for AAD tenant id, environment name, and date range.\n", + "# It is possible to leave the value for AAD tenant id or environment name blank (if you want to analyze across all values of the parameter)\n", "\n", "# You can either use configuration file (INI file format) or set filters directly. \n", "\n", @@ -79,15 +160,14 @@ "configFile = \"c:\\\\tmp\\\\notebook.ini\"\n", "\n", "\n", - "# Add AAD tenant id and environment name here\n", - "aadTenantId = \"MyaaDtenantId\"\n", - "environmentName = \"MyEnvironment\"\n", + "# Add AAD tenant id and environment name here (or leave blank)\n", + "aadTenantId = \"\"\n", + "environmentName = \"\"\n", "\n", "# date filters for the analysis\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\n", - "startDate = \"2020-11-20\"\n", - "endDate = \"2020-11-24\"\n", - "\n", + "startDate = \"2021-11-20\"\n", + "endDate = \"2022-01-01\"\n", "\n", "\n", "\n", @@ -115,13 +195,29 @@ "print(\"environmentName \" + environmentName)\n", "print(\"startDate \" + startDate)\n", "print(\"endDate \" + endDate)" - ] + ], + "metadata": { + "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", + "tags": [ + "hide_input" + ], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nstartDate 2021-11-20\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 3 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" - }, "source": [ "# Analyze usage of web services\n", "\n", @@ -132,28 +228,35 @@ "KQL samples\n", "* https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/WebServiceCalls.kql\n", "* https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/DeprecatedWebServiceProtocols.kql" - ] + ], + "metadata": { + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "810235a1-c202-47a2-b9dc-4d4d1ffd123c" - }, "source": [ "## Request stats (last 30 days)\n", "The first report shows statistics for all categories.\n", "\n", "The second report shows statistics only for deprecated categories.\n" - ] + ], + "metadata": { + "azdata_cell_guid": "810235a1-c202-47a2-b9dc-4d4d1ffd123c", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "6426410c-182a-486c-8466-228cb9ce3228", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -161,21 +264,27 @@ "traces\n", "| where 1==1 \n", " and timestamp > ago(30d)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", "| extend category = tostring( customDimensions.category )\n", "| summarize request_count=count() by category, bin(timestamp, 1d)\n", "| render timechart title= 'Number of web service requests by category (ODatav4, ODatav3, SOAP, API)'" - ] - }, - { - "cell_type": "code", - "execution_count": null, + ], "metadata": { - "azdata_cell_guid": "2da40a82-82ec-44a2-b13b-6086e11cdfb0" + "azdata_cell_guid": "6426410c-182a-486c-8466-228cb9ce3228", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], + "execution_count": null + }, + { + "cell_type": "code", "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -183,34 +292,43 @@ "traces\n", "| where 1==1 \n", " and timestamp > ago(30d)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV3'\n", "| extend category = tostring( customDimensions.category )\n", "| summarize request_count=count() by category, bin(timestamp, 1d)\n", "| render timechart title= 'Number of web service requests by category (deprecated categories)'" - ] + ], + "metadata": { + "azdata_cell_guid": "2da40a82-82ec-44a2-b13b-6086e11cdfb0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" - }, "source": [ "## Web service endpoints using deprecated protocols\n", "\n", "The following endpoints are exposed ad web service endpoints using a deprecated protocol (query shows the first 100)" - ] + ], + "metadata": { + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -218,7 +336,7 @@ "traces\n", "| where 1==1 \n", " and timestamp > ago(30d)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV3'\n", @@ -231,28 +349,18 @@ " , category \n", " , endpoint\n", "| limit 100" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 + ], + "metadata": { + "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" + "outputs": [], + "execution_count": null } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + ] +} \ No newline at end of file diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Extensions-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Extensions-TSG.ipynb index dc5ef31b..10624344 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Extensions-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Extensions-TSG.ipynb @@ -1,77 +1,160 @@ { + "metadata": { + "kernelspec": { + "name": "python3", + "display_name": "Python 3 (ipykernel)", + "language": "python" + }, + "language_info": { + "name": "python", + "version": "3.8.10", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } + } + }, + "nbformat_minor": 2, + "nbformat": 4, "cells": [ { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" - }, "source": [ "# Dynamics 365 Business Central Troubleshooting Guide (TSG) - Extensions\n", "\n", "This notebook contains Kusto queries that can help getting to the root cause of an issue with extensions for one or more environments. \n", "\n", "NB! Some of the signal used in this notebook is only available in newer versions of Business Central, so check the version of your environment if some sections do not return any data. The signal documentation states in which version a given signal was introduced." - ] + ], + "metadata": { + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046" - }, "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", - "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it? Install instructions: https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides) and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" - ] + "\n", + "First you need to set the notebook Kernel to Python3, \n", + "\n", + "load the KQLmagic module (did you install it? If not, go here to get install instructions  https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides) \n", + "\n", + "and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" + ], + "metadata": { + "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "attachments": {} }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "5d02aa4b-9e41-474f-b643-2fbd482077af" - }, - "outputs": [], "source": [ "# load the KQLmagic module\n", "%reload_ext Kqlmagic" - ] + ], + "metadata": { + "azdata_cell_guid": "5d02aa4b-9e41-474f-b643-2fbd482077af", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 5 }, { "cell_type": "code", - "execution_count": null, + "source": [ + "# Connect to the Application Insights API\n", + "%kql appinsights://appid='';appkey=''" + ], "metadata": { "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "source": [ - "# Connect to the Application Insights API\n", - "%kql appinsights://appid='';appkey=''\n", - "\n" - ] + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 2 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" - }, "source": [ "## 2\\. Define filters\n", "\n", "This workbook is designed for troubleshooting extensions. Please provide values for aadTenantId, environmentName, and extensionId (or use a config file).\n", "\n", "You can also specify limits to the period of time that the analysis should include." - ] + ], + "metadata": { + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [ - "hide_input" - ] - }, - "outputs": [], "source": [ "# Add values for AAD tenant id, environment name, and extension id.\n", "# It is possible to leave one or more values blank (if you want to analyze across all values of the parameter)\n", @@ -83,16 +166,15 @@ "configFile = \"c:\\\\tmp\\\\notebook.ini\"\n", "\n", "\n", - "# Add AAD tenant id and environment name here\n", - "aadTenantId = \"MyaaDtenantId\"\n", - "environmentName = \"MyEnvironmentName\"\n", - "extensionId = \"MyExtensionId\"\n", + "# Add AAD tenant id and environment name here (or leave blank)\n", + "aadTenantId = \"\"\n", + "environmentName = \"\"\n", + "extensionId = \"\"\n", "\n", "# date filters for the analysis\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\n", - "startDate = \"2020-11-20\"\n", - "endDate = \"2020-11-24\"\n", - "\n", + "startDate = \"2021-11-20\"\n", + "endDate = \"2022-01-01\"\n", "\n", "\n", "\n", @@ -121,25 +203,46 @@ "print(\"extensionId \" + extensionId)\n", "print(\"startDate \" + startDate)\n", "print(\"endDate \" + endDate)" - ] + ], + "metadata": { + "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", + "tags": [ + "hide_input" + ], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nextensionId \nstartDate 2021-11-20\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 3 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" - }, "source": [ "# Analyze extension events\n", "Now you can run Kusto queries to look for possible root causes for issues about extensions.\n", "\n", "Either click **Run All** above to run all sections, or scroll down to the type of analysis you want to do and manually run queries" - ] + ], + "metadata": { + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" - }, "source": [ "## Extension event overview\n", "\n", @@ -148,16 +251,18 @@ "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-extension-update-trace\n", "\n", "KQL samples: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/ExtensionLifecycle.kql" - ] + ], + "metadata": { + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -200,15 +305,55 @@ "| summarize count=count() by eventType=eventMessageShort\n", "| order by eventType\n", "| render barchart with (title='Extension lifecycle event overview', legend=hidden)" - ] + ], + "metadata": { + "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.420): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 4, + "output_type": "execute_result" + } + ], + "execution_count": 4 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -252,29 +397,38 @@ "| project timestamp, eventMessageShort, extensionName, aadTenantId, environmentName, extensionId\n", "| order by aadTenantId, environmentName, extensionId, timestamp asc\n", "| limit 100" - ] + ], + "metadata": { + "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b" - }, "source": [ "## Extension failures\n", "\n", "Event telemetry docs: \n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-extension-lifecycle-trace\n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-extension-update-trace" - ] + ], + "metadata": { + "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -311,15 +465,21 @@ "| summarize count=count() by eventType=eventMessageShort\n", "| order by eventType\n", "| render barchart with (title='Failure type overview', xtitle=\"\", legend=hidden)" - ] - }, - { - "cell_type": "code", - "execution_count": null, + ], "metadata": { - "azdata_cell_guid": "0b53c769-10f8-4343-a89f-fc4cd110d0fa" + "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], + "execution_count": null + }, + { + "cell_type": "code", "source": [ "%%kql\n", "//\n", @@ -360,15 +520,20 @@ ", aadTenantId, environmentName, extensionId\n", "| order by timestamp desc\n", "| limit 100" - ] - }, - { - "cell_type": "code", - "execution_count": null, + ], "metadata": { - "azdata_cell_guid": "575c7fec-cefd-49f0-b7ef-32c11a505e2f" + "azdata_cell_guid": "0b53c769-10f8-4343-a89f-fc4cd110d0fa", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], + "execution_count": null + }, + { + "cell_type": "code", "source": [ "%%kql\n", "//\n", @@ -402,15 +567,20 @@ ", aadTenantId, environmentName, extensionId\n", "| order by timestamp desc\n", "| limit 20" - ] - }, - { - "cell_type": "code", - "execution_count": null, + ], "metadata": { - "azdata_cell_guid": "802147b9-f824-4736-91a8-3b0614a44357" + "azdata_cell_guid": "575c7fec-cefd-49f0-b7ef-32c11a505e2f", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], + "execution_count": null + }, + { + "cell_type": "code", "source": [ "%%kql\n", "//\n", @@ -444,15 +614,20 @@ ", aadTenantId, environmentName, extensionId\n", "| order by timestamp desc\n", "| limit 20" - ] - }, - { - "cell_type": "code", - "execution_count": null, + ], "metadata": { - "azdata_cell_guid": "8c69c428-9aac-4e76-b79a-b9654839ab38" + "azdata_cell_guid": "802147b9-f824-4736-91a8-3b0614a44357", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], + "execution_count": null + }, + { + "cell_type": "code", "source": [ "%%kql\n", "//\n", @@ -487,28 +662,17 @@ ", aadTenantId, environmentName, extensionId\n", "| order by timestamp desc\n", "| limit 20" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 + ], + "metadata": { + "azdata_cell_guid": "8c69c428-9aac-4e76-b79a-b9654839ab38", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" + "outputs": [], + "execution_count": null } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + ] +} \ No newline at end of file diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Login-issues-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Login-issues-TSG.ipynb index 0e30fd4a..363ee17e 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Login-issues-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Login-issues-TSG.ipynb @@ -2,12 +2,12 @@ "metadata": { "kernelspec": { "name": "python3", - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python" }, "language_info": { "name": "python", - "version": "3.6.6", + "version": "3.8.10", "mimetype": "text/x-python", "codemirror_mode": { "name": "ipython", @@ -16,6 +16,12 @@ "pygments_lexer": "ipython3", "nbconvert_exporter": "python", "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } } }, "nbformat_minor": 2, @@ -31,7 +37,12 @@ "NB! The signal used in this notebook is only available in version 16.2 (or newer) of Business Central online, so check the version of your environment." ], "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { @@ -39,9 +50,14 @@ "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it? ) and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" - ],Install instructions: https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides + ], "metadata": { - "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046" + "extensions": { + "azuredatastudio": { + "views": [] + } + }, + "azdata_cell_guid": "79148a67-d690-45c0-827b-e7c5a49ee2d2" } }, { @@ -52,10 +68,40 @@ ], "metadata": { "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 14 }, { "cell_type": "code", @@ -64,10 +110,15 @@ "%kql appinsights://appid='';appkey=''" ], "metadata": { - "azdata_cell_guid": "76c5fa02-b403-4c57-8c7d-3150e9d4270a" + "azdata_cell_guid": "76c5fa02-b403-4c57-8c7d-3150e9d4270a", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], - "execution_count": null + "execution_count": 15 }, { "cell_type": "markdown", @@ -77,31 +128,35 @@ "This workbook is designed for troubleshooting a single environment. Please provide values for aadTenantId and environmentName (or use a config file)." ], "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { "cell_type": "code", "source": [ "# Add values for AAD tenant id, environment name, and date range.\r\n", - "# It is possible to leave the value for environment name blank (if you want to analyze across all values of the parameter)\r\n", + "# It is possible to leave the value for AAD tenant id or environment name blank (if you want to analyze across all values of the parameter)\r\n", "\r\n", "# You can either use configuration file (INI file format) or set filters directly. \r\n", "\r\n", "# If you specify a config file, then variables set here takes precedence over manually set filter variables\r\n", "# config file name and directory (full path)\r\n", - "configFile = \"c:\\tmp\\notebook.ini\"\r\n", + "configFile = \"c:\\\\tmp\\\\notebook.ini\"\r\n", "\r\n", "\r\n", - "# Add AAD tenant id and environment name here\r\n", - "aadTenantId = \"MyaaDtenantId\"\r\n", + "# Add AAD tenant id and environment name here (or leave blank)\r\n", + "aadTenantId = \"\"\r\n", "environmentName = \"\"\r\n", - "extensionId = \"MyExtensionId\"\r\n", "\r\n", "# date filters for the analysis\r\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\r\n", - "startDate = \"2020-11-20\"\r\n", - "endDate = \"2020-11-24\"\r\n", + "startDate = \"2021-11-01\"\r\n", + "endDate = \"2022-01-01\"\r\n", "\r\n", "\r\n", "\r\n", @@ -133,10 +188,21 @@ ], "metadata": { "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nstartDate 2021-11-01\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 16 }, { "cell_type": "markdown", @@ -151,7 +217,12 @@ "Kusto sample: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Authorization.kql" ], "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { @@ -166,7 +237,12 @@ "Read more in the Security Guide here: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/security/security-application#authentication" ], "metadata": { - "azdata_cell_guid": "810235a1-c202-47a2-b9dc-4d4d1ffd123c" + "azdata_cell_guid": "810235a1-c202-47a2-b9dc-4d4d1ffd123c", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { @@ -181,17 +257,56 @@ "| where 1==1 \r\n", " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", - " and customDimensions.aadTenantId == _aadTenantId\r\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\r\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId in ('RT0001', 'RT0003' )\r\n", "| summarize request_count=count() by bin(timestamp, 1h) | render timechart title= 'Number of pre-open company authorization attempts in the last day'" ], "metadata": { "azdata_cell_guid": "6426410c-182a-486c-8466-228cb9ce3228", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.285): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 17, + "output_type": "execute_result" + } + ], + "execution_count": 17 }, { "cell_type": "markdown", @@ -207,7 +322,12 @@ "Kusto query: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Authorization.kql" ], "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { @@ -222,7 +342,7 @@ "| where 1==1 \r\n", " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", - " and customDimensions.aadTenantId == _aadTenantId\r\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\r\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0001'\r\n", "| project timestamp\r\n", @@ -235,10 +355,77 @@ ], "metadata": { "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [timestamp, guestUser, userType, failureReason, entitlementSetIds]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
timestampguestUseruserTypefailureReasonentitlementSetIds
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "timestamp", + "type": "datetime" + }, + { + "name": "guestUser", + "type": "string" + }, + { + "name": "userType", + "type": "string" + }, + { + "name": "failureReason", + "type": "string" + }, + { + "name": "entitlementSetIds", + "type": "string" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.123): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 18, + "output_type": "execute_result" + } + ], + "execution_count": 18 }, { "cell_type": "markdown", @@ -258,7 +445,12 @@ "" ], "metadata": { - "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b" + "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { @@ -273,7 +465,7 @@ "| where 1==1 \r\n", " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", - " and customDimensions.aadTenantId == _aadTenantId\r\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\r\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0002'\r\n", "| project timestamp\r\n", @@ -285,10 +477,73 @@ ], "metadata": { "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [timestamp, clientType, companyName, failureReason]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n
timestampclientTypecompanyNamefailureReason
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "timestamp", + "type": "datetime" + }, + { + "name": "clientType", + "type": "string" + }, + { + "name": "companyName", + "type": "string" + }, + { + "name": "failureReason", + "type": "string" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.971): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 19, + "output_type": "execute_result" + } + ], + "execution_count": 19 }, { "cell_type": "markdown", @@ -302,7 +557,12 @@ "Kusto query: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Authorization.kql" ], "metadata": { - "azdata_cell_guid": "7ed10cbf-6380-4591-ad66-8dc6b886ba48" + "azdata_cell_guid": "7ed10cbf-6380-4591-ad66-8dc6b886ba48", + "extensions": { + "azuredatastudio": { + "views": [] + } + } } }, { @@ -317,7 +577,7 @@ "| where 1==1 \r\n", " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", - " and customDimensions.aadTenantId == _aadTenantId\r\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\r\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0004'\r\n", "| project timestamp\r\n", @@ -328,10 +588,561 @@ "| limit 100" ], "metadata": { - "azdata_cell_guid": "f8e7955e-2b86-410b-98ad-f4979d85e879" + "azdata_cell_guid": "f8e7955e-2b86-410b-98ad-f4979d85e879", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": " timestamp clientType companyName \\\n0 2021-12-09 01:09:28.184000+00:00 ChildSession CRONUS International Ltd. \n1 2021-12-09 01:09:27.152000+00:00 Background CRONUS International Ltd. \n2 2021-12-09 01:09:19.149000+00:00 WebClient CRONUS International Ltd. \n3 2021-11-10 12:57:52.906000+00:00 Background CRONUS International Ltd. \n4 2021-11-10 12:57:50.094000+00:00 Background CRONUS International Ltd. \n5 2021-11-10 12:57:50.094000+00:00 Background CRONUS International Ltd. \n6 2021-11-08 20:46:53.175000+00:00 Background CRONUS International Ltd. \n7 2021-11-08 20:46:50.644000+00:00 Background CRONUS International Ltd. \n8 2021-11-08 20:46:50.644000+00:00 Background CRONUS International Ltd. \n9 2021-11-07 20:57:01.501000+00:00 Background CRONUS International Ltd. \n10 2021-11-07 20:56:27.433000+00:00 Background CRONUS International Ltd. \n11 2021-11-07 20:56:19.999000+00:00 WebClient CRONUS International Ltd. \n12 2021-11-06 19:47:25.658000+00:00 Background CRONUS International Ltd. \n13 2021-11-06 19:47:22.754000+00:00 Background CRONUS International Ltd. \n14 2021-11-06 19:47:22.754000+00:00 Background CRONUS International Ltd. \n15 2021-11-05 19:47:16.331000+00:00 Background CRONUS International Ltd. \n16 2021-11-05 19:47:11.347000+00:00 Background CRONUS International Ltd. \n17 2021-11-05 19:47:10.330000+00:00 Background CRONUS International Ltd. \n18 2021-11-05 14:18:23.665000+00:00 ChildSession CRONUS International Ltd. \n19 2021-11-05 14:18:15.574000+00:00 WebClient CRONUS International Ltd. \n20 2021-11-05 13:53:07.551000+00:00 ChildSession CRONUS International Ltd. \n21 2021-11-05 13:53:06.854000+00:00 WebClient CRONUS International Ltd. \n22 2021-11-05 13:24:12.246000+00:00 ChildSession CRONUS International Ltd. \n23 2021-11-05 13:24:11.238000+00:00 Background CRONUS International Ltd. \n24 2021-11-05 13:24:01.747000+00:00 WebClient CRONUS International Ltd. \n25 2021-11-04 22:59:47.746000+00:00 ChildSession CRONUS International Ltd. \n26 2021-11-04 22:59:41.121000+00:00 WebClient CRONUS International Ltd. \n27 2021-11-04 22:47:28.643000+00:00 ChildSession CRONUS International Ltd. \n28 2021-11-04 22:47:20.052000+00:00 WebClient CRONUS International Ltd. \n29 2021-11-04 22:37:37.597000+00:00 ChildSession CRONUS International Ltd. \n30 2021-11-04 22:37:29.240000+00:00 WebClient CRONUS International Ltd. \n31 2021-11-04 22:28:34.023000+00:00 ChildSession CRONUS International Ltd. \n32 2021-11-04 22:28:27.266000+00:00 WebClient CRONUS International Ltd. \n33 2021-11-04 22:16:42.522000+00:00 ChildSession CRONUS International Ltd. \n34 2021-11-04 22:16:42.409000+00:00 Background CRONUS International Ltd. \n35 2021-11-04 22:16:32.931000+00:00 WebClient CRONUS International Ltd. \n36 2021-11-04 21:28:13.384000+00:00 ChildSession CRONUS International Ltd. \n37 2021-11-04 21:28:05.064000+00:00 WebClient CRONUS International Ltd. \n38 2021-11-04 21:15:54.824000+00:00 ChildSession CRONUS International Ltd. \n39 2021-11-04 21:15:53.908000+00:00 WebClient CRONUS International Ltd. \n40 2021-11-04 20:50:45.240000+00:00 ChildSession CRONUS International Ltd. \n41 2021-11-04 20:50:44.878000+00:00 Background CRONUS International Ltd. \n42 2021-11-04 20:50:36.816000+00:00 WebClient CRONUS International Ltd. \n43 2021-11-04 20:38:55.944000+00:00 ChildSession CRONUS International Ltd. \n44 2021-11-04 20:38:47.363000+00:00 WebClient CRONUS International Ltd. \n45 2021-11-04 20:22:36.833000+00:00 ChildSession CRONUS International Ltd. \n46 2021-11-04 20:22:29.759000+00:00 WebClient CRONUS International Ltd. \n47 2021-11-04 20:13:47.862000+00:00 ChildSession CRONUS International Ltd. \n48 2021-11-04 20:13:41.410000+00:00 WebClient CRONUS International Ltd. \n49 2021-11-04 20:10:33.756000+00:00 ChildSession CRONUS International Ltd. \n50 2021-11-04 20:10:26.349000+00:00 WebClient CRONUS International Ltd. \n51 2021-11-04 20:02:44.231000+00:00 ChildSession CRONUS International Ltd. \n52 2021-11-04 20:02:35.894000+00:00 WebClient CRONUS International Ltd. \n53 2021-11-04 19:49:48.339000+00:00 ChildSession CRONUS International Ltd. \n54 2021-11-04 19:49:47.678000+00:00 Background CRONUS International Ltd. \n55 2021-11-04 19:49:43.128000+00:00 WebClient CRONUS International Ltd. \n56 2021-11-04 19:48:56.900000+00:00 WebClient CRONUS International Ltd. \n57 2021-11-04 19:47:10.167000+00:00 Background CRONUS International Ltd. \n58 2021-11-04 19:46:55.543000+00:00 Background CRONUS International Ltd. \n59 2021-11-04 19:46:55.543000+00:00 Background CRONUS International Ltd. \n60 2021-11-04 00:33:01.987000+00:00 ChildSession CRONUS International Ltd. \n61 2021-11-04 00:33:01.869000+00:00 ChildSession CRONUS International Ltd. \n62 2021-11-04 00:31:56.281000+00:00 ChildSession CRONUS International Ltd. \n63 2021-11-04 00:31:55.751000+00:00 ChildSession CRONUS International Ltd. \n64 2021-11-04 00:28:47.760000+00:00 ChildSession CRONUS International Ltd. \n65 2021-11-04 00:28:31.735000+00:00 ChildSession CRONUS International Ltd. \n66 2021-11-04 00:26:59.713000+00:00 Background CRONUS International Ltd. \n67 2021-11-04 00:25:29.220000+00:00 ChildSession CRONUS International Ltd. \n68 2021-11-04 00:25:28.375000+00:00 WebClient CRONUS International Ltd. \n69 2021-11-03 21:47:36.066000+00:00 ChildSession CRONUS International Ltd. \n70 2021-11-03 21:41:55.925000+00:00 ChildSession CRONUS International Ltd. \n71 2021-11-03 21:41:49.311000+00:00 WebClient CRONUS International Ltd. \n72 2021-11-03 21:28:19.710000+00:00 ChildSession CRONUS International Ltd. \n73 2021-11-03 21:28:11.609000+00:00 WebClient CRONUS International Ltd. \n74 2021-11-03 21:19:42.041000+00:00 Background CRONUS International Ltd. \n75 2021-11-03 21:19:41.503000+00:00 ChildSession CRONUS International Ltd. \n76 2021-11-03 21:19:33.181000+00:00 WebClient CRONUS International Ltd. \n77 2021-11-03 21:07:56.466000+00:00 WebClient CRONUS International Ltd. \n78 2021-11-03 18:48:38.293000+00:00 ChildSession CRONUS International Ltd. \n79 2021-11-03 18:48:36.903000+00:00 Background CRONUS International Ltd. \n80 2021-11-03 18:48:29.736000+00:00 WebClient CRONUS International Ltd. \n\n totalTimeInMS \n0 1.1000 \n1 12.1472 \n2 6667.4392 \n3 3.6174 \n4 10630.9501 \n5 10630.4960 \n6 2.9601 \n7 7418.9702 \n8 7419.8216 \n9 2.2338 \n10 2.5455 \n11 1417.9688 \n12 3.4127 \n13 8004.4742 \n14 4615.7110 \n15 2.2262 \n16 2.4030 \n17 2.4149 \n18 1.8854 \n19 5852.6887 \n20 0.9626 \n21 15.5036 \n22 1.2263 \n23 2.7740 \n24 7774.5011 \n25 2.2452 \n26 2062.1776 \n27 2.2991 \n28 6226.3184 \n29 2.4109 \n30 6388.3745 \n31 1.1498 \n32 2061.2965 \n33 3.9756 \n34 4.0417 \n35 6184.5094 \n36 1.5353 \n37 6334.5836 \n38 1.6419 \n39 18.1752 \n40 1.6359 \n41 3.3164 \n42 6208.6195 \n43 1.7878 \n44 6226.6466 \n45 1.3560 \n46 2260.5106 \n47 2.0798 \n48 1960.3236 \n49 1.9356 \n50 2222.0690 \n51 1.8139 \n52 6198.9818 \n53 1.6727 \n54 2.8682 \n55 17.7290 \n56 1752.0612 \n57 5.7779 \n58 7439.8989 \n59 7439.2164 \n60 1.3293 \n61 1.2958 \n62 1.4723 \n63 1.4840 \n64 1.4300 \n65 1.3319 \n66 2.4542 \n67 1.4560 \n68 52.5328 \n69 1.5168 \n70 1.2051 \n71 5938.1929 \n72 1.8020 \n73 6925.6148 \n74 2.5002 \n75 1.8348 \n76 1896.3355 \n77 7108.7523 \n78 1.0436 \n79 1.9697 \n80 1952.3829 ", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
timestampclientTypecompanyNametotalTimeInMS
02021-12-09 01:09:28.184000+00:00ChildSessionCRONUS International Ltd.1.1000
12021-12-09 01:09:27.152000+00:00BackgroundCRONUS International Ltd.12.1472
22021-12-09 01:09:19.149000+00:00WebClientCRONUS International Ltd.6667.4392
32021-11-10 12:57:52.906000+00:00BackgroundCRONUS International Ltd.3.6174
42021-11-10 12:57:50.094000+00:00BackgroundCRONUS International Ltd.10630.9501
52021-11-10 12:57:50.094000+00:00BackgroundCRONUS International Ltd.10630.4960
62021-11-08 20:46:53.175000+00:00BackgroundCRONUS International Ltd.2.9601
72021-11-08 20:46:50.644000+00:00BackgroundCRONUS International Ltd.7418.9702
82021-11-08 20:46:50.644000+00:00BackgroundCRONUS International Ltd.7419.8216
92021-11-07 20:57:01.501000+00:00BackgroundCRONUS International Ltd.2.2338
102021-11-07 20:56:27.433000+00:00BackgroundCRONUS International Ltd.2.5455
112021-11-07 20:56:19.999000+00:00WebClientCRONUS International Ltd.1417.9688
122021-11-06 19:47:25.658000+00:00BackgroundCRONUS International Ltd.3.4127
132021-11-06 19:47:22.754000+00:00BackgroundCRONUS International Ltd.8004.4742
142021-11-06 19:47:22.754000+00:00BackgroundCRONUS International Ltd.4615.7110
152021-11-05 19:47:16.331000+00:00BackgroundCRONUS International Ltd.2.2262
162021-11-05 19:47:11.347000+00:00BackgroundCRONUS International Ltd.2.4030
172021-11-05 19:47:10.330000+00:00BackgroundCRONUS International Ltd.2.4149
182021-11-05 14:18:23.665000+00:00ChildSessionCRONUS International Ltd.1.8854
192021-11-05 14:18:15.574000+00:00WebClientCRONUS International Ltd.5852.6887
202021-11-05 13:53:07.551000+00:00ChildSessionCRONUS International Ltd.0.9626
212021-11-05 13:53:06.854000+00:00WebClientCRONUS International Ltd.15.5036
222021-11-05 13:24:12.246000+00:00ChildSessionCRONUS International Ltd.1.2263
232021-11-05 13:24:11.238000+00:00BackgroundCRONUS International Ltd.2.7740
242021-11-05 13:24:01.747000+00:00WebClientCRONUS International Ltd.7774.5011
252021-11-04 22:59:47.746000+00:00ChildSessionCRONUS International Ltd.2.2452
262021-11-04 22:59:41.121000+00:00WebClientCRONUS International Ltd.2062.1776
272021-11-04 22:47:28.643000+00:00ChildSessionCRONUS International Ltd.2.2991
282021-11-04 22:47:20.052000+00:00WebClientCRONUS International Ltd.6226.3184
292021-11-04 22:37:37.597000+00:00ChildSessionCRONUS International Ltd.2.4109
302021-11-04 22:37:29.240000+00:00WebClientCRONUS International Ltd.6388.3745
312021-11-04 22:28:34.023000+00:00ChildSessionCRONUS International Ltd.1.1498
322021-11-04 22:28:27.266000+00:00WebClientCRONUS International Ltd.2061.2965
332021-11-04 22:16:42.522000+00:00ChildSessionCRONUS International Ltd.3.9756
342021-11-04 22:16:42.409000+00:00BackgroundCRONUS International Ltd.4.0417
352021-11-04 22:16:32.931000+00:00WebClientCRONUS International Ltd.6184.5094
362021-11-04 21:28:13.384000+00:00ChildSessionCRONUS International Ltd.1.5353
372021-11-04 21:28:05.064000+00:00WebClientCRONUS International Ltd.6334.5836
382021-11-04 21:15:54.824000+00:00ChildSessionCRONUS International Ltd.1.6419
392021-11-04 21:15:53.908000+00:00WebClientCRONUS International Ltd.18.1752
402021-11-04 20:50:45.240000+00:00ChildSessionCRONUS International Ltd.1.6359
412021-11-04 20:50:44.878000+00:00BackgroundCRONUS International Ltd.3.3164
422021-11-04 20:50:36.816000+00:00WebClientCRONUS International Ltd.6208.6195
432021-11-04 20:38:55.944000+00:00ChildSessionCRONUS International Ltd.1.7878
442021-11-04 20:38:47.363000+00:00WebClientCRONUS International Ltd.6226.6466
452021-11-04 20:22:36.833000+00:00ChildSessionCRONUS International Ltd.1.3560
462021-11-04 20:22:29.759000+00:00WebClientCRONUS International Ltd.2260.5106
472021-11-04 20:13:47.862000+00:00ChildSessionCRONUS International Ltd.2.0798
482021-11-04 20:13:41.410000+00:00WebClientCRONUS International Ltd.1960.3236
492021-11-04 20:10:33.756000+00:00ChildSessionCRONUS International Ltd.1.9356
502021-11-04 20:10:26.349000+00:00WebClientCRONUS International Ltd.2222.0690
512021-11-04 20:02:44.231000+00:00ChildSessionCRONUS International Ltd.1.8139
522021-11-04 20:02:35.894000+00:00WebClientCRONUS International Ltd.6198.9818
532021-11-04 19:49:48.339000+00:00ChildSessionCRONUS International Ltd.1.6727
542021-11-04 19:49:47.678000+00:00BackgroundCRONUS International Ltd.2.8682
552021-11-04 19:49:43.128000+00:00WebClientCRONUS International Ltd.17.7290
562021-11-04 19:48:56.900000+00:00WebClientCRONUS International Ltd.1752.0612
572021-11-04 19:47:10.167000+00:00BackgroundCRONUS International Ltd.5.7779
582021-11-04 19:46:55.543000+00:00BackgroundCRONUS International Ltd.7439.8989
592021-11-04 19:46:55.543000+00:00BackgroundCRONUS International Ltd.7439.2164
602021-11-04 00:33:01.987000+00:00ChildSessionCRONUS International Ltd.1.3293
612021-11-04 00:33:01.869000+00:00ChildSessionCRONUS International Ltd.1.2958
622021-11-04 00:31:56.281000+00:00ChildSessionCRONUS International Ltd.1.4723
632021-11-04 00:31:55.751000+00:00ChildSessionCRONUS International Ltd.1.4840
642021-11-04 00:28:47.760000+00:00ChildSessionCRONUS International Ltd.1.4300
652021-11-04 00:28:31.735000+00:00ChildSessionCRONUS International Ltd.1.3319
662021-11-04 00:26:59.713000+00:00BackgroundCRONUS International Ltd.2.4542
672021-11-04 00:25:29.220000+00:00ChildSessionCRONUS International Ltd.1.4560
682021-11-04 00:25:28.375000+00:00WebClientCRONUS International Ltd.52.5328
692021-11-03 21:47:36.066000+00:00ChildSessionCRONUS International Ltd.1.5168
702021-11-03 21:41:55.925000+00:00ChildSessionCRONUS International Ltd.1.2051
712021-11-03 21:41:49.311000+00:00WebClientCRONUS International Ltd.5938.1929
722021-11-03 21:28:19.710000+00:00ChildSessionCRONUS International Ltd.1.8020
732021-11-03 21:28:11.609000+00:00WebClientCRONUS International Ltd.6925.6148
742021-11-03 21:19:42.041000+00:00BackgroundCRONUS International Ltd.2.5002
752021-11-03 21:19:41.503000+00:00ChildSessionCRONUS International Ltd.1.8348
762021-11-03 21:19:33.181000+00:00WebClientCRONUS International Ltd.1896.3355
772021-11-03 21:07:56.466000+00:00WebClientCRONUS International Ltd.7108.7523
782021-11-03 18:48:38.293000+00:00ChildSessionCRONUS International Ltd.1.0436
792021-11-03 18:48:36.903000+00:00BackgroundCRONUS International Ltd.1.9697
802021-11-03 18:48:29.736000+00:00WebClientCRONUS International Ltd.1952.3829
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "timestamp", + "type": "datetime", + "tz": "UTC" + }, + { + "name": "clientType", + "type": "string" + }, + { + "name": "companyName", + "type": "string" + }, + { + "name": "totalTimeInMS", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [ + { + "timestamp": "2021-12-09T01:09:28.184Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.1 + }, + { + "timestamp": "2021-12-09T01:09:27.152Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 12.1472 + }, + { + "timestamp": "2021-12-09T01:09:19.149Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6667.4392 + }, + { + "timestamp": "2021-11-10T12:57:52.906Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 3.6174 + }, + { + "timestamp": "2021-11-10T12:57:50.094Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 10630.9501 + }, + { + "timestamp": "2021-11-10T12:57:50.094Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 10630.496 + }, + { + "timestamp": "2021-11-08T20:46:53.175Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.9601 + }, + { + "timestamp": "2021-11-08T20:46:50.644Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 7418.9702 + }, + { + "timestamp": "2021-11-08T20:46:50.644Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 7419.8216 + }, + { + "timestamp": "2021-11-07T20:57:01.501Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.2338 + }, + { + "timestamp": "2021-11-07T20:56:27.433Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.5455 + }, + { + "timestamp": "2021-11-07T20:56:19.999Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1417.9688 + }, + { + "timestamp": "2021-11-06T19:47:25.658Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 3.4127 + }, + { + "timestamp": "2021-11-06T19:47:22.754Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 8004.4742 + }, + { + "timestamp": "2021-11-06T19:47:22.754Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 4615.711 + }, + { + "timestamp": "2021-11-05T19:47:16.331Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.2262 + }, + { + "timestamp": "2021-11-05T19:47:11.347Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.403 + }, + { + "timestamp": "2021-11-05T19:47:10.330Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.4149 + }, + { + "timestamp": "2021-11-05T14:18:23.665Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.8854 + }, + { + "timestamp": "2021-11-05T14:18:15.574Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 5852.6887 + }, + { + "timestamp": "2021-11-05T13:53:07.551Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 0.9626 + }, + { + "timestamp": "2021-11-05T13:53:06.854Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 15.5036 + }, + { + "timestamp": "2021-11-05T13:24:12.246Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.2263 + }, + { + "timestamp": "2021-11-05T13:24:11.238Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.774 + }, + { + "timestamp": "2021-11-05T13:24:01.747Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 7774.5011 + }, + { + "timestamp": "2021-11-04T22:59:47.746Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.2452 + }, + { + "timestamp": "2021-11-04T22:59:41.121Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2062.1776 + }, + { + "timestamp": "2021-11-04T22:47:28.643Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.2991 + }, + { + "timestamp": "2021-11-04T22:47:20.052Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6226.3184 + }, + { + "timestamp": "2021-11-04T22:37:37.597Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.4109 + }, + { + "timestamp": "2021-11-04T22:37:29.240Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6388.3745 + }, + { + "timestamp": "2021-11-04T22:28:34.023Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.1498 + }, + { + "timestamp": "2021-11-04T22:28:27.266Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2061.2965 + }, + { + "timestamp": "2021-11-04T22:16:42.522Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 3.9756 + }, + { + "timestamp": "2021-11-04T22:16:42.409Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 4.0417 + }, + { + "timestamp": "2021-11-04T22:16:32.931Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6184.5094 + }, + { + "timestamp": "2021-11-04T21:28:13.384Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.5353 + }, + { + "timestamp": "2021-11-04T21:28:05.064Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6334.5836 + }, + { + "timestamp": "2021-11-04T21:15:54.824Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.6419 + }, + { + "timestamp": "2021-11-04T21:15:53.908Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 18.1752 + }, + { + "timestamp": "2021-11-04T20:50:45.240Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.6359 + }, + { + "timestamp": "2021-11-04T20:50:44.878Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 3.3164 + }, + { + "timestamp": "2021-11-04T20:50:36.816Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6208.6195 + }, + { + "timestamp": "2021-11-04T20:38:55.944Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.7878 + }, + { + "timestamp": "2021-11-04T20:38:47.363Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6226.6466 + }, + { + "timestamp": "2021-11-04T20:22:36.833Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.356 + }, + { + "timestamp": "2021-11-04T20:22:29.759Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2260.5106 + }, + { + "timestamp": "2021-11-04T20:13:47.862Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.0798 + }, + { + "timestamp": "2021-11-04T20:13:41.410Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1960.3236 + }, + { + "timestamp": "2021-11-04T20:10:33.756Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.9356 + }, + { + "timestamp": "2021-11-04T20:10:26.349Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2222.069 + }, + { + "timestamp": "2021-11-04T20:02:44.231Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.8139 + }, + { + "timestamp": "2021-11-04T20:02:35.894Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6198.9818 + }, + { + "timestamp": "2021-11-04T19:49:48.339Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.6727 + }, + { + "timestamp": "2021-11-04T19:49:47.678Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.8682 + }, + { + "timestamp": "2021-11-04T19:49:43.128Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 17.729 + }, + { + "timestamp": "2021-11-04T19:48:56.900Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1752.0612 + }, + { + "timestamp": "2021-11-04T19:47:10.167Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 5.7779 + }, + { + "timestamp": "2021-11-04T19:46:55.543Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 7439.8989 + }, + { + "timestamp": "2021-11-04T19:46:55.543Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 7439.2164 + }, + { + "timestamp": "2021-11-04T00:33:01.987Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.3293 + }, + { + "timestamp": "2021-11-04T00:33:01.869Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.2958 + }, + { + "timestamp": "2021-11-04T00:31:56.281Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.4723 + }, + { + "timestamp": "2021-11-04T00:31:55.751Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.484 + }, + { + "timestamp": "2021-11-04T00:28:47.760Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.43 + }, + { + "timestamp": "2021-11-04T00:28:31.735Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.3319 + }, + { + "timestamp": "2021-11-04T00:26:59.713Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.4542 + }, + { + "timestamp": "2021-11-04T00:25:29.220Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.456 + }, + { + "timestamp": "2021-11-04T00:25:28.375Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 52.5328 + }, + { + "timestamp": "2021-11-03T21:47:36.066Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.5168 + }, + { + "timestamp": "2021-11-03T21:41:55.925Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.2051 + }, + { + "timestamp": "2021-11-03T21:41:49.311Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 5938.1929 + }, + { + "timestamp": "2021-11-03T21:28:19.710Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.802 + }, + { + "timestamp": "2021-11-03T21:28:11.609Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 6925.6148 + }, + { + "timestamp": "2021-11-03T21:19:42.041Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 2.5002 + }, + { + "timestamp": "2021-11-03T21:19:41.503Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.8348 + }, + { + "timestamp": "2021-11-03T21:19:33.181Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1896.3355 + }, + { + "timestamp": "2021-11-03T21:07:56.466Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 7108.7523 + }, + { + "timestamp": "2021-11-03T18:48:38.293Z", + "clientType": "ChildSession", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.0436 + }, + { + "timestamp": "2021-11-03T18:48:36.903Z", + "clientType": "Background", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1.9697 + }, + { + "timestamp": "2021-11-03T18:48:29.736Z", + "clientType": "WebClient", + "companyName": "CRONUS International Ltd.", + "totalTimeInMS": 1952.3829 + } + ] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.370): 81 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[{'timestamp': datetime.datetime(2021, 12, 9, 1, 9, 28, 184000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.1},\n {'timestamp': datetime.datetime(2021, 12, 9, 1, 9, 27, 152000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 12.1472},\n {'timestamp': datetime.datetime(2021, 12, 9, 1, 9, 19, 149000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6667.4392},\n {'timestamp': datetime.datetime(2021, 11, 10, 12, 57, 52, 906000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 3.6174},\n {'timestamp': datetime.datetime(2021, 11, 10, 12, 57, 50, 94000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 10630.9501},\n {'timestamp': datetime.datetime(2021, 11, 10, 12, 57, 50, 94000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 10630.496},\n {'timestamp': datetime.datetime(2021, 11, 8, 20, 46, 53, 175000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.9601},\n {'timestamp': datetime.datetime(2021, 11, 8, 20, 46, 50, 644000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 7418.9702},\n {'timestamp': datetime.datetime(2021, 11, 8, 20, 46, 50, 644000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 7419.8216},\n {'timestamp': datetime.datetime(2021, 11, 7, 20, 57, 1, 501000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.2338},\n {'timestamp': datetime.datetime(2021, 11, 7, 20, 56, 27, 433000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.5455},\n {'timestamp': datetime.datetime(2021, 11, 7, 20, 56, 19, 999000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1417.9688},\n {'timestamp': datetime.datetime(2021, 11, 6, 19, 47, 25, 658000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 3.4127},\n {'timestamp': datetime.datetime(2021, 11, 6, 19, 47, 22, 754000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 8004.4742},\n {'timestamp': datetime.datetime(2021, 11, 6, 19, 47, 22, 754000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 4615.711},\n {'timestamp': datetime.datetime(2021, 11, 5, 19, 47, 16, 331000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.2262},\n {'timestamp': datetime.datetime(2021, 11, 5, 19, 47, 11, 347000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.403},\n {'timestamp': datetime.datetime(2021, 11, 5, 19, 47, 10, 330000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.4149},\n {'timestamp': datetime.datetime(2021, 11, 5, 14, 18, 23, 665000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.8854},\n {'timestamp': datetime.datetime(2021, 11, 5, 14, 18, 15, 574000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 5852.6887},\n {'timestamp': datetime.datetime(2021, 11, 5, 13, 53, 7, 551000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 0.9626},\n {'timestamp': datetime.datetime(2021, 11, 5, 13, 53, 6, 854000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 15.5036},\n {'timestamp': datetime.datetime(2021, 11, 5, 13, 24, 12, 246000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.2263},\n {'timestamp': datetime.datetime(2021, 11, 5, 13, 24, 11, 238000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.774},\n {'timestamp': datetime.datetime(2021, 11, 5, 13, 24, 1, 747000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 7774.5011},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 59, 47, 746000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.2452},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 59, 41, 121000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2062.1776},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 47, 28, 643000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.2991},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 47, 20, 52000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6226.3184},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 37, 37, 597000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.4109},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 37, 29, 240000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6388.3745},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 28, 34, 23000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.1498},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 28, 27, 266000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2061.2965},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 16, 42, 522000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 3.9756},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 16, 42, 409000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 4.0417},\n {'timestamp': datetime.datetime(2021, 11, 4, 22, 16, 32, 931000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6184.5094},\n {'timestamp': datetime.datetime(2021, 11, 4, 21, 28, 13, 384000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.5353},\n {'timestamp': datetime.datetime(2021, 11, 4, 21, 28, 5, 64000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6334.5836},\n {'timestamp': datetime.datetime(2021, 11, 4, 21, 15, 54, 824000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.6419},\n {'timestamp': datetime.datetime(2021, 11, 4, 21, 15, 53, 908000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 18.1752},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 50, 45, 240000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.6359},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 50, 44, 878000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 3.3164},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 50, 36, 816000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6208.6195},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 38, 55, 944000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.7878},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 38, 47, 363000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6226.6466},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 22, 36, 833000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.356},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 22, 29, 759000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2260.5106},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 13, 47, 862000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.0798},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 13, 41, 410000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1960.3236},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 10, 33, 756000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.9356},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 10, 26, 349000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2222.069},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 2, 44, 231000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.8139},\n {'timestamp': datetime.datetime(2021, 11, 4, 20, 2, 35, 894000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6198.9818},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 49, 48, 339000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.6727},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 49, 47, 678000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.8682},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 49, 43, 128000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 17.729},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 48, 56, 900000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1752.0612},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 47, 10, 167000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 5.7779},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 46, 55, 543000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 7439.8989},\n {'timestamp': datetime.datetime(2021, 11, 4, 19, 46, 55, 543000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 7439.2164},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 33, 1, 987000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.3293},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 33, 1, 869000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.2958},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 31, 56, 281000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.4723},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 31, 55, 751000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.484},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 28, 47, 760000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.43},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 28, 31, 735000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.3319},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 26, 59, 713000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.4542},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 25, 29, 220000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.456},\n {'timestamp': datetime.datetime(2021, 11, 4, 0, 25, 28, 375000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 52.5328},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 47, 36, 66000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.5168},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 41, 55, 925000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.2051},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 41, 49, 311000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 5938.1929},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 28, 19, 710000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.802},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 28, 11, 609000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 6925.6148},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 19, 42, 41000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 2.5002},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 19, 41, 503000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.8348},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 19, 33, 181000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1896.3355},\n {'timestamp': datetime.datetime(2021, 11, 3, 21, 7, 56, 466000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 7108.7523},\n {'timestamp': datetime.datetime(2021, 11, 3, 18, 48, 38, 293000, tzinfo=tzutc()), 'clientType': 'ChildSession', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.0436},\n {'timestamp': datetime.datetime(2021, 11, 3, 18, 48, 36, 903000, tzinfo=tzutc()), 'clientType': 'Background', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1.9697},\n {'timestamp': datetime.datetime(2021, 11, 3, 18, 48, 29, 736000, tzinfo=tzutc()), 'clientType': 'WebClient', 'companyName': 'CRONUS International Ltd.', 'totalTimeInMS': 1952.3829}]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 20, + "output_type": "execute_result" + } + ], + "execution_count": 20 }, { "cell_type": "code", @@ -345,7 +1156,7 @@ "| where 1==1 \r\n", " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", - " and customDimensions.aadTenantId == _aadTenantId\r\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\r\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId == 'RT0004'\r\n", "| extend clientType = tostring( customDimensions.clientType )\r\n", @@ -353,10 +1164,1020 @@ "| render timechart title= 'Number of successful logins the last day (shown by client/session type)'" ], "metadata": { - "azdata_cell_guid": "21e5d398-4a06-4ab9-a0e3-6e6263725dec" + "azdata_cell_guid": "21e5d398-4a06-4ab9-a0e3-6e6263725dec", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "line": { + "color": "rgb(31, 118, 179)", + "width": 1 + }, + "name": "WebClient:count", + "opacity": 0.8, + "type": "scatter", + "x": [ + "2021-11-03T18:00:00+00:00", + "2021-11-03T21:00:00+00:00", + "2021-11-04T00:00:00+00:00", + "2021-11-04T19:00:00+00:00", + "2021-11-04T20:00:00+00:00", + "2021-11-04T21:00:00+00:00", + "2021-11-04T22:00:00+00:00", + "2021-11-05T13:00:00+00:00", + "2021-11-05T14:00:00+00:00", + "2021-11-05T19:00:00+00:00", + "2021-11-06T19:00:00+00:00", + "2021-11-07T20:00:00+00:00", + "2021-11-08T20:00:00+00:00", + "2021-11-10T12:00:00+00:00", + "2021-12-09T01:00:00+00:00" + ], + "y": [ + 1, + 4, + 1, + 2, + 6, + 2, + 5, + 2, + 1, + null, + null, + 1, + null, + null, + 1 + ] + }, + { + "line": { + "color": "rgb(254, 127, 14)", + "width": 1 + }, + "name": "Background:count", + "opacity": 0.8, + "type": "scatter", + "x": [ + "2021-11-03T18:00:00+00:00", + "2021-11-03T21:00:00+00:00", + "2021-11-04T00:00:00+00:00", + "2021-11-04T19:00:00+00:00", + "2021-11-04T20:00:00+00:00", + "2021-11-04T21:00:00+00:00", + "2021-11-04T22:00:00+00:00", + "2021-11-05T13:00:00+00:00", + "2021-11-05T14:00:00+00:00", + "2021-11-05T19:00:00+00:00", + "2021-11-06T19:00:00+00:00", + "2021-11-07T20:00:00+00:00", + "2021-11-08T20:00:00+00:00", + "2021-11-10T12:00:00+00:00", + "2021-12-09T01:00:00+00:00" + ], + "y": [ + 1, + 1, + 1, + 4, + 1, + null, + 1, + 1, + null, + 3, + 3, + 2, + 3, + 3, + 1 + ] + }, + { + "line": { + "color": "rgb(44, 160, 44)", + "width": 1 + }, + "name": "ChildSession:count", + "opacity": 0.8, + "type": "scatter", + "x": [ + "2021-11-03T18:00:00+00:00", + "2021-11-03T21:00:00+00:00", + "2021-11-04T00:00:00+00:00", + "2021-11-04T19:00:00+00:00", + "2021-11-04T20:00:00+00:00", + "2021-11-04T21:00:00+00:00", + "2021-11-04T22:00:00+00:00", + "2021-11-05T13:00:00+00:00", + "2021-11-05T14:00:00+00:00", + "2021-11-05T19:00:00+00:00", + "2021-11-06T19:00:00+00:00", + "2021-11-07T20:00:00+00:00", + "2021-11-08T20:00:00+00:00", + "2021-11-10T12:00:00+00:00", + "2021-12-09T01:00:00+00:00" + ], + "y": [ + 1, + 4, + 7, + 1, + 6, + 2, + 5, + 2, + 1, + null, + null, + null, + null, + null, + 1 + ] + } + ], + "layout": { + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Number of successful logins the last day (shown by client/session type)" + }, + "xaxis": { + "autorange": true, + "title": { + "text": "timestamp" + }, + "type": "date" + }, + "yaxis": { + "ticksuffix": "", + "title": { + "text": "count" + }, + "type": "linear" + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.971): 34 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[{'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 12, 9, 1, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 12, 9, 1, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 12, 9, 1, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 10, 12, 0, tzinfo=tzutc()), 'count': 3},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 6, 19, 0, tzinfo=tzutc()), 'count': 3},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 4, 22, 0, tzinfo=tzutc()), 'count': 5},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 4, 22, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 4, 22, 0, tzinfo=tzutc()), 'count': 5},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 3, 21, 0, tzinfo=tzutc()), 'count': 4},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 3, 21, 0, tzinfo=tzutc()), 'count': 4},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 3, 21, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 4, 21, 0, tzinfo=tzutc()), 'count': 2},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 4, 21, 0, tzinfo=tzutc()), 'count': 2},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 4, 19, 0, tzinfo=tzutc()), 'count': 4},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 4, 19, 0, tzinfo=tzutc()), 'count': 2},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 4, 19, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 4, 20, 0, tzinfo=tzutc()), 'count': 6},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 4, 20, 0, tzinfo=tzutc()), 'count': 6},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 4, 20, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 7, 20, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 7, 20, 0, tzinfo=tzutc()), 'count': 2},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 8, 20, 0, tzinfo=tzutc()), 'count': 3},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 3, 18, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 3, 18, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 3, 18, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 5, 13, 0, tzinfo=tzutc()), 'count': 2},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 5, 13, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 5, 13, 0, tzinfo=tzutc()), 'count': 2},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 5, 14, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 5, 14, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 5, 19, 0, tzinfo=tzutc()), 'count': 3},\n {'clientType': 'WebClient', 'timestamp': datetime.datetime(2021, 11, 4, 0, 0, tzinfo=tzutc()), 'count': 1},\n {'clientType': 'ChildSession', 'timestamp': datetime.datetime(2021, 11, 4, 0, 0, tzinfo=tzutc()), 'count': 7},\n {'clientType': 'Background', 'timestamp': datetime.datetime(2021, 11, 4, 0, 0, tzinfo=tzutc()), 'count': 1}]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 21, + "output_type": "execute_result" + } + ], + "execution_count": 21 }, { "cell_type": "code", @@ -370,7 +2191,7 @@ "| where 1==1 \r\n", " and timestamp >= todatetime(_startDate)\r\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \r\n", - " and customDimensions.aadTenantId == _aadTenantId\r\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\r\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\r\n", " and customDimensions.eventId in ('RT0001', 'RT0002', 'RT0004')\r\n", "| extend attemptType = case(\r\n", @@ -383,10 +2204,934 @@ "| render timechart title= 'Number of login attempts the last day (shown by success/failure)'" ], "metadata": { - "azdata_cell_guid": "5a1bb5e1-4d74-4ff3-938c-e04c989977fd" + "azdata_cell_guid": "5a1bb5e1-4d74-4ff3-938c-e04c989977fd", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "outputs": [], - "execution_count": null + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "line": { + "color": "rgb(31, 118, 179)", + "width": 1 + }, + "name": "Successful login:count", + "opacity": 0.8, + "type": "scatter", + "x": [ + "2021-11-03T18:00:00+00:00", + "2021-11-03T21:00:00+00:00", + "2021-11-04T00:00:00+00:00", + "2021-11-04T19:00:00+00:00", + "2021-11-04T20:00:00+00:00", + "2021-11-04T21:00:00+00:00", + "2021-11-04T22:00:00+00:00", + "2021-11-05T13:00:00+00:00", + "2021-11-05T14:00:00+00:00", + "2021-11-05T19:00:00+00:00", + "2021-11-06T19:00:00+00:00", + "2021-11-07T20:00:00+00:00", + "2021-11-08T20:00:00+00:00", + "2021-11-10T12:00:00+00:00", + "2021-12-09T01:00:00+00:00" + ], + "y": [ + 3, + 9, + 9, + 7, + 13, + 4, + 11, + 5, + 2, + 3, + 3, + 3, + 3, + 3, + 3 + ] + } + ], + "layout": { + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Number of login attempts the last day (shown by success/failure)" + }, + "xaxis": { + "autorange": true, + "title": { + "text": "timestamp" + }, + "type": "date" + }, + "yaxis": { + "ticksuffix": "", + "title": { + "text": "count" + }, + "type": "linear" + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.129): 15 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[{'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 12, 9, 1, 0, tzinfo=tzutc()), 'count': 3},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 6, 19, 0, tzinfo=tzutc()), 'count': 3},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 4, 21, 0, tzinfo=tzutc()), 'count': 4},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 3, 21, 0, tzinfo=tzutc()), 'count': 9},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 4, 22, 0, tzinfo=tzutc()), 'count': 11},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 4, 19, 0, tzinfo=tzutc()), 'count': 7},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 4, 20, 0, tzinfo=tzutc()), 'count': 13},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 7, 20, 0, tzinfo=tzutc()), 'count': 3},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 10, 12, 0, tzinfo=tzutc()), 'count': 3},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 5, 13, 0, tzinfo=tzutc()), 'count': 5},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 5, 14, 0, tzinfo=tzutc()), 'count': 2},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 5, 19, 0, tzinfo=tzutc()), 'count': 3},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 4, 0, 0, tzinfo=tzutc()), 'count': 9},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 8, 20, 0, tzinfo=tzutc()), 'count': 3},\n {'attemptType': 'Successful login', 'timestamp': datetime.datetime(2021, 11, 3, 18, 0, tzinfo=tzutc()), 'count': 3}]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 22, + "output_type": "execute_result" + } + ], + "execution_count": 22 } ] } \ No newline at end of file diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Microsoft-Connectors-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Microsoft-Connectors-TSG.ipynb index 73cb9bd5..fcba9fd3 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Microsoft-Connectors-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Microsoft-Connectors-TSG.ipynb @@ -1,10 +1,34 @@ { + "metadata": { + "kernelspec": { + "name": "python3", + "display_name": "Python 3 (ipykernel)", + "language": "python" + }, + "language_info": { + "name": "python", + "version": "3.8.10", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } + } + }, + "nbformat_minor": 2, + "nbformat": 4, "cells": [ { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" - }, "source": [ "# Dynamics 365 Business Central Troubleshooting Guide (TSG) - Connectors (PowerBI, PowerApps, LogicApps, or Flow)\n", "\n", @@ -13,66 +37,113 @@ "Each section in the notebook contains links to relevant documentation from the performance tuning guide [aka.ms/bcperformance](aka.ms/bcperformance), telemetry documentation in [aka.ms/bctelemetry](aka.ms/bctelemetry), as well as Kusto queries that help dive into a specific area.\n", "\n", "NB! The signal used in this notebook is only available in versions 16.3 (or newer) of Business Central, so check the version of your environment if some sections do not return any data." - ] + ], + "metadata": { + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046" - }, "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", "\n", "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it? Install instructions: https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides) and connect to Application Insights" - ] + ], + "metadata": { + "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "5d02aa4b-9e41-474f-b643-2fbd482077af" - }, - "outputs": [], "source": [ "# load the KQLmagic module\n", "%reload_ext Kqlmagic" - ] + ], + "metadata": { + "azdata_cell_guid": "5d02aa4b-9e41-474f-b643-2fbd482077af", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 4 }, { "cell_type": "code", - "execution_count": null, + "source": [ + "# Connect to the Application Insights API\n", + "%kql appinsights://appid='';appkey=''" + ], "metadata": { "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [], - "source": [ - "# Connect to the Application Insights API\n", - "%kql appinsights://appid='';appkey=''" - ] + "execution_count": 5 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" - }, "source": [ "## 2\\. Define filters\n", "\n", "This workbook is designed for troubleshooting a single environment. Please provide values for aadTenantId and environmentName (or use a config file)." - ] + ], + "metadata": { + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [] - }, - "outputs": [], "source": [ "# Add values for AAD tenant id, environment name, and date range.\n", - "# It is possible to leave the value for environment name blank (if you want to analyze across all values of the parameter)\n", + "# It is possible to leave the value for AAD tenant id or environment name blank (if you want to analyze across all values of the parameter)\n", "\n", "# You can either use configuration file (INI file format) or set filters directly. \n", "\n", @@ -82,15 +153,13 @@ "\n", "\n", "# Add AAD tenant id and environment name here\n", - "aadTenantId = \"MyaaDtenantId\"\n", + "aadTenantId = \"\"\n", "environmentName = \"\"\n", - "extensionId = \"MyExtensionId\"\n", "\n", "# date filters for the analysis\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\n", - "startDate = \"2020-11-20\"\n", - "endDate = \"2020-11-24\"\n", - "\n", + "startDate = \"2021-11-01\"\n", + "endDate = \"2022-01-01\"\n", "\n", "\n", "\n", @@ -118,25 +187,46 @@ "print(\"environmentName \" + environmentName)\n", "print(\"startDate \" + startDate)\n", "print(\"endDate \" + endDate)" - ] + ], + "metadata": { + "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", + "tags": [ + "hide_input" + ], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nstartDate 2021-11-01\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 6 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" - }, "source": [ "# Analyze connector usage\n", "Now you can run Kusto queries to look for possible root causes for issues about web services.\n", "\n", "Either click **Run All** above to run all sections, or scroll down to the type of analysis you want to do and manually run queries" - ] + ], + "metadata": { + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" - }, "source": [ "## Connector web service requests overview\n", "All connectors use the OData v4 protocol to connect to Business Central. \n", @@ -144,16 +234,18 @@ "Web service telemetry docs: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace\n", "\n", "KQL samples: https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/MicrosoftConnectorUsage.kql" - ] + ], + "metadata": { + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -164,7 +256,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV4'\n", @@ -190,15 +282,55 @@ ")\n", "| summarize request_count=count() by connector, bin(timestamp, 1d)\n", "| render timechart title= 'Number of connector web service requests by category'" - ] + ], + "metadata": { + "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.272): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 7, + "output_type": "execute_result" + } + ], + "execution_count": 7 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -209,7 +341,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV4'\n", @@ -238,13 +370,54 @@ "| extend log_count = log10( count_ )\n", "| order by connector, executionTime_ms asc\n", "| render columnchart with (ycolumns = log_count, ytitle='log(count)', series = connector, title= 'Execution time (in milliseconds) of connector web service requests' ) " - ] + ], + "metadata": { + "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.722): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 8, + "output_type": "execute_result" + } + ], + "execution_count": 8 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b" - }, "source": [ "## Connector throttling\n", "If web service requests exceed the operational limits in Business Central, then they will either be rejected (with a HTTP status code 426), or timeout (with a HTTP status code 408).\n", @@ -254,16 +427,18 @@ "\n", "Telemetry docs: \n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace" - ] + ], + "metadata": { + "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -274,7 +449,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV4'\n", @@ -300,13 +475,55 @@ ")\n", "| summarize count() by bin(timestamp, 1d), httpStatusCode, connector\n", "| render timechart title= 'Number of connector requests by http status code'" - ] + ], + "metadata": { + "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.640): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 9, + "output_type": "execute_result" + } + ], + "execution_count": 9 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f6a9d2d3-26b9-4536-b279-d126e5cd5609" - }, "source": [ "## Connector Web service requests (Access denied)\n", "The user who made the request doesn't have proper permissions. For more information, see \n", @@ -315,15 +532,18 @@ "\n", "Telemetry docs: \n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace" - ] + ], + "metadata": { + "azdata_cell_guid": "f6a9d2d3-26b9-4536-b279-d126e5cd5609", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "ef3d4e9f-42bb-4492-bc3b-f88b33dcbdea" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -337,7 +557,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV4' \n", @@ -364,13 +584,82 @@ ") \n", "| summarize number_of_requests=count() by connector, endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "ef3d4e9f-42bb-4492-bc3b-f88b33dcbdea", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [connector, endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
connectorendpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "connector", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.227): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 10, + "output_type": "execute_result" + } + ], + "execution_count": 10 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "ffc66241-e49a-46c3-953c-edb1e3d1ef75" - }, "source": [ "## Connector web service requests (Not found)\n", "The given endpoint was not valid\n", @@ -380,15 +669,18 @@ "\n", "Telemetry docs: \n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace" - ] + ], + "metadata": { + "azdata_cell_guid": "ffc66241-e49a-46c3-953c-edb1e3d1ef75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "09e649eb-d8bb-43e8-8f8b-ff07c8cda005" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -402,7 +694,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV4' \n", @@ -430,13 +722,82 @@ "| summarize number_of_requests=count() by connector, endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "09e649eb-d8bb-43e8-8f8b-ff07c8cda005", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [connector, endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
connectorendpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "connector", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.780): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 11, + "output_type": "execute_result" + } + ], + "execution_count": 11 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "66ab172d-9d99-4228-98c7-68a4113a91a0" - }, "source": [ "## Connector web service requests (Request timed out)\n", "The request took longer to complete than the threshold configured for the service\n", @@ -446,15 +807,18 @@ "\n", "Telemetry docs: \n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace" - ] + ], + "metadata": { + "azdata_cell_guid": "66ab172d-9d99-4228-98c7-68a4113a91a0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "f29afa7f-6408-4e85-a613-605d9898574d" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -468,7 +832,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.category == 'ODataV4' \n", @@ -496,13 +860,82 @@ "| summarize number_of_requests=count() by connector, endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "f29afa7f-6408-4e85-a613-605d9898574d", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [connector, endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
connectorendpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "connector", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.384): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 12, + "output_type": "execute_result" + } + ], + "execution_count": 12 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "68241327-780a-4766-9e51-b37f90d595dc" - }, "source": [ "## Connector web service requests (Too Many Requests)\n", "The request exceeded the maximum simultaneous requests allowed on the service.\n", @@ -512,15 +945,18 @@ "\n", "Telemetry docs: \n", "* https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace\n" - ] + ], + "metadata": { + "azdata_cell_guid": "68241327-780a-4766-9e51-b37f90d595dc", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "2c9888bb-6306-4b67-a545-a40ea5f97f60" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -534,7 +970,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.httpStatusCode == '426'\n", @@ -562,27 +998,79 @@ "| summarize number_of_requests=count() by connector, endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 + ], + "metadata": { + "azdata_cell_guid": "2c9888bb-6306-4b67-a545-a40ea5f97f60", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [connector, endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
connectorendpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "connector", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.885): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 13, + "output_type": "execute_result" + } + ], + "execution_count": 13 } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + ] +} \ No newline at end of file diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-overview-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-overview-TSG.ipynb index 126295d3..736d0e68 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-overview-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-overview-TSG.ipynb @@ -107,8 +107,7 @@ "cell_type": "code", "source": [ "# Connect to the Application Insights API\r\n", - "#%kql appinsights://appid='';appkey=''\r\n", - "%kql appinsights://appid='43d7cb5e-452b-4c08-93ca-a35109847936';appkey='c8hx7qtgxcew5a3uv8cg2bdukl4gcue0k2e0e670'" + "%kql appinsights://appid='';appkey=''" ], "metadata": { "azdata_cell_guid": "8880451f-8468-47cb-a3de-71516c9123f5", @@ -147,12 +146,11 @@ "\r\n", "# If you specify a config file, then variables set here takes precedence over manually set filter variables\r\n", "# config file name and directory (full path)\r\n", - "configFile = \"c:\\\\tmp/notebook.ini\"\r\n", + "configFile = \"c:\\\\tmp\\\\notebook.ini\"\r\n", "\r\n", "\r\n", - "# Add AAD tenant id and environment name here\r\n", + "# Add AAD tenant id and environment name here (or leave blank)\r\n", "aadTenantId = \"\"\r\n", - "#aadTenantId = \"MyaaDtenantId\"\r\n", "environmentName = \"\"\r\n", "extensionId = \"\"\r\n", "\r\n", diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-partner-code-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-partner-code-TSG.ipynb index d2784f48..8a2453f0 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-partner-code-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Performance-partner-code-TSG.ipynb @@ -1,10 +1,34 @@ { + "metadata": { + "kernelspec": { + "name": "python3", + "display_name": "Python 3 (ipykernel)", + "language": "python" + }, + "language_info": { + "name": "python", + "version": "3.8.10", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } + } + }, + "nbformat_minor": 2, + "nbformat": 4, "cells": [ { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" - }, "source": [ "# Dynamics 365 Business Central Troubleshooting Guide (TSG) - Performance analysis (partner code issues)\n", "\n", @@ -17,68 +41,114 @@ "Each section in the notebook contains links to the performance tuning guide on docs [aka.ms/bcperformance](..\\..\\D365BC%20Troubleshooting%20Guides%20(TSG)\\content\\aka.ms\\bcperformance), links to the documentation of relevant telemetry in [aka.ms/bctelemetry](..\\..\\D365BC%20Troubleshooting%20Guides%20(TSG)\\content\\aka.ms\\bctelemetry), as well as Kusto queries that help dive into a specific area (sessions, web service requests, database calls, reports, and page load times).\n", "\n", "NB! Some of the signal used in this notebook is only available in newer versions of Business Central, so check the version of your environment if some sections do not return any data. The signal documentation states in which version a given signal was introduced." - ] + ], + "metadata": { + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046" - }, "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", "\n", "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it? Install instructions: https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides) and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" - ] + ], + "metadata": { + "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] - }, - "outputs": [], "source": [ "# load the KQLmagic module\n", "%reload_ext Kqlmagic" - ] + ], + "metadata": { + "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "execution_count": 5 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "1de8537e-0291-45b2-8741-047441208e42" - }, - "outputs": [], "source": [ "# Connect to the Application Insights API\n", "%kql appinsights://appid='';appkey=''" - ] + ], + "metadata": { + "azdata_cell_guid": "1de8537e-0291-45b2-8741-047441208e42", + "extensions": { + "azuredatastudio": { + "views": [] + } + }, + "tags": [] + }, + "outputs": [], + "execution_count": 6 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" - }, "source": [ "## 2\\. Define filters\n", "\n", "This workbook is designed for troubleshooting a single environment. Please provide values for aadTenantId, environmentName, and extensionId (or use a config file)." - ] + ], + "metadata": { + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [ - "hide_input" - ] - }, - "outputs": [], "source": [ "# Add values for AAD tenant id, environment name, and extension id here\n", - "# It is possible to leave the value for environment name blank (if you want to analyze across all values of the parameter)\n", + "# It is possible to leave the value for AAD tenant id or environment name blank (if you want to analyze across all values of the parameter)\n", "\n", "# You can either use configuration file (INI file format) or set filters directly. \n", "\n", @@ -87,16 +157,15 @@ "configFile = \"c:\\\\tmp\\\\notebook.ini\"\n", "\n", "\n", - "# Add AAD tenant id and environment name here\n", + "# Add AAD tenant id and environment name here (or leave blank)\n", "aadTenantId = \"\"\n", "environmentName = \"\"\n", - "#extensionId = \"MyExtensionId\"\n", "extensionId = \"\"\n", "\n", "# date filters for the analysis\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\n", - "startDate = \"2020-01-20\"\n", - "endDate = \"2020-01-30\"\n", + "startDate = \"2021-11-01\"\n", + "endDate = \"2022-01-01\"\n", "\n", "\n", "\n", @@ -126,25 +195,46 @@ "print(\"extensionId \" + extensionId)\n", "print(\"startDate \" + startDate)\n", "print(\"endDate \" + endDate)" - ] + ], + "metadata": { + "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", + "tags": [ + "hide_input" + ], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nextensionId \nstartDate 2021-11-01\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 7 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" - }, "source": [ "# Analyze performance\n", "Now you can run Kusto queries to look for possible root causes for performance issues.\n", "\n", "Either click **Run All** above to run all sections, or scroll down to the type of analysis you want to do and manually run queries" - ] + ], + "metadata": { + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" - }, "source": [ "## Web service requests\n", "\n", @@ -161,16 +251,18 @@ "- Performance tuning guide: [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer#writing-efficient-web-services](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer#writing-efficient-web-services)\n", "- Web service telemetry docs: [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace)\n", "- KQL samples: [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/WebServiceCalls.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/WebServiceCalls.kql)" - ] + ], + "metadata": { + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -182,7 +274,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0008'\n", @@ -197,15 +289,55 @@ ")\n", "| summarize request_count=count() by category, bin(timestamp, 1d)\n", "| render timechart title= 'Number of web service requests by category endpoints (in partner code)'" - ] + ], + "metadata": { + "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.570): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 8, + "output_type": "execute_result" + } + ], + "execution_count": 8 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -217,7 +349,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0008'\n", @@ -236,15 +368,54 @@ "| extend log_count = log10(count_)\n", "| order by category, executionTime_ms asc\n", "| render columnchart with (ycolumns = log_count, ytitle='Log10(count)', series = category, title= 'Execution time (in ms) of normal web service requests by category (in partner code)' ) " - ] + ], + "metadata": { + "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.632): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 9, + "output_type": "execute_result" + } + ], + "execution_count": 9 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "d2045846-702e-4d8f-9836-3df55405c404" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -256,7 +427,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0008'\n", @@ -275,15 +446,54 @@ "| extend log_count = log10(count_)\n", "| order by category, executionTime_sec asc\n", "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = category, title= 'Execution time (in sec) of slow web service requests by category (in partner code)' ) " - ] + ], + "metadata": { + "azdata_cell_guid": "d2045846-702e-4d8f-9836-3df55405c404", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.095): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 10, + "output_type": "execute_result" + } + ], + "execution_count": 10 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "e7a06658-0325-433a-94ff-3ab5c0a2eb67" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -298,7 +508,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0008'\n", @@ -316,13 +526,82 @@ "| summarize count=count(), medianExecutionTimeInMS=percentile(executionTimeInMS, 50) by alObjectId, category, endpoint\n", "| order by medianExecutionTimeInMS desc\n", "| limit 20" - ] + ], + "metadata": { + "azdata_cell_guid": "e7a06658-0325-433a-94ff-3ab5c0a2eb67", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [alObjectId, category, endpoint, count, medianExecutionTimeInMS]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
alObjectIdcategoryendpointcountmedianExecutionTimeInMS
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "alObjectId", + "type": "integer" + }, + { + "name": "category", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + }, + { + "name": "count", + "type": "integer" + }, + { + "name": "medianExecutionTimeInMS", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.002): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 11, + "output_type": "execute_result" + } + ], + "execution_count": 11 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "adb3d2f9-5e04-490e-994d-a713e26599cf" - }, "source": [ "## (Outgoing) web service requests overview \n", "Outgoing web service calls (calls to the HttpClient module from AL) are blocking calls with respect to AL execution. This means that the page will be unresponsive until the server receives a response from the remote service being called.\n", @@ -335,15 +614,18 @@ "- Outgoing Web service telemetry docs: [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-outgoing-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-outgoing-trace) \n", "- KQL sample: [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/OutGoingWebServiceCalls.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/OutGoingWebServiceCalls.kql)\n", "- Explanation of different HTTP status codes: [https://en.wikipedia.org/wiki/List\\_of\\_HTTP\\_status\\_codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)" - ] + ], + "metadata": { + "azdata_cell_guid": "adb3d2f9-5e04-490e-994d-a713e26599cf", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "fcc199b3-9dea-46b1-ab7b-8b578528b4d1" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -355,7 +637,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0019'\n", @@ -371,15 +653,54 @@ "| summarize request_count=count() by httpStatusCode, bin(timestamp, 1d)\n", "| order by httpStatusCode asc\n", "| render timechart title= 'Number of outgoing web service requests by HTTP status code (partner code)'" - ] + ], + "metadata": { + "azdata_cell_guid": "fcc199b3-9dea-46b1-ab7b-8b578528b4d1", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.173): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 12, + "output_type": "execute_result" + } + ], + "execution_count": 12 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "3e6e498d-29d5-4f9c-83c7-f0fd4345279a" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -391,7 +712,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0019'\n", @@ -410,16 +731,56 @@ "| summarize count() by executionTime_sec = bin(executionTimeInSec, 1), httpMethod\n", "| extend log_count = log10( count_ )\n", "| order by httpMethod, executionTime_sec asc\n", - "| render columnchart with (ycolumns = log_count, ytitle='log(count)', series = httpMethod, title= 'Execution time (seconds) of \"normal\" outgoing ws requests by method' ) \n" - ] + "| render columnchart with (ycolumns = log_count, ytitle='log(count)', series = httpMethod, title= 'Execution time (seconds) of \"normal\" outgoing ws requests by method' ) \n", + "" + ], + "metadata": { + "azdata_cell_guid": "3e6e498d-29d5-4f9c-83c7-f0fd4345279a", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.062): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 13, + "output_type": "execute_result" + } + ], + "execution_count": 13 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a28e20fe-952e-45de-ae1f-fc9651502d64" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -431,7 +792,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0019'\n", @@ -450,16 +811,56 @@ "| summarize count() by executionTime_sec = bin(executionTimeInSec, 10), httpMethod\n", "| extend log_count = log10( count_ )\n", "| order by httpMethod, executionTime_sec asc\n", - "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = httpMethod, title= 'Execution time (seconds) of slow outgoing ws requests by method' ) \n" - ] + "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = httpMethod, title= 'Execution time (seconds) of slow outgoing ws requests by method' ) \n", + "" + ], + "metadata": { + "azdata_cell_guid": "a28e20fe-952e-45de-ae1f-fc9651502d64", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.942): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 14, + "output_type": "execute_result" + } + ], + "execution_count": 14 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "5e3ced4d-acd0-41f7-8ba9-a82af662dd1a" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -476,7 +877,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0019'\n", @@ -511,13 +912,118 @@ ", alObjectId, alObjectName, alObjectType, codeOwnership\n", ", extensionId, extensionName, extensionVersion, httpMethod, endpoint\n", "| limit 20" - ] + ], + "metadata": { + "azdata_cell_guid": "5e3ced4d-acd0-41f7-8ba9-a82af662dd1a", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [avg_timeInSec, min_timeInSec, max_timeInSec, perc_95InSec, count_, alObjectId, alObjectName, alObjectType, codeOwnership, extensionId, extensionName, extensionVersion, httpMethod, endpoint]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
avg_timeInSecmin_timeInSecmax_timeInSecperc_95InSeccount_alObjectIdalObjectNamealObjectTypecodeOwnershipextensionIdextensionNameextensionVersionhttpMethodendpoint
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "avg_timeInSec", + "type": "number" + }, + { + "name": "min_timeInSec", + "type": "number" + }, + { + "name": "max_timeInSec", + "type": "number" + }, + { + "name": "perc_95InSec", + "type": "number" + }, + { + "name": "count_", + "type": "integer" + }, + { + "name": "alObjectId", + "type": "integer" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectType", + "type": "string" + }, + { + "name": "codeOwnership", + "type": "string" + }, + { + "name": "extensionId", + "type": "string" + }, + { + "name": "extensionName", + "type": "string" + }, + { + "name": "extensionVersion", + "type": "string" + }, + { + "name": "httpMethod", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.777): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 15, + "output_type": "execute_result" + } + ], + "execution_count": 15 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b" - }, "source": [ "## Data related\n", "A performance issue is in many cases caused by long running SQL queries or by database locking.\n", @@ -540,16 +1046,18 @@ " \n", " - [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-long-running-sql-query-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-long-running-sql-query-trace)\n", " - [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-database-locks-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-database-locks-trace)" - ] + ], + "metadata": { + "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -561,7 +1069,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0005'\n", @@ -575,15 +1083,55 @@ ")\n", "| summarize count() by bin(timestamp, 1d)\n", "| render timechart title= 'Number of long running SQL queries (in partner code)'" - ] + ], + "metadata": { + "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.903): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 16, + "output_type": "execute_result" + } + ], + "execution_count": 16 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "36d2980d-2d0a-4066-957f-7648fe1b240b" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -598,7 +1146,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0005'\n", @@ -617,15 +1165,94 @@ ")\n", "| summarize count(), avg(executionTimeInSec) by objectId=alObjectId, objectName=alObjectName, extensionId, extensionName, extensionVersion, codeOwnership\n", "| limit 20" - ] + ], + "metadata": { + "azdata_cell_guid": "36d2980d-2d0a-4066-957f-7648fe1b240b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [objectId, objectName, extensionId, extensionName, extensionVersion, codeOwnership, count_, avg_executionTimeInSec]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
objectIdobjectNameextensionIdextensionNameextensionVersioncodeOwnershipcount_avg_executionTimeInSec
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "objectId", + "type": "integer" + }, + { + "name": "objectName", + "type": "string" + }, + { + "name": "extensionId", + "type": "string" + }, + { + "name": "extensionName", + "type": "string" + }, + { + "name": "extensionVersion", + "type": "string" + }, + { + "name": "codeOwnership", + "type": "string" + }, + { + "name": "count_", + "type": "integer" + }, + { + "name": "avg_executionTimeInSec", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.972): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 17, + "output_type": "execute_result" + } + ], + "execution_count": 17 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "3ee52ced-9377-46a5-865a-528cceb6b335" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -637,7 +1264,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0012'\n", @@ -651,15 +1278,54 @@ ")\n", "| summarize request_count=count() by bin(timestamp, 1d)\n", "| render timechart title= 'Number of database lock timeouts (in partner code)'" - ] + ], + "metadata": { + "azdata_cell_guid": "3ee52ced-9377-46a5-865a-528cceb6b335", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.939): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 18, + "output_type": "execute_result" + } + ], + "execution_count": 18 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "82119fb5-180d-4ead-b1ae-198adcd8c0b6" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -674,7 +1340,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0012'\n", @@ -688,13 +1354,70 @@ ")\n", "| summarize timeout_count=count() by alObjectId\n", "| order by timeout_count" - ] + ], + "metadata": { + "azdata_cell_guid": "82119fb5-180d-4ead-b1ae-198adcd8c0b6", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [alObjectId, timeout_count]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n
alObjectIdtimeout_count
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "alObjectId", + "type": "integer" + }, + { + "name": "timeout_count", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.064): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 19, + "output_type": "execute_result" + } + ], + "execution_count": 19 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9e51a638-4e8d-413b-bc03-87bc8cac36a3" - }, "source": [ "## Reports\n", "Long running reports (running longer than 1 minute) is normally not a problem for a user, because a report is seen as something that can take some time. But reports can consume resources on both the server and the database.\n", @@ -708,15 +1431,18 @@ "- KQL samples:\n", " - [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Reports.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/Reports.kql)\n", " - [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/PerformanceTuning/ReportExecution.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/PerformanceTuning/ReportExecution.kql)" - ] + ], + "metadata": { + "azdata_cell_guid": "9e51a638-4e8d-413b-bc03-87bc8cac36a3", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "21e5d398-4a06-4ab9-a0e3-6e6263725dec" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -728,7 +1454,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0006'\n", @@ -745,15 +1471,54 @@ "| where reportName <> ''\n", "| summarize count=count() by clientType, bin(timestamp, 1d)\n", "| render timechart title= 'Number of report execution by client/session type (partner reports)'" - ] + ], + "metadata": { + "azdata_cell_guid": "21e5d398-4a06-4ab9-a0e3-6e6263725dec", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.568): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 20, + "output_type": "execute_result" + } + ], + "execution_count": 20 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "80670aee-4a06-44da-8b8f-b0bb8124ef12" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -765,7 +1530,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0006'\n", @@ -785,15 +1550,54 @@ "| order by percentile95\n", "| limit 10\n", "| render columnchart with (title= 'Execution time stats of (partner) reports by report name (top 10 by 95% percentile)', ytitle='Time (in seconds)' ) " - ] + ], + "metadata": { + "azdata_cell_guid": "80670aee-4a06-44da-8b8f-b0bb8124ef12", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.151): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 21, + "output_type": "execute_result" + } + ], + "execution_count": 21 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "ac9f9201-e3cc-41ae-958c-f532de3717ec" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -808,7 +1612,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0006'\n", @@ -827,15 +1631,82 @@ " by reportName\n", "| order by percentile95\n", "| limit 20" - ] + ], + "metadata": { + "azdata_cell_guid": "ac9f9201-e3cc-41ae-958c-f532de3717ec", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [reportName, avg, median, percentile95, max]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
reportNameavgmedianpercentile95max
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "reportName", + "type": "string" + }, + { + "name": "avg", + "type": "number" + }, + { + "name": "median", + "type": "number" + }, + { + "name": "percentile95", + "type": "number" + }, + { + "name": "max", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.016): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 22, + "output_type": "execute_result" + } + ], + "execution_count": 22 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "593a264d-6673-471c-a835-0a5d5daec84c" - }, - "outputs": [], "source": [ "%%kql\n", "// \n", @@ -852,7 +1723,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0006'\n", @@ -878,13 +1749,98 @@ ", datasetratio = toreal(totalRows)/totalSQLExecutes\n", "| order by sqlratio asc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "593a264d-6673-471c-a835-0a5d5daec84c", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [alObjectId, alObjectName, codeOwnership, numberOfReportExecutions, totalRows, totalSQLExecutes, totalSQLRowsRead, sqlratio, datasetratio]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
alObjectIdalObjectNamecodeOwnershipnumberOfReportExecutionstotalRowstotalSQLExecutestotalSQLRowsReadsqlratiodatasetratio
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "codeOwnership", + "type": "string" + }, + { + "name": "numberOfReportExecutions", + "type": "integer" + }, + { + "name": "totalRows", + "type": "integer" + }, + { + "name": "totalSQLExecutes", + "type": "integer" + }, + { + "name": "totalSQLRowsRead", + "type": "integer" + }, + { + "name": "sqlratio", + "type": "number" + }, + { + "name": "datasetratio", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.726): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 23, + "output_type": "execute_result" + } + ], + "execution_count": 23 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "42a5907b-2566-4d05-a50c-ea56c91ce55d" - }, "source": [ "## Slow AL code (only available from version 17.1)\n", "AL execution is normally very fast in itself. If you see data in this section, you might have implemented an in-efficient algorithm.\n", @@ -898,15 +1854,18 @@ "- KQL samples:\n", " - [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/Queries/RawData/LongRunningAL.kq](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/Queries/RawData/LongRunningAL.kql)l\n", " - [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/Queries/PerformanceTuning/SlowALMethods.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/Queries/PerformanceTuning/SlowALMethods.kql)" - ] + ], + "metadata": { + "azdata_cell_guid": "42a5907b-2566-4d05-a50c-ea56c91ce55d", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "9a066ca8-c5d3-488a-a367-43ab321e0575" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -918,7 +1877,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0018'\n", @@ -933,15 +1892,54 @@ "| extend clientType = tostring( customDimensions.clientType )\n", "| summarize count=count() by clientType, bin(timestamp, 1d)\n", "| render timechart title= 'Number of long running AL methods (shown by client/session type)'" - ] + ], + "metadata": { + "azdata_cell_guid": "9a066ca8-c5d3-488a-a367-43ab321e0575", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.432): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 24, + "output_type": "execute_result" + } + ], + "execution_count": 24 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "6fec11d2-85b8-4469-b260-4c9b9da4047e" - }, - "outputs": [], "source": [ "%%kql\n", "// Top 20 slowest AL methods\n", @@ -956,7 +1954,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", " and customDimensions.eventId == 'RT0018'\n", @@ -979,13 +1977,102 @@ "| summarize count(), avg( executionTimeInSec ), min( executionTimeInSec ), max( executionTimeInSec ), percentile(executionTimeInSec, 95) by alMethod, alObjectType, alObjectId, alObjectName, extensionName\n", "| order by avg_executionTimeInSec desc \n", "| limit 20" - ] + ], + "metadata": { + "azdata_cell_guid": "6fec11d2-85b8-4469-b260-4c9b9da4047e", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [alMethod, alObjectType, alObjectId, alObjectName, extensionName, count_, avg_executionTimeInSec, min_executionTimeInSec, max_executionTimeInSec, percentile_executionTimeInSec_95]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
alMethodalObjectTypealObjectIdalObjectNameextensionNamecount_avg_executionTimeInSecmin_executionTimeInSecmax_executionTimeInSecpercentile_executionTimeInSec_95
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "alMethod", + "type": "string" + }, + { + "name": "alObjectType", + "type": "string" + }, + { + "name": "alObjectId", + "type": "integer" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "extensionName", + "type": "string" + }, + { + "name": "count_", + "type": "integer" + }, + { + "name": "avg_executionTimeInSec", + "type": "number" + }, + { + "name": "min_executionTimeInSec", + "type": "number" + }, + { + "name": "max_executionTimeInSec", + "type": "number" + }, + { + "name": "percentile_executionTimeInSec_95", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.751): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 25, + "output_type": "execute_result" + } + ], + "execution_count": 25 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1452b8b6-3c5f-4b36-b259-33298826a8fb" - }, "source": [ "## Page views (only available in BC Online (SaaS))\n", "Page views is measuring the time that the users experience in the browser client.\n", @@ -997,15 +2084,18 @@ "Resources\n", "- Page view telemetry docs: [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-page-view-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-page-view-trace)\n", "- KQL samples: [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/PageViews.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/PageViews.kql)" - ] + ], + "metadata": { + "azdata_cell_guid": "1452b8b6-3c5f-4b36-b259-33298826a8fb", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "6595bc25-3cbf-4b37-bc4f-c62e9d2e2810" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1020,7 +2110,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and (_extensionId == '' or customDimensions.extensionId == _extensionId) \n", "| extend alObjectId = toint(customDimensions.alObjectId)\n", @@ -1035,28 +2125,71 @@ "| summarize median_load_time_in_MS = percentile(duration,50) by pageName=name, objectId\n", "| order by median_load_time_in_MS desc\n", "| limit 10" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 + ], + "metadata": { + "azdata_cell_guid": "6595bc25-3cbf-4b37-bc4f-c62e9d2e2810", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [pageName, objectId, median_load_time_in_MS]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n
pageNameobjectIdmedian_load_time_in_MS
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "pageName", + "type": "string" + }, + { + "name": "objectId", + "type": "string" + }, + { + "name": "median_load_time_in_MS", + "type": "number" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.800): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 26, + "output_type": "execute_result" + } + ], + "execution_count": 26 } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + ] +} \ No newline at end of file diff --git a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Web-services-TSG.ipynb b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Web-services-TSG.ipynb index abed01c1..0410befb 100644 --- a/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Web-services-TSG.ipynb +++ b/samples/AppInsights/TroubleShootingGuides/D365BC Troubleshooting Guides (TSG)/content/Web-services-TSG.ipynb @@ -1,10 +1,34 @@ { + "metadata": { + "kernelspec": { + "name": "python3", + "display_name": "Python 3 (ipykernel)", + "language": "python" + }, + "language_info": { + "name": "python", + "version": "3.8.10", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + }, + "extensions": { + "azuredatastudio": { + "version": 1, + "views": [] + } + } + }, + "nbformat_minor": 2, + "nbformat": 4, "cells": [ { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0" - }, "source": [ "# Dynamics 365 Business Central Troubleshooting Guide (TSG) - Web services\n", "\n", @@ -15,185 +39,113 @@ "NB! Some of the signal used in this notebook is only available in newer versions of Business Central, so check the version of your environment if some sections do not return any data. The signal documentation states in which version a given signal was introduced.\n", "\n", "**NB!** Telemetry for SOAP endpoints does not emit HTTP status code. So the sections that query for different values of HTTP status will not show results for these requests." - ] + ], + "metadata": { + "azdata_cell_guid": "1f608a1d-2436-4b48-80d4-5c4d2f8ca7d0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046" - }, "source": [ "## 1\\. Get setup: Load up Python libraries and connect to Application Insights\n", "\n", "First you need to set the notebook Kernel to Python3, load the KQLmagic module (did you install it? Install instructions: https://github.com/microsoft/BCTech/tree/master/samples/AppInsights/TroubleShootingGuides) and connect to your Application Insights resource (get appid and appkey from the API access page in the Application Insights portal)" - ] + ], + "metadata": { + "azdata_cell_guid": "f103fae9-cf6d-40f7-9062-11ce50691046", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": 1, + "source": [ + "# load the KQLmagic module\n", + "%reload_ext Kqlmagic" + ], "metadata": { "azdata_cell_guid": "a253fa8e-6ac2-4722-a00a-1c52aedab4ed", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [ { "data": { - "text/html": [ - "\n", - " \n", - " Kqlmagic - banner\n", - " \n", - " \n", - " \n", - "
\n", - "
\n", - "
\n", - "

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n", - " Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n", - "

\n", - " • \n", - " kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n", - " • \n", - " Kqlmagic configuration: execute '%config Kqlmagic'
\n", - " • \n", - " Kqlmagic usage: execute '%kql --usage'
\n", - "

\n", - "
\n", - "
\n", - " \n", - " " - ], - "text/plain": [ - "" - ] + "text/plain": "", + "text/html": "\n \n Kqlmagic - banner\n \n \n \n
\n
\n
\n

Kql Query Language, aka kql, is the query language for advanced analytics on Azure Monitor resources. The current supported data sources are \n Azure Data Explorer (Kusto), Log Analytics and Application Insights. To get more information execute '%kql --help \"kql\"'

\n

\n • \n kql reference: Click on 'Help' tab > and Select 'kql reference' or execute '%kql --help \"kql\"'
\n • \n Kqlmagic configuration: execute '%config Kqlmagic'
\n • \n Kqlmagic usage: execute '%kql --usage'
\n • \n To report bug/issue: execute '%kql --bug-report'
\n

\n
\n
\n \n " }, "metadata": {}, "output_type": "display_data" }, { "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - "

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.113, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n", - " \n", - " " - ], - "text/plain": [ - "" - ] + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Kqlmagic package is updated frequently. Run '!pip install Kqlmagic --no-cache-dir --upgrade' to use the latest version.
Kqlmagic version: 0.1.114, source: https://github.com/Microsoft/jupyter-Kqlmagic

\n \n " }, "metadata": {}, "output_type": "display_data" }, { "data": { - "text/html": [ - "\n", - " \n", - "
\n", - " Click to find out what's new in Kqlmagic  What's New? \n", - "
\n", - " " - ], - "text/plain": [ - "" - ] + "text/plain": "", + "text/html": "\n \n
\n Click to find out what's new in Kqlmagic  What's New? \n
\n " }, "metadata": {}, "output_type": "display_data" } ], - "source": [ - "# load the KQLmagic module\n", - "%reload_ext Kqlmagic" - ] + "execution_count": 6 }, { "cell_type": "code", - "execution_count": 2, - "metadata": { - "azdata_cell_guid": "0a7aed5f-11b3-43bf-b141-ae1a5d7adf3c" - }, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "# Connect to the Application Insights API\n", - "#%kql appinsights://appid='';appkey=''\n", - "%kql appinsights://appid='962fbf96-f15e-4d37-8f91-13cae96f4b3e';appkey='8lm6537pckh323nkcp3kjksvxm2cdzt5qt85cbpj'\n", - "\n" - ] + "%kql appinsights://appid='';appkey=''" + ], + "metadata": { + "azdata_cell_guid": "0a7aed5f-11b3-43bf-b141-ae1a5d7adf3c", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [], + "execution_count": 7 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32" - }, "source": [ "## 2\\. Define filters\n", "\n", "This workbook is designed for troubleshooting a single environment. Please provide values for aadTenantId and environmentName  (or use a config file)." - ] + ], + "metadata": { + "azdata_cell_guid": "9ef1220c-d9cc-4552-9297-1428efcafb32", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": 5, - "metadata": { - "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", - "tags": [ - "hide_input" - ] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Using these parameters for the analysis:\n", - "----------------------------------------\n", - "aadTenantId 56ae956a-ef95-4bc7-9795-d2bd84b0bc9c\n", - "environmentName \n", - "startDate 2021-03-01\n", - "endDate 2021-03-10\n" - ] - } - ], "source": [ - "# Add values for AAD tenant id, environment name, and extension id here (or use a config file)\n", - "\n", - "# It is possible to leave the value for environment name blank (if you want to analyze across all values of the parameter)\n", + "# Add values for AAD tenant id, environment name, and extension id here\n", + "# It is possible to leave the value for AAD tenant id or environment name blank (if you want to analyze across all values of the parameter)\n", "\n", "# You can either use configuration file (INI file format) or set filters directly. \n", "\n", @@ -203,16 +155,13 @@ "\n", "\n", "# Add AAD tenant id and environment name here\n", - "aadTenantId = \"MyaaDtenantId\"\n", + "aadTenantId = \"\"\n", "environmentName = \"\"\n", - "#extensionId = \"MyExtensionId\"\n", - "extensionId = \"\"\n", "\n", "# date filters for the analysis\n", "# use YYYY-MM-DD format for the dates (ISO 8601)\n", - "startDate = \"2020-11-20\"\n", - "endDate = \"2020-11-24\"\n", - "\n", + "startDate = \"2021-11-01\"\n", + "endDate = \"2022-01-01\"\n", "\n", "\n", "\n", @@ -240,25 +189,46 @@ "print(\"environmentName \" + environmentName)\n", "print(\"startDate \" + startDate)\n", "print(\"endDate \" + endDate)" - ] + ], + "metadata": { + "azdata_cell_guid": "0a0785f7-a85e-4ccf-9020-732e1d4c058a", + "tags": [ + "hide_input" + ], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "name": "stdout", + "text": "Using these parameters for the analysis:\n----------------------------------------\naadTenantId \nenvironmentName \nstartDate 2021-11-01\nendDate 2022-01-01\n", + "output_type": "stream" + } + ], + "execution_count": 8 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589" - }, "source": [ "# Analyze web service usage\n", "Now you can run Kusto queries to look for possible root causes for issues about web services.\n", "\n", "Either click **Run All** above to run all sections, or scroll down to the type of analysis you want to do and manually run queries" - ] + ], + "metadata": { + "azdata_cell_guid": "5f9b698d-8a7e-4757-b27d-02f219d6c589", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117" - }, "source": [ "## Incoming Web service requests overview\n", "\n", @@ -267,16 +237,18 @@ "Incoming Web service telemetry docs: [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace)\n", "\n", "KQL sample: [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/WebServiceCalls.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/WebServiceCalls.kql)" - ] + ], + "metadata": { + "azdata_cell_guid": "2f9c2d0d-df3c-482b-af58-48416a517117", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", - "tags": [] - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -287,21 +259,61 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", "| extend category = tostring( customDimensions.category )\n", "| summarize request_count=count() by category, bin(timestamp, 1d)\n", "| render timechart title= 'Number of incoming web service requests by category'" - ] + ], + "metadata": { + "azdata_cell_guid": "a9e923e9-1d05-4acf-a230-4c5142bc3582", + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.251): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 9, + "output_type": "execute_result" + } + ], + "execution_count": 9 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -312,22 +324,63 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", - " extend category = tostring( customDimensions.category )\n", + "| extend category = tostring( customDimensions.category )\n", " , executionTimeInSec = toreal(totimespan(customDimensions.serverExecutionTime))/10000 /1000 //the datatype for executionTime is timespan \n", "| summarize count() by executionTime_sec = bin(executionTimeInSec, 10), category\n", "| extend log_count = log10( count_ )\n", "| order by category, executionTime_sec asc\n", "| render columnchart with (ycolumns = log_count, ytitle='log(count)', series = category, title= 'Execution time (in seconds) of incoming ws requests by category' ) " - ] + ], + "metadata": { + "azdata_cell_guid": "e4e56e1a-ab5d-427a-bc49-747e6ae34a75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.895): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 21, + "output_type": "execute_result" + } + ], + "execution_count": 21 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b" - }, "source": [ "## Incoming Web service throttling\n", "\n", @@ -342,947 +395,86 @@ " \n", "\n", "Note that SOAP endpoints do not have http status code in telemetry, so they will show with empty values in that dimension." - ] + ], + "metadata": { + "azdata_cell_guid": "2f7e604a-0d02-484e-9bcb-a6aa148d5f0b", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": 3, + "source": [ + "%%kql\n", + "let _aadTenantId = aadTenantId;\n", + "let _environmentName = environmentName;\n", + "let _startDate = startDate;\n", + "let _endDate = endDate;\n", + "traces\n", + "| where 1==1 \n", + " and timestamp >= todatetime(_startDate)\n", + " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", + " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", + " and customDimensions.eventId == 'RT0008'\n", + "| extend httpStatusCode = case(\n", + " isempty(customDimensions.httpStatusCode), 'SOAP (no http status available)'\n", + " , tostring( customDimensions.httpStatusCode )\n", + ")\n", + "| summarize count() by bin(timestamp, 1d), httpStatusCode\n", + "| render timechart title= 'Number of incoming web service requests by http status code'" + ], "metadata": { "azdata_cell_guid": "9ec9b678-7d66-4758-9101-4e9e5025dfcf", - "tags": [] + "tags": [], + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, "outputs": [ { "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - "

 * 962fbf96-f15e-4d37-8f91-13cae96f4b3e@applicationinsights

\n", - " \n", - " " - ], - "text/plain": [ - "" - ] + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " }, "metadata": {}, "output_type": "display_data" }, { "data": { - "application/vnd.plotly.v1+json": { - "config": { - "plotlyServerURL": "https://plot.ly" - }, - "data": [ - { - "line": { - "color": "rgb(31, 118, 179)", - "width": 1 - }, - "name": "200:count_", - "opacity": 0.8, - "type": "scatter", - "x": [ - "2021-03-03T00:00:00+00:00" - ], - "y": [ - 2 - ] - } - ], - "layout": { - "showlegend": true, - "template": { - "data": { - "bar": [ - { - "error_x": { - "color": "#2a3f5f" - }, - "error_y": { - "color": "#2a3f5f" - }, - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - } - }, - "type": "bar" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "#E5ECF6", - "width": 0.5 - } - }, - "type": "barpolar" - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "baxis": { - "endlinecolor": "#2a3f5f", - "gridcolor": "white", - "linecolor": "white", - "minorgridcolor": "white", - "startlinecolor": "#2a3f5f" - }, - "type": "carpet" - } - ], - "choropleth": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "choropleth" - } - ], - "contour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "contour" - } - ], - "contourcarpet": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "contourcarpet" - } - ], - "heatmap": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmap" - } - ], - "heatmapgl": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "heatmapgl" - } - ], - "histogram": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "histogram" - } - ], - "histogram2d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2d" - } - ], - "histogram2dcontour": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "histogram2dcontour" - } - ], - "mesh3d": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "type": "mesh3d" - } - ], - "parcoords": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "parcoords" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ], - "scatter": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatter" - } - ], - "scatter3d": [ - { - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatter3d" - } - ], - "scattercarpet": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattercarpet" - } - ], - "scattergeo": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergeo" - } - ], - "scattergl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattergl" - } - ], - "scattermapbox": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scattermapbox" - } - ], - "scatterpolar": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolar" - } - ], - "scatterpolargl": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterpolargl" - } - ], - "scatterternary": [ - { - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "type": "scatterternary" - } - ], - "surface": [ - { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "type": "surface" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#EBF0F8" - }, - "line": { - "color": "white" - } - }, - "header": { - "fill": { - "color": "#C8D4E3" - }, - "line": { - "color": "white" - } - }, - "type": "table" - } - ] - }, - "layout": { - "annotationdefaults": { - "arrowcolor": "#2a3f5f", - "arrowhead": 0, - "arrowwidth": 1 - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ], - "sequential": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1, - "#f0f921" - ] - ] - }, - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#2a3f5f" - }, - "geo": { - "bgcolor": "white", - "lakecolor": "white", - "landcolor": "#E5ECF6", - "showlakes": true, - "showland": true, - "subunitcolor": "white" - }, - "hoverlabel": { - "align": "left" - }, - "hovermode": "closest", - "mapbox": { - "style": "light" - }, - "paper_bgcolor": "white", - "plot_bgcolor": "#E5ECF6", - "polar": { - "angularaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "radialaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "scene": { - "xaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "yaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - }, - "zaxis": { - "backgroundcolor": "#E5ECF6", - "gridcolor": "white", - "gridwidth": 2, - "linecolor": "white", - "showbackground": true, - "ticks": "", - "zerolinecolor": "white" - } - }, - "shapedefaults": { - "line": { - "color": "#2a3f5f" - } - }, - "ternary": { - "aaxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "baxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - }, - "bgcolor": "#E5ECF6", - "caxis": { - "gridcolor": "white", - "linecolor": "white", - "ticks": "" - } - }, - "title": { - "x": 0.05 - }, - "xaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - }, - "yaxis": { - "automargin": true, - "gridcolor": "white", - "linecolor": "white", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "white", - "zerolinewidth": 2 - } - } - }, - "title": { - "text": "Number of incoming web service requests by http status code" - }, - "xaxis": { - "autorange": true, - "title": { - "text": "timestamp" - }, - "type": "date" - }, - "yaxis": { - "ticksuffix": "", - "title": { - "text": "count_" - }, - "type": "linear" - } - } - } + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " }, "metadata": {}, "output_type": "display_data" }, { "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - "

Done (00:02.669): 1 records

\n", - " \n", - " " - ], - "text/plain": [ - "" - ] + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.883): 0 records

\n \n " }, "metadata": {}, "output_type": "display_data" }, { "data": { - "text/html": [], - "text/plain": [ - "[{'timestamp': datetime.datetime(2021, 3, 3, 0, 0, tzinfo=tzutc()), 'httpStatusCode': '200', 'count_': 2}]" - ] + "text/plain": "[]", + "text/html": "" }, - "execution_count": 6, "metadata": {}, + "execution_count": 11, "output_type": "execute_result" } ], - "source": [ - "%%kql\n", - "let _aadTenantId = aadTenantId;\n", - "let _environmentName = environmentName;\n", - "let _startDate = startDate;\n", - "let _endDate = endDate;\n", - "traces\n", - "| where 1==1 \n", - " and timestamp >= todatetime(_startDate)\n", - " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", - " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", - " and customDimensions.eventId == 'RT0008'\n", - "| extend httpStatusCode = case(\n", - " isempty(customDimensions.httpStatusCode), 'SOAP (no http status available)'\n", - " , tostring( customDimensions.httpStatusCode )\n", - ")\n", - "| summarize count() by bin(timestamp, 1d), httpStatusCode\n", - "| render timechart title= 'Number of incoming web service requests by http status code'" - ] + "execution_count": 11 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "d640208b-ec3b-4575-876e-e37954d2d035" - }, "source": [ "## Incoming Web service requests (400 Bad Request)\n", "\n", @@ -1291,15 +483,18 @@ "Telemetry docs:\n", "\n", "- [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace)" - ] + ], + "metadata": { + "azdata_cell_guid": "d640208b-ec3b-4575-876e-e37954d2d035", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "f1614df3-74e6-4e64-b647-ac18fd5ea57c" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1313,20 +508,85 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms)\n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.httpStatusCode == '400'\n", "| summarize number_of_requests=count() by endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "f1614df3-74e6-4e64-b647-ac18fd5ea57c", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n
endpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.320): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 12, + "output_type": "execute_result" + } + ], + "execution_count": 12 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "f6a9d2d3-26b9-4536-b279-d126e5cd5609" - }, "source": [ "## Incoming Web service requests (Access denied)\n", "\n", @@ -1338,15 +598,18 @@ "Telemetry docs:\n", "\n", "- [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace)" - ] + ], + "metadata": { + "azdata_cell_guid": "f6a9d2d3-26b9-4536-b279-d126e5cd5609", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "ef3d4e9f-42bb-4492-bc3b-f88b33dcbdea" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1360,18 +623,195 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.httpStatusCode == '401'\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "ef3d4e9f-42bb-4492-bc3b-f88b33dcbdea", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [timestamp, message, severityLevel, itemType, customDimensions, customMeasurements, operation_Name, operation_Id, operation_ParentId, operation_SyntheticSource, session_Id, user_Id, user_AuthenticatedId, user_AccountId, application_Version, client_Type, client_Model, client_OS, client_IP, client_City, client_StateOrProvince, client_CountryOrRegion, client_Browser, cloud_RoleName, cloud_RoleInstance, appId, appName, iKey, sdkVersion, itemId, itemCount, _ResourceId]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
timestampmessageseverityLevelitemTypecustomDimensionscustomMeasurementsoperation_Nameoperation_Idoperation_ParentIdoperation_SyntheticSourcesession_Iduser_Iduser_AuthenticatedIduser_AccountIdapplication_Versionclient_Typeclient_Modelclient_OSclient_IPclient_Cityclient_StateOrProvinceclient_CountryOrRegionclient_Browsercloud_RoleNamecloud_RoleInstanceappIdappNameiKeysdkVersionitemIditemCount_ResourceId
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "timestamp", + "type": "datetime" + }, + { + "name": "message", + "type": "string" + }, + { + "name": "severityLevel", + "type": "integer" + }, + { + "name": "itemType", + "type": "string" + }, + { + "name": "customDimensions", + "type": "string" + }, + { + "name": "customMeasurements", + "type": "string" + }, + { + "name": "operation_Name", + "type": "string" + }, + { + "name": "operation_Id", + "type": "string" + }, + { + "name": "operation_ParentId", + "type": "string" + }, + { + "name": "operation_SyntheticSource", + "type": "string" + }, + { + "name": "session_Id", + "type": "string" + }, + { + "name": "user_Id", + "type": "string" + }, + { + "name": "user_AuthenticatedId", + "type": "string" + }, + { + "name": "user_AccountId", + "type": "string" + }, + { + "name": "application_Version", + "type": "string" + }, + { + "name": "client_Type", + "type": "string" + }, + { + "name": "client_Model", + "type": "string" + }, + { + "name": "client_OS", + "type": "string" + }, + { + "name": "client_IP", + "type": "string" + }, + { + "name": "client_City", + "type": "string" + }, + { + "name": "client_StateOrProvince", + "type": "string" + }, + { + "name": "client_CountryOrRegion", + "type": "string" + }, + { + "name": "client_Browser", + "type": "string" + }, + { + "name": "cloud_RoleName", + "type": "string" + }, + { + "name": "cloud_RoleInstance", + "type": "string" + }, + { + "name": "appId", + "type": "string" + }, + { + "name": "appName", + "type": "string" + }, + { + "name": "iKey", + "type": "string" + }, + { + "name": "sdkVersion", + "type": "string" + }, + { + "name": "itemId", + "type": "string" + }, + { + "name": "itemCount", + "type": "integer" + }, + { + "name": "_ResourceId", + "type": "string" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.833): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 13, + "output_type": "execute_result" + } + ], + "execution_count": 13 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "ffc66241-e49a-46c3-953c-edb1e3d1ef75" - }, "source": [ "## Incoming Web service requests (Not found)\n", "\n", @@ -1384,15 +824,18 @@ "Telemetry docs:\n", "\n", "- [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/telemetry-webservices-trace)" - ] + ], + "metadata": { + "azdata_cell_guid": "ffc66241-e49a-46c3-953c-edb1e3d1ef75", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "09e649eb-d8bb-43e8-8f8b-ff07c8cda005" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1406,20 +849,85 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.httpStatusCode == '404'\n", "| summarize number_of_requests=count() by endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "09e649eb-d8bb-43e8-8f8b-ff07c8cda005", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n
endpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.778): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 14, + "output_type": "execute_result" + } + ], + "execution_count": 14 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "66ab172d-9d99-4228-98c7-68a4113a91a0" - }, "source": [ "## Incoming Web service requests (Request timed out)\n", "\n", @@ -1436,15 +944,18 @@ "Performance tuning guide (you need to tune these endpoints to make them go faster)\n", "\n", "- [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer#writing-efficient-web-services](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer#writing-efficient-web-services)" - ] + ], + "metadata": { + "azdata_cell_guid": "66ab172d-9d99-4228-98c7-68a4113a91a0", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "f29afa7f-6408-4e85-a613-605d9898574d" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1458,20 +969,85 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.httpStatusCode == '408'\n", "| summarize number_of_requests=count() by endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "f29afa7f-6408-4e85-a613-605d9898574d", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n
endpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.991): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 15, + "output_type": "execute_result" + } + ], + "execution_count": 15 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "68241327-780a-4766-9e51-b37f90d595dc" - }, "source": [ "## Incoming Web service requests (Too Many Requests)\n", "\n", @@ -1488,15 +1064,18 @@ "Performance tuning guide (you need to make your web service client back-off and retry)\n", "\n", "- [https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer#writing-efficient-web-services](https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/performance/performance-developer#writing-efficient-web-services)" - ] + ], + "metadata": { + "azdata_cell_guid": "68241327-780a-4766-9e51-b37f90d595dc", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "2c9888bb-6306-4b67-a545-a40ea5f97f60" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1510,20 +1089,85 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0008'\n", " and customDimensions.httpStatusCode == '426'\n", "| summarize number_of_requests=count() by endpoint = tostring( customDimensions.endpoint ), alObjectName = tostring( customDimensions.alObjectName ), alObjectId = tostring( customDimensions.alObjectId )\n", "| order by number_of_requests desc\n", "| limit 10" - ] + ], + "metadata": { + "azdata_cell_guid": "2c9888bb-6306-4b67-a545-a40ea5f97f60", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [endpoint, alObjectName, alObjectId, number_of_requests]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n
endpointalObjectNamealObjectIdnumber_of_requests
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "endpoint", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "number_of_requests", + "type": "integer" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.882): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 16, + "output_type": "execute_result" + } + ], + "execution_count": 16 }, { "cell_type": "markdown", - "metadata": { - "azdata_cell_guid": "8cf2c901-ced8-46f3-93ef-4ccb3eaad891" - }, "source": [ "## (Outgoing) web service requests overview \n", "\n", @@ -1534,15 +1178,18 @@ "KQL sample: [https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/OutGoingWebServiceCalls.kql](https://github.com/microsoft/BCTech/blob/master/samples/AppInsights/KQL/RawData/OutGoingWebServiceCalls.kql) \n", "\n", "Explanation of different HTTP status codes: [https://en.wikipedia.org/wiki/List_of_HTTP_status_codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)" - ] + ], + "metadata": { + "azdata_cell_guid": "8cf2c901-ced8-46f3-93ef-4ccb3eaad891", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + } }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "5eb83b4b-9d27-46a7-b715-a9b2511a132d" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -1553,22 +1200,61 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0019'\n", "|extend httpStatusCode = tostring( customDimensions.httpReturnCode )\n", "| summarize request_count=count() by httpStatusCode, bin(timestamp, 1d)\n", "| order by httpStatusCode asc\n", "| render timechart title= 'Number of outgoing web service requests by HTTP status code'" - ] + ], + "metadata": { + "azdata_cell_guid": "5eb83b4b-9d27-46a7-b715-a9b2511a132d", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:02.069): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 17, + "output_type": "execute_result" + } + ], + "execution_count": 17 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "0ee463d9-4e13-4254-a338-cf0103d7e911" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -1579,7 +1265,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0019'\n", "| extend httpMethod = tostring( toupper( customDimensions.httpMethod ) )\n", @@ -1588,16 +1274,56 @@ "| summarize count() by executionTime_sec = bin(executionTimeInSec, 1), httpMethod\n", "| extend log_count = log10( count_ )\n", "| order by httpMethod, executionTime_sec asc\n", - "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = httpMethod, title= 'Execution time (seconds) of \"normal\" outgoing ws requests by method' ) \n" - ] + "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = httpMethod, title= 'Execution time (seconds) of \"normal\" outgoing ws requests by method' ) \n", + "" + ], + "metadata": { + "azdata_cell_guid": "0ee463d9-4e13-4254-a338-cf0103d7e911", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.170): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 18, + "output_type": "execute_result" + } + ], + "execution_count": 18 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "256174e8-1bc2-443b-808f-792db77637a4" - }, - "outputs": [], "source": [ "%%kql\n", "let _aadTenantId = aadTenantId;\n", @@ -1608,7 +1334,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0019'\n", "| extend httpMethod = tostring( toupper( customDimensions.httpMethod ) )\n", @@ -1617,16 +1343,56 @@ "| summarize count() by executionTime_sec = bin(executionTimeInSec, 10), httpMethod\n", "| extend log_count = log10( count_ )\n", "| order by httpMethod, executionTime_sec asc\n", - "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = httpMethod, title= 'Execution time (seconds) of slow outgoing ws requests by method' ) \n" - ] + "| render columnchart with (ycolumns = log_count, ytitle='log10(count)', series = httpMethod, title= 'Execution time (seconds) of slow outgoing ws requests by method' ) \n", + "" + ], + "metadata": { + "azdata_cell_guid": "256174e8-1bc2-443b-808f-792db77637a4", + "extensions": { + "azuredatastudio": { + "views": [] + } + } + }, + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n Kqlmagic - chart\n \n \n


EMPTY CHART (no data)

.
\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:01.390): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 19, + "output_type": "execute_result" + } + ], + "execution_count": 19 }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "azdata_cell_guid": "7d0df460-9d0c-4ff7-87a6-87a44b99b22d" - }, - "outputs": [], "source": [ "%%kql\n", "//\n", @@ -1642,7 +1408,7 @@ "| where 1==1 \n", " and timestamp >= todatetime(_startDate)\n", " and timestamp <= todatetime(_endDate) + totimespan(24h) - totimespan(1ms) \n", - " and customDimensions.aadTenantId == _aadTenantId\n", + " and (_aadTenantId == '' or customDimensions.aadTenantId == _aadTenantId)\n", " and (_environmentName == '' or customDimensions.environmentName == _environmentName )\n", " and customDimensions.eventId == 'RT0019'\n", "| extend httpMethod = tostring( toupper( customDimensions.httpMethod ) )\n", @@ -1665,28 +1431,111 @@ ", max_timeInSec=round(max_executionTimeInMS/1000,2)\n", ", perc_95InSec=round(percentile_executionTimeInMS_95/1000,2), count_, alObjectId, alObjectName, alObjectType, extensionId, extensionName, extensionVersion, httpMethod, endpoint\n", "| limit 20" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 + ], + "metadata": { + "azdata_cell_guid": "7d0df460-9d0c-4ff7-87a6-87a44b99b22d", + "extensions": { + "azuredatastudio": { + "views": [] + } + } }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" + "outputs": [ + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

 * 43d7cb5e-452b-4c08-93ca-a35109847936@applicationinsights

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "Empty DataFrame\nColumns: [avg_timeInSec, min_timeInSec, max_timeInSec, perc_95InSec, count_, alObjectId, alObjectName, alObjectType, extensionId, extensionName, extensionVersion, httpMethod, endpoint]\nIndex: []", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
avg_timeInSecmin_timeInSecmax_timeInSecperc_95InSeccount_alObjectIdalObjectNamealObjectTypeextensionIdextensionNameextensionVersionhttpMethodendpoint
\n
", + "application/vnd.dataresource+json": { + "schema": { + "fields": [ + { + "name": "avg_timeInSec", + "type": "number" + }, + { + "name": "min_timeInSec", + "type": "number" + }, + { + "name": "max_timeInSec", + "type": "number" + }, + { + "name": "perc_95InSec", + "type": "number" + }, + { + "name": "count_", + "type": "integer" + }, + { + "name": "alObjectId", + "type": "string" + }, + { + "name": "alObjectName", + "type": "string" + }, + { + "name": "alObjectType", + "type": "string" + }, + { + "name": "extensionId", + "type": "string" + }, + { + "name": "extensionName", + "type": "string" + }, + { + "name": "extensionVersion", + "type": "string" + }, + { + "name": "httpMethod", + "type": "string" + }, + { + "name": "endpoint", + "type": "string" + } + ], + "kqmagic_version": "0.1.114" + }, + "data": [] + } + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "", + "text/html": "\n \n \n \n \n \n

Done (00:00.547): 0 records

\n \n " + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": "[]", + "text/html": "" + }, + "metadata": {}, + "execution_count": 20, + "output_type": "execute_result" + } + ], + "execution_count": 20 } - }, - "nbformat": 4, - "nbformat_minor": 2 -} + ] +} \ No newline at end of file