From 125df50a87a85fff5f8f7aa25426dfa9f8b0156e Mon Sep 17 00:00:00 2001 From: Jamie Gaskins Date: Fri, 5 Mar 2021 10:44:52 -0500 Subject: [PATCH] Expand Datadog instrumentation (#12908) Expand Datadog instrumentation This commit adds extra telemetry in Datadog for: - Redis - We make 3 different Redis connections available, so this change shows us _which_ Redis instance a given query goes to - Split HTTP requests by domain using: - net/http - default for Ruby - faraday - used by: - buffer - elasticsearch - gibbon - oauth2 - octokit - sawyer - twilio - excon - used by: - fog - AWS - RestClient - Cloudinary - Pusher - concurrent-ruby - ActiveSupport - brpoplpush-redis_script - i18n - sidekiq-unique-jobs - sprockets (do we even use this?) - httpclient - pusher - http.rb - twitter (omniauth) - honeycomb --- app/lib/forem_stats_drivers/datadog_driver.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/lib/forem_stats_drivers/datadog_driver.rb b/app/lib/forem_stats_drivers/datadog_driver.rb index 9279a9635..6bd50776e 100644 --- a/app/lib/forem_stats_drivers/datadog_driver.rb +++ b/app/lib/forem_stats_drivers/datadog_driver.rb @@ -9,9 +9,18 @@ module ForemStatsDrivers c.tracer priority_sampling: true c.use :elasticsearch c.use :sidekiq - c.use :redis + c.use :redis, service_name: "redis", describes: { url: ENV["REDIS_URL"] } + c.use :redis, service_name: "redis-sessions", describes: { url: ENV["REDIS_SESSIONS_URL"] } + c.use :redis, service_name: "redis-sidekiq", describes: { url: ENV["REDIS_SIDEKIQ_URL"] } c.use :rails - c.use :http + c.use :http, split_by_domain: true + c.use :faraday, split_by_domain: true + c.use :excon, split_by_domain: true + c.use :httpclient, split_by_domain: true + c.use :httprb, split_by_domain: true + c.use :aws + c.use :rest_client + c.use :concurrent_ruby end Datadog::Statsd.new end