Skip to main content

counter

Query a Metric in counter format. A single Metric value for the given time range and filters.

Arguments

  • input required CounterInput

    The fields for querying a Metric in counter format.

    A Metric's counter query returns a single value over a given time range.

    • input.metricId optional ID

      The ID of the Metric to query.

      Required if metricName is not specified.

    • input.metricName optional String

      The name of the Metric to query.

      Required if metricId is not specified.

    • input.timeRange required TimeRangeInput

      The time range for calculating the counter.

    • input.timeZone optional String

      The time zone to use. Dates and times are always returned in UTC, but setting the time zone influences relative time ranges and granularities.

      You can set this to "America/Los_Angeles", "Europe/Berlin", or any other value in the IANA time zone database. Defaults to "UTC".

    • input.filters optional array of FilterInput

      The Query Filters to apply before retrieving the counter data. If no Query Filters are provided, all data is included.

    • input.propeller optional Propeller

      Optionally specifies the Propeller to use. This can be set when querying from the Metric Playground or GraphQL Explorer. Applications may not set this value. Instead, Application Queries always use the Propeller configured on the Application.

      A Propeller determines your Application's query processing power. The larger the Propeller, the faster the queries and the higher the cost. Every Propel Application (and therefore every set of API credentials) has a Propeller that determines the speed and cost of queries.

      Learn more about Data Sources.

      • P1_X_SMALL

        Max records per second: 5,000,000 records per second

      • P1_SMALL

        Max records per second: 25,000,000 records per second

      • P1_MEDIUM

        Max records per second: 100,000,000 records per second

      • P1_LARGE

        Max records per second: 250,000,000 records per second

      • P1_X_LARGE

        Max records per second: 500,000,000 records per second


Returns

Nullable CounterResponse

The counter response object. It contains a single Metric value for the given time range and Query Filters.