请求遥测采样期间context
遥测是否已“分组”?
例如,下面的数据包含一个样本数为10("count": 10
)的请求,这意味着它用于表示其他9个“类似”请求; 90%的遥测实际上已被丢弃。
当请求的上下文数据完全相同时,Application Insights是否仅将数据一起采样?例如,我是否可以假设其他9个请求也来自41.191.204.0
并且自定义字段company
的值为22f0141f-b3dc-53e1-86b8-dd0727c14497
?
{
"request": [
{
"id": "bs6o2dRoL/Q=",
"name": "GET /api/resources",
"count": 10,
"responseCode": 200,
"success": true,
"url": "https://example.com/api/resources",
"urlData": {
"base": "/api/resources",
"host": "example.com",
"hashTag": "",
"protocol": "https"
},
"durationMetric": {
"value": 1073743.0,
"count": 11.0,
"min": 97613.0,
"max": 97613.0,
"stdDev": 0.0,
"sampledValue": 97613.0
}
}
],
"internal": {
"data": {
"id": "8cbd12ec-9780-11e6-b38b-c5e9335e7642",
"documentVersion": "1.61"
}
},
"context": {
"application": {
"version": "1.0.16286.5"
},
"data": {
"eventTime": "2016-10-21T11:21:16.942Z",
"isSynthetic": false,
"samplingRate": 9.09090909090909
},
"device": {
"type": "PC",
"osVersion": "Windows 10",
"roleInstance": "RD0003FF727A10",
"deviceName": "Other",
"deviceModel": "Other",
"browser": "Chrome",
"browserVersion": "Chrome 53.0",
},
"user": {
"isAuthenticated": false
},
"session": {
"isFirst": false
},
"operation": {
"id": "bs6o2dRoL/Q=",
"parentId": "bs6o2dRoL/Q=",
"name": "GET Resources/GetResourceAsync [id]"
},
"location": {
"clientip": "41.191.204.0",
"continent": "Africa",
"country": "South Africa",
"province": "Eastern Cape"
},
"custom": {
"dimensions": [
{
"company": "22f0141f-b3dc-53e1-86b8-dd0727c14497"
},
{
"factor": "100"
}
]
}
}
}
答案 0 :(得分:1)
Application Insights不会根据上下文对遥测事件进行分组,但会根据操作ID进行分组。这在SDK采样和服务器端采样之间同步,以确保您能够在相关的页面查看和请求之间导航。
因此,如果您想确保某些事件在采样中组合在一起,请将其OperationId设置为相同。
有关Application Insights如何实施抽样的详细信息,请参阅here。
希望这有帮助,
阿萨夫