Skip to content

Track usage event when rendering the error details page content

Sarah Yasonik requested to merge sy-fix-error-tracking-metric into master

What does this MR do and why?

There’s a little bug in the data collection for unique users visiting the error details page. Error details of sentry errors can be accessed via two endpoints, but we're only tracking one.

This MR fixes that issue.

How to set up and validate locally

Pre-req: a project with sentry error tracking enabled, like to https://gitlab.com/gitlab-examples/ops/incident-setup/everyone/tanuki-inc/-/error_tracking

  1. Nav in project to Monitor > Error Tracking
  2. Click an error to open the details view
  3. In the rails console, run the following to see the count:
Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: :error_tracking_view_details, start_date: 1.week.ago, end_date: 1.week.from_now)
  1. The count should equal 1. Use an admin account & impersonate users to validate incrementing the count.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading