你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Metrics.GetSegmentedMetricWithHttpMessagesAsync 方法

定义

检索指标数据

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.ApplicationInsights.Query.Models.MetricsSegmentedResult>> GetSegmentedMetricWithHttpMessagesAsync (string appId, string metricId, string timespan = default, System.Collections.Generic.IList<string> aggregation = default, System.Collections.Generic.IList<string> segment = default, int? top = default, string orderby = default, string filter = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSegmentedMetricWithHttpMessagesAsync : string * string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.IList<string> * Nullable<int> * string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.ApplicationInsights.Query.Models.MetricsSegmentedResult>>
override this.GetSegmentedMetricWithHttpMessagesAsync : string * string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.IList<string> * Nullable<int> * string * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.ApplicationInsights.Query.Models.MetricsSegmentedResult>>
Public Function GetSegmentedMetricWithHttpMessagesAsync (appId As String, metricId As String, Optional timespan As String = Nothing, Optional aggregation As IList(Of String) = Nothing, Optional segment As IList(Of String) = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional orderby As String = Nothing, Optional filter As String = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of MetricsSegmentedResult))

参数

appId
String

应用程序的 ID。 这是Azure 门户“API 访问设置”边栏选项卡中的应用程序 ID。

metricId
String

指标的 ID。 这是标准 AI 指标或特定于应用程序的自定义指标。 可能的值包括:“requests/count”、“requests/duration”、“requests/failed”、“users/count”、“users/authenticated”、“pageViews/count”、 “pageViews/duration”、“client/processingDuration”、“client/receiveDuration”、“client/networkDuration”、“client/sendDuration”、“client/totalDuration”、“dependencies/count”、“dependencies/failed”、“dependencies/duration”、“exceptions/count”、“exceptions/browser”、“exceptions/server”、“sessions/count”、“sessions/count”、“performanceCounters/requestExecutionTime“、”performanceCounters/requestsPerSecond“、”performanceCounters/requestsInQueue“, ”performanceCounters/memoryAvailableBytes“、”performanceCounters/exceptionsPerSecond“、”performanceCounters/processCpuPercentage“、”performanceCounters/processIOBytesPerSecond“、”performanceCounters/processPrivateBytes“、”performanceCounters/processorCpuPercentage“、”availabilityResults/availabilityPercentage“、”availabilityResults/duration“、”billing/telemetryCount', 'customEvents/count'

timespan
String

检索指标值的时间跨度。 这是 ISO8601 时间段值。 如果省略时间跨度,则使用默认时间范围 PT12H (“过去 12 小时”) 。 查询的实际时间跨度可由基于服务器的调整。 在所有情况下,用于查询的实际时间跨度都包含在响应中。

aggregation
IList<String>

计算指标值时使用的聚合。 若要一次检索多个聚合,请使用逗号分隔它们。 如果未指定聚合,则使用指标的默认聚合。

segment
IList<String>

要按其划分指标值的维度的名称。 此维度必须适用于要检索的指标。 若要一次按多个维度分段,请使用逗号 (,) 分隔它们。 在这种情况下,指标数据将按维度在 参数中列出的顺序进行分段。

top
Nullable<Int32>

要返回的段数。 此值仅在指定段时有效。

orderby
String

对段进行排序的聚合函数和方向。 此值仅在指定段时有效。

filter
String

用于筛选结果的表达式。 此值应该是有效的 OData 筛选器表达式,其中每个子句的键应是所检索指标的适用维度。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

实现

注解

获取单个指标的指标值

适用于