From 4907e3bb937bc637f332ab6cfb7cdb5d340a3b8a Mon Sep 17 00:00:00 2001 From: Robin Schroer Date: Thu, 18 Jan 2024 16:16:09 +0900 Subject: [PATCH] Also override the service name for mysql2 --- lib/degica_datadog/tracing.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/degica_datadog/tracing.rb b/lib/degica_datadog/tracing.rb index 645fe96..9fde6a6 100644 --- a/lib/degica_datadog/tracing.rb +++ b/lib/degica_datadog/tracing.rb @@ -37,7 +37,8 @@ def init # rubocop:disable Metrics/AbcSize,Metrics/MethodLength c.tracing.instrument :rack, request_queueing: true c.tracing.instrument :rake c.tracing.instrument :sidekiq, { tag_args: true } - c.tracing.instrument :active_record, service_name: "#{Config.service}-#{Config.environment}}" + c.tracing.instrument :active_record, service_name: Config.service + c.tracing.instrument :mysql2, service_name: "#{Config.service}-#{Config.environment}" # All of these are HTTP clients. c.tracing.instrument :ethon, split_by_domain: true