Skip to content

Filtered Aggregator at ingestion time don't work #10293

@doenis-usk

Description

@doenis-usk

affected version

0.18.1

Description

I use extension metrics(DataSketches Quantiles Sketch or Approximate Histogram) with Filtered Aggregator at ingestion time.
When I post a query, I got only NaN result.

However, when I use longSum or count metrics with Filtered Aggregator at ingestion time, I got the numeric result.

ingestion spec

For example, I ingest two metrics (1)latency_histogram, (2)latency_histogram_without_filter and status 200 data exists.

{
...
  "metricsSpec": [
    {
      "aggregator": {
        "name": "latency_histogram",
        "type": "approxHistogramFold",
        "filedName": "fe_latency"
      },
      "type": "filtered",
      "filter": {
        "type": "selector",
        "dimension": "status",
        "value": "200"
      }
    },
    {
      "name": "latency_histogram_without_filter",
      "type": "approxHistogramFold",
      "filedName": "fe_latency"
    }
  ]
...
}

query

When I post below query, latency_histogram is NaN and latency_histogram_without_filter is numeric result.

{
  "queryType": "timeseries",
  "dataSource": <DATASOURCE>,
  "granularity": "minute",
  "aggregations": [
    {
      "type": "approxHistogramFold",
      "name": "latency_histogram",
      "fieldName": "latency_histogram"
    },
    {
      "type": "approxHistogramFold",
      "name": "latency_histogram_without_filter",
      "fieldName": "latency_histogram_without_filter"
    }
  ],
  "intervals": <INTERVALS>
}
[
    {
        "timestamp": "2020-08-16T13:00:00.000Z",
        "result": {
            "latency_histogram": {
                "breaks": [
                    "Infinity",
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN",
                    "-Infinity"
                ],
                "counts": [
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN",
                    "NaN"
                ]
            },
            "latency_histogram_without_filter": {
                "breaks": [
                    -395428.5,
                    61553,
                    518534.5,
                    975516,
                    1432497.5,
                    1889479,
                    2346460.5,
                    2803442
                ],
                "counts": [
                    0,
                    66000.5625,
                    2844.926513671875,
                    9.512149810791016,
                    1,
                    2,
                    2
                ]
            }
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions