Rails 5.1's `exec_no_cache` doesn't call `async_exec` any more, but
`exec_params`: https://github.com/rails/rails/pull/33188
This means that the DB summary in the performance bar was wrong. The
individual query details were still correct (we subscribe to
ActiveRecord events for those).
We can remove this once the upstream PR to peek-pg is in a release and
we update to use that release.
This change is a fairly straightforward refactor to extract the tracing
and correlation-id code from the gitlab rails codebase into the new
LabKit-Ruby project.
The corresponding import into LabKit-Ruby was in
https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/1
The code itself remains very similar for now.
Extracting it allows us to reuse it in other projects, such as
Gitaly-Ruby. This will give us the advantages of correlation-ids and
distributed tracing in that project too.
Jaeger is a distributed tracing tool. This change adds a "Tracing" link
to the performance bar to directly link to a current request in Jaeger.
This is useful for two reasons: 1 - it provides affordance to developers
that the distributed tracing tool is available, so that it can quickly
be discovered. 2 - it allows developers to quickly find a specific trace
without having to manually navigate to a second user-interface.
The reason for removing this gem is that it's not being maintained
anymore. It uses `alias_method_chain` which is deprecated in rails 5
(and removed in 5.1), the issue is pending upstream (including
a fix) - https://github.com/suranyami/peek-sidekiq/issues/3 for a while.
Peek-sidekiq is used in performance bar for displaying sidekiq
statistics.