Skip to content

Revert "Merge branch 'opstrace/2947/hide-widget-when-there-are-no-related-traces' into 'master' "

What does this MR do and why?

Revert "Merge branch 'opstrace/2947/hide-widget-when-there-are-no-related-traces' into 'master' "

This reverts commit 4a7bba71 ( !165822 (merged))

This was breaking histogram metrics

TypeError: Cannot read properties of undefined (reading 'some')
    at metrics_details.vue:141:1
    at Array.some (<anonymous>)
    at a.metricHasRelatedTraces (metrics_details.vue:141:1)
    at e.get (vue.runtime.esm.js:3462:33)
    at e.evaluate (vue.runtime.esm.js:3563:27)

The reason being that histrogram and non-histrogram don't share the same response schema.

  • non-histogram:
[
    {
      name: 'app.ads.ad_requests',
      description: 'Counts ad requests by request and response type',
      unit: '',
      type: 'Sum',
      attributes: {...},
      values: [
        ['1725524033000000000', '66905.000000', ['47cfed48f3669e350779a25028e06a58']],
        ....
      ],
    },
    { ... } 
]
  • histogram
[{
      name: 'rpc.client.duration',
      description: 'The duration of an outbound RPC invocation',
      unit: 'ms',
      type: 'Histogram',
      fingerprint: '8bc6db206617a58d',
      data: [
        {
          bucketsHash: 11011454705083642000,
          buckets: [
            '0.000',
            '5.000',
             ....
          ],
          distribution: [
            [
              ['1726746180000000000', '0.000000', []],
              ['1726746240000000000', '0.000000', []],
              ...
            ],
            [ ... ]
          ]
         }
       ]
}]

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image.png image.png

How to set up and validate locally

  1. You need a GitLab Ultimate license.
  2. Enable the :observability_features feature flag enabled.
  3. Follow the one of the GitLab Observability development setup steps in the development documentation.
  4. View the metrics list page at Projects > Monitor > Metrics.
  5. Check that histrogram and non-histogram metrics charts render correctly with no errors
Edited by Daniele Rossetti

Merge request reports

Loading