Commit 0ee68558 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'move-grape-performance-bar-callback' into 'master'

Use the format_response hook when recording performance bar metrics for API requests

See merge request gitlab-org/gitlab!69465
parents 856c838a b9faed27
......@@ -24,7 +24,7 @@ Peek.into Peek::Views::Tracing if Labkit::Tracing.tracing_url_enabled?
# See https://github.com/peek/peek/blob/master/lib/peek/views/view.rb
Peek.views
ActiveSupport::Notifications.subscribe('endpoint_run.grape') do |_name, _start, _finish, _id, payload|
ActiveSupport::Notifications.subscribe('format_response.grape') do |_name, _start, _finish, _id, payload|
if request_id = payload[:env]['action_dispatch.request_id']
Peek.adapter.save(request_id)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment