{ "__inputs": [], "__elements": {}, "__requires": [ { "type": "panel", "id": "barchart", "name": "Bar chart", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "10.0.3" }, { "type": "datasource", "id": "grafana-azure-monitor-datasource", "name": "Azure Monitor", "version": "1.0.0" }, { "type": "panel", "id": "heatmap", "name": "Heatmap", "version": "" }, { "type": "panel", "id": "histogram", "name": "Histogram", "version": "" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "text", "name": "Text", "version": "" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "description": "The dashboard provides insights of dependency performance of Azure Apps through Application Insights.", "editable": true, "id": null, "links": [ { "asDropdown": true, "icon": "external link", "includeVars": true, "keepTime": true, "tags": ["Azure-AppInsights-Perf"], "targetBlank": true, "title": "Azure Application Insights Performance Dashboards", "tooltip": "", "type": "dashboards", "url": "" } ], "liveNow": false, "panels": [ { "datasource": { "type": "datasource", "uid": "grafana" }, "gridPos": { "h": 2, "w": 24, "x": 0, "y": 0 }, "id": 93, "options": { "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "# Performance Dependencies", "mode": "markdown" }, "pluginVersion": "10.0.3", "transparent": true, "type": "text" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 2 }, "id": 83, "panels": [], "title": "Application Insights - Performance - Dependencies", "type": "row" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge", "valueDisplayMode": "text" } } ] }, { "matcher": { "id": "byName", "options": "type" }, "properties": [ { "id": "links", "value": [ { "targetBlank": true, "title": "Open on Explorer", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/${ns}/${res}\"],\"filters\":[{\"property\":\"type\",\"filters\":[\"${__data.fields.type}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"dependencies\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ] } ] }, { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "Duration_95th" }, "properties": [ { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "AVG_Duration" }, "properties": [ { "id": "links" } ] } ] }, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 3 }, "id": 82, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\nset truncationmaxrecords=10000;set truncationmaxsize=67108864;set truncationmaxrecords=10000;set truncationmaxsize=67108864;\r\ndependencies\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\r\n| summarize Count=sum(itemCount), AVG_Duration=sum(duration * itemCount)/sum(itemCount), Duration_95th=percentile(duration,95) by type\r\n| sort by Count desc\r\n| take 3", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A" } ], "title": "Top 3 Dependencies", "type": "table" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "fixed" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 64, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "users/count_unique" }, "properties": [ { "id": "displayName", "value": "Users (Unique)" } ] }, { "matcher": { "id": "byName", "options": "sessions/count_unique" }, "properties": [ { "id": "displayName", "value": "Sessions (Unique)" }, { "id": "color", "value": { "fixedColor": "purple", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Max" }, "properties": [ { "id": "color", "value": { "fixedColor": "semi-dark-orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "P95" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "MAX" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 10, "w": 13, "x": 0, "y": 8 }, "id": 80, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n// calculate average dependency duration for all dependencies\n| summarize AVG = avg(duration), P95 = percentiles(duration, 95), MAX = max(duration) by bin(timestamp, $__interval)\n| project timestamp, AVG = AVG/1000, P95 = P95/1000, MAX = MAX/1000\n| order by timestamp asc\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Server Dependencies Response Time (sec)", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "custom": { "fillOpacity": 46, "gradientMode": "scheme", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1 }, "displayName": "Request Count", "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "dark-green", "value": null }, { "color": "semi-dark-green", "value": 80 }, { "color": "green", "value": 90 }, { "color": "light-green", "value": 100 } ] }, "unit": "none" }, "overrides": [ { "__systemRef": "hideSeriesFrom", "matcher": { "id": "byNames", "options": { "mode": "exclude", "names": ["Request Count"], "prefix": "All except:", "readOnly": true } }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": false, "tooltip": false, "viz": true } } ] } ] }, "gridPos": { "h": 10, "w": 11, "x": 13, "y": 8 }, "id": 81, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "bucketOffset": 0, "legend": { "calcs": [], "displayMode": "table", "placement": "bottom", "showLegend": true } }, "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n// calculate average request duration for all requests\n| extend ResponseTime = duration/1000\n| project timestamp, ResponseTime\n| order by timestamp asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Distribution of Server Dependency Response Time (ms)", "transformations": [], "type": "histogram" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "fixed" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 62, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "users/count_unique" }, "properties": [ { "id": "displayName", "value": "Users (Unique)" } ] }, { "matcher": { "id": "byName", "options": "sessions/count_unique" }, "properties": [ { "id": "displayName", "value": "Sessions (Unique)" }, { "id": "color", "value": { "fixedColor": "purple", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Max" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-blue", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 9, "w": 13, "x": 0, "y": 18 }, "id": 84, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n// calculate average request duration for all requests\n| summarize Count = count() by bin(timestamp, $__interval)\n| order by timestamp asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Server Requests (count)", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "scaleDistribution": { "type": "linear" } } }, "overrides": [] }, "gridPos": { "h": 9, "w": 11, "x": 13, "y": 18 }, "id": 85, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "calculate": true, "calculation": {}, "cellGap": 2, "cellValues": {}, "color": { "exponent": 0.5, "fill": "dark-orange", "mode": "scheme", "reverse": false, "scale": "exponential", "scheme": "Greens", "steps": 128 }, "exemplars": { "color": "rgba(255,0,255,0.7)" }, "filterValues": { "le": 1e-9 }, "legend": { "show": true, "showLegend": true }, "rowsFrame": { "layout": "auto" }, "showValue": "never", "tooltip": { "show": true, "yHistogram": false }, "yAxis": { "axisPlacement": "left", "reverse": false, "unit": "short" } }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n// calculate average request duration for all requests\n| extend ResponseTime = duration/1000\n| project timestamp, ResponseTime\n| order by timestamp asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Count of Requests by Server Response Time (sec)", "transformations": [], "type": "heatmap" }, { "datasource": { "type": "datasource", "uid": "grafana" }, "gridPos": { "h": 2, "w": 24, "x": 0, "y": 27 }, "id": 92, "options": { "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "Click on a bar on the chart below to set the minimum and maximum duration. To reset the zoom, change the Minimum Duration and Maximum duration variables.", "mode": "markdown" }, "pluginVersion": "10.0.3", "transparent": true, "type": "text" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "Click on a bar on the chart below to set the minimum and maximum duration. To reset the zoom, change the Minimum Duration and Maximum duration variables.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": true, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "fillOpacity": 80, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1, "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "min": 0 }, "overrides": [ { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "links", "value": [ { "title": "Set Minimum Duration (Current: $min_duration}", "url": "/d/Azure-AppInsights-Perf-Dependencies/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${dependency:queryparam}&${max_duration:queryparam}&var-min_duration=${__data.fields[\"Duration (ms)\"]}" }, { "title": "Set Maximum Duration (Current: $max_duration)", "url": "/d/Azure-AppInsights-Perf-Dependencies/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${dependency:queryparam}&${min_duration:queryparam}&var-max_duration=${__data.fields[\"Duration (ms)\"]}" } ] } ] }, { "matcher": { "id": "byName", "options": "Duration (ms)" }, "properties": [ { "id": "links" } ] } ] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 29 }, "id": 91, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "barRadius": 0, "barWidth": 0.97, "fullHighlight": true, "groupWidth": 0.7, "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "orientation": "auto", "showValue": "never", "stacking": "none", "tooltip": { "mode": "multi", "sort": "none" }, "xField": "Duration (ms)", "xTickLabelRotation": 0, "xTickLabelSpacing": 100 }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\n// distribution of dependencies by logarithmic duration buckets\nlet numberOfBuckets = 100;\n// filter to a subset of dependencies\n\nlet dataset = dependencies\n| where client_Type != \"Browser\"\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n| extend value=duration\n| project itemCount, value;\n// calculate the maximum duration for all dependencies\nlet maxValue=toscalar(dataset | summarize max(value));\n// calculate the logarithmic base that determines the start of each bucket\n// use the max duration to ensure the scale spans all possible durations in the data set\nlet bucketBase = pow(maxValue, 1/todouble(numberOfBuckets));\n// define a table with an index for each bucket to allow for buckets with 0 dependencies\nlet bucketSlots=range bucketSlot from 0 to numberOfBuckets - 1 step 1;\n// map dependency counts to the correct bucket and apply to the scale by joining with the complete set of buckets\nbucketSlots | join kind=leftouter (dataset\n// any durations under 1ms are rounded up to 1 ms\n// calls with durations under 1ms can be viewed in more detail using the linear scale\n| extend adjustedValue = iff(value<1, 1.0, value)\n// calculate the bucket slot for each dependency by applying logarithmic scale\n| extend bucketSlotRaw = tolong(bin(log(adjustedValue)/log(bucketBase), 1))\n// calculate the dependency count by duration bucket (rounded to whole number)\n| summarize count_=sum(itemCount) by bucketSlot=iff(bucketSlotRaw > numberOfBuckets - 1, numberOfBuckets - 1, bucketSlotRaw)) on bucketSlot\n| order by bucketSlot asc\n// calculate the real duration value for each bucket based on both the index and the bucket base (rounded to whole number)\n| project\n [\"Duration (ms)\"]=floor(pow(bucketBase, bucketSlot), 1),\n counts=iff(isnull(count_), 0, count_)\n| summarize Count=sum(counts) by [\"Duration (ms)\"]\n| where ['Duration (ms)'] >= todouble(minDuration)\n| order by [\"Duration (ms)\"] asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Dependency count by Duration (ms)", "transformations": [], "type": "barchart" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "fixed" }, "links": [ { "title": "", "url": "/d/Azure-AppInsights-Perf-Dependencies/?orgId=1&${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${__value.time}&${dependency:queryparam}" } ], "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 3, "w": 8, "x": 0, "y": 39 }, "id": 86, "interval": "60s", "links": [ { "title": "Reset dependency to 'All'", "url": "/d/Azure-AppInsights-Perf-Dependencies/?${__all_variables}" } ], "maxDataPoints": 150, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\ndependencies\n| where $__timeFilter(timestamp)\n// additional filters can be applied here\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| count\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "$dependency Dependencies (count)", "transformations": [], "type": "stat" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-red", "mode": "fixed" }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "dark-red" } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "links", "value": [ { "targetBlank": true, "title": "Open on failures dashboard", "url": "/d/Azure-AppInsights-Failures-Dependencies/?${__all_variables}" } ] } ] } ] }, "gridPos": { "h": 3, "w": 8, "x": 8, "y": 39 }, "id": 87, "interval": "60s", "links": [ { "targetBlank": true, "title": "Open on failures dashboard", "url": "/d/Azure-AppInsights-Failures-Dependencies/?${__all_variables}" } ], "maxDataPoints": 150, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n| where success == false\n| count\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Number of failed dependencies matching $dependency", "transformations": [], "type": "stat" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "Click on a dependency name to filter dashboard.", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "links": [ { "targetBlank": true, "title": "Show list of sample transactions", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/${ns}/${res}\"],\"filters\":[{\"property\":\"type\",\"filters\":[\"${__data.fields.type}\"],\"operation\":\"eq\"}, {\"property\":\"target\",\"filters\":[\"${__data.fields.target}\"],\"operation\":\"eq\"}, {\"property\":\"name\",\"filters\":[\"${__data.fields.name}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"dependencies\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ], "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "#EAB839", "value": 0.5 }, { "color": "dark-red", "value": 1 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Avg" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "custom.width", "value": 164 } ] }, { "matcher": { "id": "byName", "options": "Dependency name" }, "properties": [ { "id": "custom.width", "value": 161 }, { "id": "links", "value": [ { "title": "Show list of matching dependencies", "url": "d/Azure-AppInsights-Perf-Dependencies/?orgId=1&${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${__value.time}&${min_duration:queryparam}&${max_duration:queryparam}&var-dependency=${__data.fields[\"Dependency name\"]}" } ] } ] }, { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "custom.hidden", "value": false }, { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge", "valueDisplayMode": "text" } }, { "id": "links", "value": [ { "targetBlank": true, "title": "Open dependencies in explorer", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/${ns}/${res}\"],\"filters\":[{\"property\":\"type\",\"filters\":[\"${__data.fields.type}\"],\"operation\":\"eq\"}, {\"property\":\"name\",\"filters\":[\"${__data.fields.name}\"],\"operation\":\"eq\"}, {\"property\":\"target\",\"filters\":[\"${__data.fields.target}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"dependencies\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ] } ] }, { "matcher": { "id": "byName", "options": "type" }, "properties": [ { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "target" }, "properties": [ { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "name" }, "properties": [ { "id": "custom.hidden", "value": true }, { "id": "filterable", "value": true } ] } ] }, "gridPos": { "h": 14, "w": 8, "x": 0, "y": 42 }, "id": 88, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Count" } ] }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "set truncationmaxrecords=10000;set truncationmaxsize=67108864; \nlet m = dependencies\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\" \n| project itemCount, duration, typeTransform=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), targetTransform=tostring(split(target, \" | cid-v1\")[0]), name, type, target;\nm\n| summarize Count=sum(itemCount), Avg=sum(itemCount * duration) / sum(itemCount)\n| project [\"Dependency name\"]=\"All\", Avg, Count\n| union(\nm\n| summarize Count=sum(itemCount), Avg=sum(itemCount * duration) / sum(itemCount) by typeTransform=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), targetTransform=tostring(split(target, \" | cid-v1\")[0]), name, target, type\n| sort by Avg desc\n| project [\"Dependency name\"]=strcat(typeTransform, \": \", name , \" \", targetTransform), Avg, Count, type, target, name)\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top Dependencies by Avg Duration", "transformations": [], "type": "table" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "Click on the OperationID or dependency name to open the trace details in explorer", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "orange", "value": 0.5 }, { "color": "dark-red", "value": 1 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "ResponseTime" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "color", "value": { "fixedColor": "dark-blue", "mode": "fixed" } }, { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "Dependency Name" }, "properties": [ { "id": "custom.width", "value": 300 }, { "id": "links", "value": [ { "targetBlank": true, "title": "Open dependencies in explorer", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/${ns}/${res}\"],\"filters\":[{\"property\":\"type\",\"filters\":[\"${__data.fields.type}\"],\"operation\":\"eq\"}, {\"property\":\"name\",\"filters\":[\"${__data.fields.name}\"],\"operation\":\"eq\"}, {\"property\":\"target\",\"filters\":[\"${__data.fields.target}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"dependencies\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ] } ] }, { "matcher": { "id": "byName", "options": "ResponseCode" }, "properties": [ { "id": "custom.width", "value": 211 } ] }, { "matcher": { "id": "byName", "options": "ResponseCode" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } } ] }, { "matcher": { "id": "byName", "options": "ResponseCode" }, "properties": [ { "id": "mappings", "value": [ { "options": { "200": { "color": "dark-green", "index": 0 } }, "type": "value" }, { "options": { "from": 201, "result": { "color": "dark-orange", "index": 1 }, "to": 399 }, "type": "range" }, { "options": { "from": 400, "result": { "color": "dark-red", "index": 2 }, "to": 999 }, "type": "range" } ] }, { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "OperationID" }, "properties": [ { "id": "links", "value": [ { "targetBlank": true, "title": "Open Trace Details", "url": "/explore?left={\r\n\t\"datasource\": \"${ds}\",\r\n\t\"queries\": [{\r\n\t\t\"azureTraces\": {\r\n\r\n\t\t\t\"operationId\": \"${__data.fields.OperationID}\",\r\n\r\n\t\t\t\"resources\": [\"/subscriptions/${sub}/resourceGroups/${rg}/providers/${ns}/${res}\"],\r\r\n\r\n\t\t\t\"resultFormat\": \"trace\"\r\n\r\n\r\n\r\n\r\n\t\t},\r\n\t\t\"datasource\": \"${ds}\",\r\n\t\t\"refId\": \"A\",\r\n\r\n\t\t\"queryType\": \"Azure Traces\"\r\n\t}],\r\n\t\"range\": {\r\n\t\t\"from\": \"${__from}\",\r\n\t\t\"to\": \"${__to}\"\r\n\t}\r\n}" } ] } ] }, { "matcher": { "id": "byName", "options": "target" }, "properties": [ { "id": "custom.width", "value": 251 }, { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "type" }, "properties": [ { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "name" }, "properties": [ { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "Score" }, "properties": [ { "id": "custom.hidden", "value": true } ] } ] }, "gridPos": { "h": 14, "w": 16, "x": 8, "y": 42 }, "id": 89, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [] }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let minDuration = iif(isempty(\"$min_duration\"), \"0\", \"$min_duration\");\nlet maxDuration = iif(isempty(\"$max_duration\"), \"0\", \"$max_duration\");\n\nlet min_length_8 = (s: string) {\n let len = strlen(s);\n case(len == 1, strcat(s, s, s, s, s, s, s, s),\n len == 2 or len == 3, strcat(s, s, s, s),\n len == 4 or len == 5 or len == 6 or len == 7, strcat(s, s),\n s)\n};\nlet ai_hash = (s: string) {\n abs(toint(__hash_djb2(min_length_8(s))))\n};\n\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| extend typeTransform=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), targetTransform=tostring(split(target, \" | cid-v1\")[0])\n| extend [\"Dependency Name\"] = strcat(typeTransform, \": \", name, \" \", targetTransform)\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n//| where returncode in ($return_code)\n| project [\"Dependency Name\"], target, ResponseCode = resultCode, ResponseTime = duration, OperationID = operation_Id, Score=ai_hash(operation_Id), type, name\n| top 20 by Score asc\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top 20 Dependencies matching $dependency by Relevance", "transformations": [], "type": "table" } ], "refresh": "", "revision": 1, "schemaVersion": 38, "style": "dark", "tags": ["Azure-AppInsights-Perf"], "templating": { "list": [ { "current": {}, "hide": 0, "includeAll": false, "label": "Datasource", "multi": false, "name": "ds", "options": [], "query": "grafana-azure-monitor-datasource", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": false, "label": "Subscription", "multi": false, "name": "sub", "options": [], "query": { "grafanaTemplateVariableFn": { "kind": "SubscriptionsQuery", "rawQuery": "Subscriptions()" }, "queryType": "Azure Subscriptions", "refId": "A" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": false, "label": "Resource Group", "multi": false, "name": "rg", "options": [], "query": { "grafanaTemplateVariableFn": { "kind": "ResourceGroupsQuery", "rawQuery": "ResourceGroups($sub)", "subscription": "$sub" }, "queryType": "Azure Resource Groups", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 2, "includeAll": false, "label": "Namespace", "multi": false, "name": "ns", "options": [], "query": { "grafanaTemplateVariableFn": { "kind": "MetricNamespaceQuery", "rawQuery": "Namespaces($sub, $rg)", "resourceGroup": "$rg", "subscription": "$sub" }, "queryType": "Azure Namespaces", "refId": "A", "resourceGroup": "$rg", "subscription": "$sub" }, "refresh": 1, "regex": "([mM](icrosoft)\\.[iI](nsights)/(components))", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "ResourceNames($sub, $rg, $ns)", "hide": 0, "includeAll": false, "label": "Resource", "multi": false, "name": "res", "options": [], "query": "ResourceNames($sub, $rg, $ns)", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "allValue": "\"All\"", "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": true, "label": "Dependency", "multi": true, "name": "dependency", "options": [], "query": { "azureLogAnalytics": { "query": "dependencies\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\r\n| project [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target)\r\n| summarize count() by [\"Dependency Name\"]\r\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"] }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": false, "label": "Minimum Duration (ms)", "multi": false, "name": "min_duration", "options": [], "query": { "azureLogAnalytics": { "query": "dependencies\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\r\n| project [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target), duration\r\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\r\n| top 1 by duration asc\r\n| project tostring(duration)", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"] }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": false, "label": "Maximum Duration (ms)", "multi": false, "name": "max_duration", "options": [], "query": { "azureLogAnalytics": { "query": "dependencies\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| extend type=iff(tolower(type) == \"http (tracked component)\", \"HTTP\", type), target=tostring(split(target, \" | cid-v1\")[0])\r\n| project [\"Dependency Name\"] = strcat(type, \": \", name, \" \", target), duration\r\n| where (\"All\" in ($dependency) or [\"Dependency Name\"] in ($dependency))\r\n| top 1 by duration desc\r\n| project tostring(duration)", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"] }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Azure / Insights / Applications - Performance - 2. Dependencies", "uid": "Azure-AppInsights-Perf-Dependencies", "version": 50 }