Commit 8ff69500 authored by Quang-Minh Nguyen's avatar Quang-Minh Nguyen

Adjust gitlab_database_transaction_seconds bucket

parent fbc56222
......@@ -17,7 +17,9 @@ module Gitlab
# used to record a database transaction duration when calling
# ActiveRecord::Base.transaction {} block.
def transaction(event)
observe(:gitlab_database_transaction_seconds, event)
current_transaction&.observe(:gitlab_database_transaction_seconds, event.duration / 1000.0) do
buckets [0.05, 0.25, 1, 5]
end
end
def sql(event)
......
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