EnvironmentsController#additional_metrics: TypeError: no implicit conversion of Symbol into Integer

Problem

After enabling feature flag metrics_time_window, testing https://staging.gitlab.com/splattael-staging/autodevops-deploy/environments/176385/additional_metrics.json?start=1554636829&end=1554626057 gives a 500 error.

Sentry

https://sentry.gitlab.net/gitlab/staginggitlabcom/issues/707750/

TypeError: no implicit conversion of Symbol into Integer
  projects/environments_controller.rb:196:in `values_at'
    params.require([:start, :end]).values_at(:start, :end)
  projects/environments_controller.rb:196:in `metrics_params'
    params.require([:start, :end]).values_at(:start, :end)
  projects/environments_controller.rb:152:in `block (2 levels) in additional_metrics'
    additional_metrics = environment.additional_metrics(*metrics_params) || {}
  action_controller/metal/mime_responds.rb:201:in `respond_to'
    response.call if response
  projects/environments_controller.rb:150:in `additional_metrics'
    respond_to do |format|
...
(131 additional frame(s) were not displayed)

TypeError: no implicit conversion of Symbol into Integer
Edited by Peter Leitzen