From 7612415991f2b5bb9cc011aa900871bd543ff79c Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Sun, 5 Apr 2020 00:16:10 +0200 Subject: [PATCH] Enable Ruby Runtime Metrics in Datadog This automatically collects a bunch of Ruby's GC-related metrics that will come in handy while we tune the Unicorn workers. Some of theres are: * runtime.ruby.class_count * runtime.ruby.gc.malloc_increase_bytes * runtime.ruby.gc.total_allocated_objects * runtime.ruby.gc.total_freed_objects * runtime.ruby.gc.heap_marked_slots * runtime.ruby.gc.heap_available_slots * runtime.ruby.gc.heap_free_slots * runtime.ruby.thread_count Check https://docs.datadoghq.com/tracing/runtime_metrics/ruby/#data-collected for the complete list. The cool thing is that > Runtime metrics can be viewed in correlation with your Ruby services --- config/initializers/datadog.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/initializers/datadog.rb b/config/initializers/datadog.rb index eb82b340ff..c1265c7802 100644 --- a/config/initializers/datadog.rb +++ b/config/initializers/datadog.rb @@ -4,5 +4,6 @@ if ENV['DATADOG_RAILS_APM'] c.use :delayed_job, service_name: 'delayed_job' c.use :dalli, service_name: 'memcached' c.analytics_enabled = true + c.runtime_metrics_enabled = true end end