Custom metrics dashboards display error on gitlab.com
A call to Gitlab::Tracking.event
seems to be causing errors on all custom dashboards on gitlab.com.
Example error: https://log.gprd.gitlab.net/app/kibana#/discover/doc/AW5F1e45qthdGjPJueGO/pubsub-rails-inf-gprd-003317?id=LN7uAXQBhFFHcF3p5Tr4
Summary
The current code is Gitlab::Tracking.event('MetricsDashboard::Chart', 'chart_rendered', label: 'Chart Type', value: panel_type)
.
According to https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/ruby-tracker/tracking-specific-events/#struct-event, the value
argument needs to be an Int or a Float.
Steps to reproduce
Open a custom dashboard in any project on gitlab.com. Example: https://gitlab.com/gitlab-org/monitor/monitor-sandbox/-/metrics/pod_metrics.yml
Example Project
https://gitlab.com/gitlab-org/monitor/monitor-sandbox/-/metrics/pod_metrics.yml
What is the current bug behavior?
An error occurs.
What is the expected correct behavior?
Dashboard should be displayed.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)