Отдельный порог apdex в аналитике Application Insights - PullRequest
0 голосов
/ 18 мая 2018

Используя стандартную книгу Apdex по Application Insights, я пытаюсь разделить порог apdex по имени запроса, потому что разные запросы имеют разную длительность запросов удовлетворения.Я добавил два параметра, каждый для определенного имени запроса.Я расширил аналитический запрос по столбцу apdexThresholdByName, который отличается для каждого имени запроса.Затем я изменил эту строку: расширение UserExperience = case (AverageDuration <= apdexThresholdByName, «Satisfied», AverageDuration <= 4 * apdexThreshhold, «Tolerating», «Frustrated») поместил туда мое имя столбца apdexThresholdByName вместо одного статического параметра, которыйбыл раньше.</p>

И это не работает.

Синтаксическая ошибка: "Не удалось разрешить объект 'apdexThresholdByName'"

let apdexData = {Type}
| where timestamp {TimeRange}
| where name in ({Operations}) or '*' in ({Operations})
{OperationsFilter}
| extend success = columnifexists('success', true)
| extend Failure = iff('{Calculations}' == 'ConsiderFailures' and success == false, 1, 0)
| extend InterestingDimension = iff(isempty({SegmentBy})== true, 'Unknown', {SegmentBy})
| extend apdexThresholdByName = iff('POST Insurance/PostModel [actionName/elementid/widgetname/workspace]' == ["name"], {Insurance_PostModel_actionName_elementid_widgetname_workspace_threshold}, iff('POST Insurance/PostModel [actionName/elementid/widgetname/workspace]' == ["name"], {Insurance_PostModel_widgetname_workspace_threshold}, 0))
| where InterestingDimension in ({SegmentFilters}) or '*' in ({SegmentFilters})
| summarize AverageDuration = avg(duration), Failures = sum(Failure) by user_Id, InterestingDimension
| extend UserExperience = case(AverageDuration <= apdexThresholdByName, 'Satisfied', AverageDuration <= 4 * apdexThreshhold, 'Tolerating', 'Frustrated')
| extend UserExperience = case(Failures > 0, "Frustrated", UserExperience)
| summarize Satisfied = countif(UserExperience == 'Satisfied'), Tolerating = countif(UserExperience == 'Tolerating'), Frustrated = countif(UserExperience == 'Frustrated'), Total = count() by InterestingDimension
| project InterestingDimension, ["Satisfied Users"] = Satisfied, ["Tolerating Users"] = Tolerating, ["Frustrated Users"] = Frustrated, ["Apdex Score"] = round((Satisfied + (Tolerating / 2.0)) / Total, 2), Total
| extend Relevance = iff(["Apdex Score"] == 0, pow(Total, 1.6), Total / ["Apdex Score"])
| project-rename Users = Total
| order by {ShowSegmentsBy}
| project-away Users, Relevance;
apdexData
| extend ["Apdex Interpretation"] = case(["Apdex Score"] <= 0.5, '⛔ Unacceptable', ["Apdex Score"] <= 0.7, '⚠️ Poor', ["Apdex Score"] <= 0.85, '⚠️ Fair', ["Apdex Score"] <= 0.94, '✔️ Good', '✔️ Excellent')
| project Values = InterestingDimension, ["Apdex Score"], ["Apdex Interpretation"], ["Satisfied Users"], ["Tolerating Users"], ["Frustrated Users"]

1 Ответ

0 голосов
/ 22 мая 2018

Поле apdexThresholdByName не пропускает предложение суммирования, следующее за ним.

Это предложение суммирования не содержит ни "name", ни "apdexThresholdByName" в разделе by:

| summarize AverageDuration = avg(duration), Failures = sum(Failure) by user_Id, InterestingDimension

, поэтомусегментация не распространяется вперед

...