@squidcloud/client
    Preparing search index...

    Interface QueryMetricsRequestCommon

    Common parameters shared by all metric query requests.

    interface QueryMetricsRequestCommon {
        domain: "user" | "squid";
        fillValue?: null | number;
        fn:
            | "sum"
            | "max"
            | "min"
            | "average"
            | "median"
            | "p95"
            | "p99"
            | "count"
            | ("sum" | "max" | "min" | "average" | "median" | "p95" | "p99" | "count")[];
        groupByTags?: string[];
        noDataBehavior?:
            | "return-no-result-groups"
            | "return-result-group-with-default-values";
        orderByTags?: string[];
        periodEndSeconds: number;
        periodStartSeconds: number;
        pointIntervalAlignment?: "align-by-start-time"
        | "align-by-end-time";
        pointIntervalSeconds?: number;
        tagDomains?: Record<string, string[]>;
        tagFilter?: Record<string, string>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    domain: "user" | "squid"

    Kind of the metrics (domain) to query.

    fillValue?: null | number

    If there is no data in the specified region this value will be used to fill the gap. Default: null.

    fn:
        | "sum"
        | "max"
        | "min"
        | "average"
        | "median"
        | "p95"
        | "p99"
        | "count"
        | ("sum" | "max" | "min" | "average" | "median" | "p95" | "p99" | "count")[]

    Aggregation functions that maps multiple points per point region to a single point value.

    groupByTags?: string[]

    List of ordered tag names for a 'GROUP BY'.

    noDataBehavior?:
        | "return-no-result-groups"
        | "return-result-group-with-default-values"

    Specifies what result will be returned if there were no records found in the database. In this case the 'resultGroups' array will be empty (default), or can be filled with a default values if 'return-result-group-with-default-values' is specified. The generated result group will have 'tagValues' set to empty strings.

    May be useful to get a ready-to-render array with no additional post-processing required.

    Note: 'tagDomains' can provide similar functionality when set of tag values is defined: multiple result groups will be filled with default values. There is no need to use this option if 'tagDomains' is used.

    Default: 'return-no-result-groups'

    orderByTags?: string[]

    The results will be ordered by the specified tags (ORDER BY).

    periodEndSeconds: number

    End of the queried interval. Must be an integer value.

    periodStartSeconds: number

    Start of the queried interval. Must be an integer value.

    pointIntervalAlignment?: "align-by-start-time" | "align-by-end-time"

    Specifies the alignment of the per-point interval. Default: 'align-by-start-time'

    pointIntervalSeconds?: number

    Time interval per point. Must be less than periodEndSeconds - periodStartSeconds. Set to 0 or keep undefined to have only 1 value in the result.

    tagDomains?: Record<string, string[]>

    A mapping of known tag values that must be present in the response groups.

    This ensures that the result will include groups for all specified tag values, even if there is no data for some values in the database.

    Example: Consider a tag 'isError' with two possible values: '0' and '1'. When 'tagDomains' contains {'isError': ['0', '1']}, the result will include groups for both 'isError: 0' and 'isError: 1'. If the database lacks data for 'isError: 1', the points in this group will be set to 'fillValue' (default is 'null').

    The tags in the new groups will be copied from the existing resultGroups, along with one of the tag domain values.

    tagFilter?: Record<string, string>

    Tag filters. TODO: add operations to exclude tags: !=, !contains...