Udostępnij za pośrednictwem


MetricsQueryOptions Class

Definition

public class MetricsQueryOptions
type MetricsQueryOptions = class
Public Class MetricsQueryOptions
Inheritance
MetricsQueryOptions

Constructors

MetricsQueryOptions()

Properties

Aggregations

Gets the list of metric aggregations to retrieve.

Although this collection cannot be set, it can be modified. See Object initializers with collection read-only property initialization.

Filter

Gets or sets the filter that is used to refine the set of metric data returned. MetricResult contains metadata A, B, and C.

- Return all time series of C where A = a1 and B = b1 or b2:
A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq ''
- Invalid variant:
A eq 'a1' and B eq 'b1' and C eq '
' or B = 'b2'
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
A eq 'a1' and B eq 'b1' and C eq 'c1'
- Return all time series where A = a1
A eq 'a1' and B eq '' and C eq ''.

Granularity

Gets or sets the interval at which to sample metrics.

MetricNamespace

Gets or sets the metric namespace to query. For a list of valid namespaces by Azure resource, see Metrics by resource provider.

OrderBy

Gets or sets the aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.

Size

Gets or sets the maximum number of records to retrieve. Valid only when Filter is specified. Defaults to null.

TimeRange

Gets or sets the timespan over which the metric will be queried.

Applies to