From 337875ff214047b196662fce506c8d0355fa97fe Mon Sep 17 00:00:00 2001 From: "Kayla Reopelle (she/her)" <87386821+kaylareopelle@users.noreply.github.com> Date: Wed, 29 Nov 2023 08:52:44 -0800 Subject: [PATCH] Update helpers/mysql/lib/opentelemetry/helpers/mysql.rb Co-authored-by: Francis Bogsanyi --- helpers/mysql/lib/opentelemetry/helpers/mysql.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/mysql/lib/opentelemetry/helpers/mysql.rb b/helpers/mysql/lib/opentelemetry/helpers/mysql.rb index f1432bfc5..1813f3e09 100644 --- a/helpers/mysql/lib/opentelemetry/helpers/mysql.rb +++ b/helpers/mysql/lib/opentelemetry/helpers/mysql.rb @@ -39,7 +39,7 @@ class MySQL # Ignore query names that might appear in comments prepended to the # statement. - PREPENDED_COMMENTS_REGEX = %r{/\*(?:[^/]|/[^*])*?(?:\*/|/\*.*)}m + PREPENDED_COMMENTS_REGEX = %r{(?:\/\*.*?\*\/)}m QUERY_NAME_REGEX = Regexp.new("^\s*(?:#{PREPENDED_COMMENTS_REGEX})?\s*\\b(#{QUERY_NAMES.join('|')})\\b.*", Regexp::IGNORECASE) # This is a span naming utility intended for use in MySQL database