Skip to content

chore(metrics): Change histogram distribution query response to align with sums/gauges

Related https://gitlab.com/gitlab-org/opstrace/opstrace/-/issues/2574

This MR changes the histogram distribution query response to align with those from sums/gauges, helps keep client-side code sane. Tested on a dev-cluster with:

New response

{
  "start_ts": 1711022940735608000,
  "end_ts": 1711627740735608000,
  "results": [
    {
      "name": "http.client.duration",
      "description": "",
      "unit": "ms",
      "type": "Histogram",
      "data": [
        {
          "bucketsHash": 11011454705083641460,
          "buckets": [
            "0.000000",
            "5.000000",
            "10.000000",
            "25.000000",
            "50.000000",
            "75.000000",
            "100.000000",
            "250.000000",
            "500.000000",
            "750.000000",
            "1000.000000",
            "2500.000000",
            "5000.000000",
            "7500.000000",
            "10000.000000",
            "+Inf"
          ],
(REDACTED)

as compared to

Old response

{
  "start_ts": 1711022973623030000,
  "end_ts": 1711627773623030000,
  "name": "http.client.duration",
  "description": "",
  "unit": "ms",
  "type": "Histogram",
  "data": [
    {
      "bucketsHash": 11011454705083641460,
      "buckets": [
        "0.000000",
        "5.000000",
        "10.000000",
        "25.000000",
        "50.000000",
        "75.000000",
        "100.000000",
        "250.000000",
        "500.000000",
        "750.000000",
        "1000.000000",
        "2500.000000",
        "5000.000000",
        "7500.000000",
        "10000.000000",
        "+Inf"
      ],
(REDACTED)
Edited by Ankit Bhatnagar

Merge request reports