Skip to content

Commit

Permalink
Do not populate db_runtime metrics.
Browse files Browse the repository at this point in the history
We do not need it as we rely on our tracing to troubleshoot
slow DB calls which is likely to be more useful than a
single metric aggregating all db calls together per request
  • Loading branch information
nicolasvan committed Dec 11, 2024
1 parent 4a53d07 commit 0f3e537
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ You always can add support for your app server to [lib/yabeda/rails/railtie.rb](

- Total web requests received: `rails_requests_total`
- Web request duration: `rails_request_duration` (in seconds)
- DB request duration: `rails_db_runtime` (in seconds)


## Hooks
Expand Down
5 changes: 0 additions & 5 deletions lib/yabeda/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ def install!
buckets: LONG_RUNNING_REQUEST_BUCKETS,
comment: "A histogram of the response latency."

histogram :db_runtime, unit: :seconds, buckets: LONG_RUNNING_REQUEST_BUCKETS,
comment: "A histogram of the activerecord execution time.",
tags: %i[controller action status format method]

if config.apdex_target
gauge :apdex_target, unit: :seconds,
comment: "Tolerable time for Apdex (T value: maximum duration of satisfactory request)"
Expand All @@ -55,7 +51,6 @@ def install!

rails_requests_total.increment(event.labels)
rails_request_duration.measure(event.labels, event.duration)
rails_db_runtime.measure(event.labels, event.db_runtime)

Yabeda::Rails.controller_handlers.each do |handler|
handler.call(event, event.labels)
Expand Down
4 changes: 0 additions & 4 deletions lib/yabeda/rails/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ def duration
ms2s super
end

def db_runtime
ms2s payload[:db_runtime]
end

private

def controller
Expand Down

0 comments on commit 0f3e537

Please sign in to comment.