2025-04-01 10:38:02 +09:00

1655 lines
50 KiB
JSON

{
"__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 request performance of Azure Apps through Application Insights.",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"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": 68,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "# Performance - Operations",
"mode": "markdown"
},
"pluginVersion": "10.0.3",
"transparent": true,
"type": "text"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 2
},
"id": 57,
"panels": [],
"title": "Application Insights - Performance - Operations",
"type": "row"
},
{
"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": 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": 3
},
"id": 55,
"interval": "60s",
"links": [
{
"targetBlank": true,
"title": "${res} | Users",
"url": "https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/${sub}/resourceGroups/${rg}/providers/microsoft.insights/components/${res}/segmentationUsers"
}
],
"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\nrequests// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n// calculate average request duration for all requests\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\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 Response Time (sec)",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-azure-monitor-datasource",
"uid": "${ds}"
},
"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": 3
},
"id": 61,
"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\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\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 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": 13
},
"id": 58,
"interval": "60s",
"links": [
{
"targetBlank": true,
"title": "${res} | Users",
"url": "https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/${sub}/resourceGroups/${rg}/providers/microsoft.insights/components/${res}/segmentationUsers"
}
],
"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\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\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": 13
},
"id": 62,
"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\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\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": 22
},
"id": 69,
"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": {
"fixedColor": "green",
"mode": "thresholds"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
},
"links": [],
"mappings": [],
"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": [
{
"matcher": {
"id": "byName",
"options": "Duration (ms)"
},
"properties": [
{
"id": "links",
"value": [
{
"title": "Set Min Duration (Current: $min_duration)",
"url": "/d/Azure-AppInsights-Perf-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${operation_name:queryparam}&${max_duration:queryparam}&var-min_duration=${__data.fields[\"Duration (ms)\"]}"
},
{
"title": "Set Max Duration (Current: $max_duration)",
"url": "/d/Azure-AppInsights-Perf-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${operation_name:queryparam}&${min_duration:queryparam}&var-max_duration=${__data.fields[\"Duration (ms)\"]}"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Count"
},
"properties": [
{
"id": "links"
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 24
},
"id": 67,
"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
},
"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 requests by logarithmic duration buckets\nlet timeGrain=5m;\nlet numberOfBuckets = 100;\n// filter to a subset of requests\n\nlet dataset = requests\n | where $__timeFilter(timestamp)\n | where client_Type != \"Browser\"\n // additional filters can be applied here\n | where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\n | where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n | extend value=duration\n | project itemCount, value;\n// calculate the maximum duration for all requests\nlet maxValue=toscalar(dataset\n | 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 requests\nlet bucketSlots=range bucketSlot from 0 to numberOfBuckets - 1 step 1;\n// map request counts to the correct bucket and apply to the scale by joining with the complete set of buckets\nbucketSlots\n| 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 request by applying logarithmic scale\n | extend bucketSlotRaw = tolong(bin(log(adjustedValue) / log(bucketBase), 1))\n // calculate the request count by duration bucket (rounded to whole number)\n | summarize count_=sum(itemCount) by bucketSlot=iff(bucketSlotRaw > numberOfBuckets - 1, numberOfBuckets - 1, bucketSlotRaw))\n 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| where ['Duration (ms)'] >= $min_duration\n| summarize Count=sum(counts) by [\"Duration (ms)\"]\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": "Request Count by Duration (ms)",
"transformations": [],
"type": "barchart"
},
{
"datasource": {
"type": "grafana-azure-monitor-datasource",
"uid": "${ds}"
},
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "green",
"mode": "fixed"
},
"mappings": [],
"noValue": "--",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 8,
"x": 0,
"y": 32
},
"id": 66,
"interval": "60s",
"links": [
{
"title": "Reset Operation names to 'All'",
"url": "/d/Azure-AppInsights-Perf-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${min_duration:queryparam}&${max_duration:queryparam}&var-operation-name=All"
}
],
"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": "requests\n// additional filters can be applied here\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": "All Operations (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",
"value": null
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Count"
},
"properties": [
{
"id": "links",
"value": [
{
"title": "Open Failures Dashboard",
"url": "/d/Azure-AppInsights-Failures-Operations/?${__all_variables}",
"targetBlank": true
}
]
}
]
}
]
},
"gridPos": {
"h": 3,
"w": 8,
"x": 8,
"y": 32
},
"id": 65,
"interval": "60s",
"links": [
{
"targetBlank": true,
"title": "Open Failures dashboard",
"url": "/d/Azure-AppInsights-Failures-Operations/?${__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\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\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 operations matching $operation_name",
"transformations": [],
"type": "stat"
},
{
"datasource": {
"type": "grafana-azure-monitor-datasource",
"uid": "${ds}"
},
"description": "Click on an operation name to filter this 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/Microsoft.Insights/components/${res}\"],\"filters\":[{\"property\":\"operation_Name\",\"filters\":[\"${__data.fields.operation_Name}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}"
}
],
"mappings": [],
"noValue": "--",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"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": "Max"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"mode": "basic",
"type": "gauge"
}
},
{
"id": "custom.width",
"value": 111
}
]
},
{
"matcher": {
"id": "byName",
"options": "operation_Name"
},
"properties": [
{
"id": "custom.width",
"value": 161
},
{
"id": "links",
"value": [
{
"targetBlank": false,
"title": "Filter dashboard to this operation",
"url": "/d/Azure-AppInsights-Perf-Operations?orgId=1&${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${min_duration:queryparam}&${max_duration:queryparam}&${__value.time}&var-operation_name=${__data.fields.operation_Name}"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Count"
},
"properties": [
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "Show list of transactions matching operation name ",
"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\":\"operation_Name\",\"filters\":[\"${__data.fields.operation_Name}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}"
}
]
},
{
"id": "custom.cellOptions",
"value": {
"mode": "basic",
"type": "gauge",
"valueDisplayMode": "text"
}
}
]
}
]
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 35
},
"id": 59,
"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": "\nlet dataset = requests\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n;\ndataset\n| summarize Avg = avg(duration)/1000, Max = max(duration)/1000, Count = count()\n| project operation_Name=\"All\", Avg, Max, Count\n| union(dataset\n| summarize Avg = avg(duration)/1000, Max = max(duration)/1000, Count = count() by operation_Name\n| top 20 by Avg desc\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 Operation Names by count",
"transformations": [],
"type": "table"
},
{
"datasource": {
"type": "grafana-azure-monitor-datasource",
"uid": "${ds}"
},
"description": "Click on the OperationID or Name to open the trace details in explore mode.",
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "green",
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"noValue": "--",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"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": "Name"
},
"properties": [
{
"id": "custom.width",
"value": 173
}
]
},
{
"matcher": {
"id": "byName",
"options": "ResponseCode"
},
"properties": [
{
"id": "custom.width",
"value": 211
}
]
},
{
"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"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
},
{
"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/Microsoft.Insights/components/${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": "Name"
},
"properties": [
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "Open explorer with this name",
"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\":\"operation_Name\",\"filters\":[\"${__data.fields.Name}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Score"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
}
]
},
"gridPos": {
"h": 14,
"w": 16,
"x": 8,
"y": 35
},
"id": 63,
"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};\nrequests\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\n| where $__timeFilter(timestamp)\n| where duration >= todouble(minDuration) and duration <= todouble(maxDuration)\n| project Name = operation_Name, ResponseCode = resultCode, ResponseTime = duration, OperationID = operation_Id, Score=ai_hash(operation_Id)\n| top 20 by Score asc",
"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 Sample Operations matching $operation_name 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": "Operation names",
"multi": true,
"name": "operation_name",
"options": [],
"query": {
"azureLogAnalytics": {
"query": "requests\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| summarize count() by operation_Name\r\n",
"resource": "/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res",
"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"
},
{
"allValue": "\"All\"",
"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": "requests\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\r\n| top 1 by duration asc\r\n| project tostring(duration)\r\n",
"resource": "/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res",
"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"
},
{
"allValue": "\"All\"",
"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": "requests\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| where (\"All\" in ($operation_name) or operation_Name in ($operation_name))\r\n| top 1 by duration\r\n| project tostring(duration)\r\n",
"resource": "/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res",
"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 - 1. Operations",
"uid": "Azure-AppInsights-Perf-Operations",
"version": 68
}