вы также можете сделать это в Azure книгах на портале, однако вместо передачи всех идентификаторов приложений в тексте запроса ваш запрос будет буквально
union requests, dependencies
| where operation_Id == "eec42c35781a8e4199c420b8fda7bf87"
, а затем вы ' d выберите приложения для выполнения запроса из средства выбора ресурсов, что позволяет выполнять множественный выбор.
вы также можете превратить идентификатор операции, таблицы, временной диапазон, ресурсы в параметры и т. д. c: пример книги
рабочий пример этой книги как json:
{
"version": "Notebook/1.0",
"items": [
{
"type": 9,
"content": {
"version": "KqlParameterItem/1.0",
"crossComponentResources": [
"value::selected"
],
"parameters": [
{
"id": "75168f58-a753-45aa-97d9-89bf8f99d18e",
"version": "KqlParameterItem/1.0",
"name": "timeRange",
"label": "Time Range",
"type": 4,
"isRequired": true,
"value": {
"durationMs": 86400000
},
"typeSettings": {
"selectableValues": [
{
"durationMs": 300000
},
{
"durationMs": 900000
},
{
"durationMs": 1800000
},
{
"durationMs": 3600000
},
{
"durationMs": 14400000
},
{
"durationMs": 43200000
},
{
"durationMs": 86400000
},
{
"durationMs": 172800000
},
{
"durationMs": 259200000
},
{
"durationMs": 604800000
},
{
"durationMs": 1209600000
},
{
"durationMs": 2419200000
},
{
"durationMs": 2592000000
},
{
"durationMs": 5184000000
},
{
"durationMs": 7776000000
}
],
"allowCustom": true
},
"timeContext": {
"durationMs": 86400000
}
},
{
"id": "4e02493e-dbbe-478a-8992-d0897a4cb92c",
"version": "KqlParameterItem/1.0",
"name": "operationId",
"type": 1,
"isRequired": true,
"value": "eec42c35781a8e4199c420b8fda7bf87",
"timeContext": {
"durationMs": 86400000
}
},
{
"id": "6a545372-8f82-43bc-b77c-9074c1ff18d0",
"version": "KqlParameterItem/1.0",
"name": "tables",
"label": "Tables",
"type": 2,
"isRequired": true,
"multiSelect": true,
"quote": "",
"delimiter": ",",
"value": [
"requests",
"dependencies"
],
"typeSettings": {
"additionalResourceOptions": []
},
"jsonData": "[\"requests\", \"dependencies\", \"traces\", \"exceptions\"]",
"timeContext": {
"durationMs": 86400000
}
},
{
"id": "da2d5bd6-cdfe-43c1-b6d6-0a211d74953b",
"version": "KqlParameterItem/1.0",
"name": "Resources",
"type": 5,
"isRequired": true,
"multiSelect": true,
"quote": "'",
"delimiter": ",",
"query": "resources | where type =~ \"microsoft.insights/components\"\r\n| project id, name, selected=0, group=resourceGroup | order by 1 asc",
"crossComponentResources": [
"value::selected"
],
"value": [
],
"typeSettings": {
"limitSelectTo": 10,
"additionalResourceOptions": []
},
"timeContext": {
"durationMs": 86400000
},
"queryType": 1,
"resourceType": "microsoft.resourcegraph/resources"
}
],
"style": "above",
"queryType": 1,
"resourceType": "microsoft.resourcegraph/resources"
},
"name": "parameters - 0"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "union {tables}\r\n| where operation_Id == \"{operationId}\"",
"size": 0,
"title": "Operation \"{operationId}\" in {tables} over {timeRange:label}",
"timeContext": {
"durationMs": 0
},
"timeContextFromParameter": "timeRange",
"queryType": 0,
"resourceType": "microsoft.insights/components",
"crossComponentResources": [
"{Resources}"
]
},
"name": "query - 1"
}
],
"fallbackResourceIds": [
"Azure Monitor"
],
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}