Remove Rails Background Transaction metrics
We expose gitlab_transaction_cputime_seconds
and gitlab_transaction_duration_seconds
from Gitlab::Transaction
.
We do this for both web-requests as well as sidekiq-jobs. With the same labels and buckets, even though the values could be different.
The only usages I could find in the runbooks were for rate-recording rules: https://gitlab.com/gitlab-com/runbooks/blob/505357bd601d9c8498c68aa68ccf363c13e3265e/rules/rails.yml#L162.
I think we can get rid of this for background transactions, since we have better metrics for this in place through Gitlab::SidekiqMiddleware::ServerMetrics
.
Then we can make these metrics all about Rails requests and use them with useful buckets in #441 (closed).
As part of this we need to fix the pgbouncer dashboard to use sidekiq_jobs_completion_seconds_sum
to calculate the total duration of Sidekiq jobs: https://gitlab.com/gitlab-com/runbooks/blob/25f314de090a467c637988a0cdddfc39ec0d7ca9/dashboards/pgbouncer/main.dashboard.jsonnet#L68