Interface MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute

All Known Subinterfaces:
MetricDefinition.MetricsQueryDefinition
Enclosing interface:
MetricDefinition.MetricsQueryDefinitionStages

public static interface MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute
The stage of a Metric query allowing to specify optional filters and execute the query.
  • Method Details

    • withAggregation

      Sets the list of aggregation types to retrieve.
      Parameters:
      aggregation - The list of aggregation types (comma separated) to retrieve.
      Returns:
      the stage of optional query parameter definition and query execution.
    • withInterval

      MetricDefinition.MetricsQueryDefinitionStages.WithMetricsQueryExecute withInterval(org.joda.time.Period interval)
      Sets the interval of the query.
      Parameters:
      interval - The interval of the query.
      Returns:
      the stage of optional query parameter definition and query execution.
    • withOdataFilter

      Sets the **$filter** that is used to reduce the set of metric data returned. <br>Example:<br> Metric contains metadata A, B and C.<br> - Return all time series of C where A = a1 and B = b1 or b2<br> **$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br> - Invalid variant:<br> **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br> This is invalid because the logical or operator cannot separate two different metadata names.<br> - Return all time series where A = a1, B = b1 and C = c1:<br> **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br> - Return all time series where A = a1<br> **$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.
      Parameters:
      odataFilter - the **$filter** to reduce the set of the returned metric data.
      Returns:
      the stage of optional query parameter definition and query execution.
    • withResultType

      Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Possible values include: 'Data', 'Metadata'
      Parameters:
      resultType - the type of metric to retrieve.
      Returns:
      the stage of optional query parameter definition and query execution.
    • selectTop

      Sets the maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.
      Parameters:
      top - the maximum number of records to retrieve.
      Returns:
      the stage of optional query parameter definition and query execution.
    • orderBy

      Sets the aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.
      Parameters:
      orderBy - the aggregation to use for sorting results and the direction of the sort.
      Returns:
      the stage of optional query parameter definition and query execution.
    • filterByNamespace

      Filters Metrics for a given namespace.
      Parameters:
      namespaceName - Metric namespace to query metric definitions for.
      Returns:
      the stage of optional query parameter definition and query execution.
    • execute

      MetricCollection execute()
      Executes the query.
      Returns:
      Metric collection received after query execution.
    • executeAsync

      rx.Observable<MetricCollection> executeAsync()
      Executes the query.
      Returns:
      a representation of the deferred computation of Metric collection query call