diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 21:12:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-01 21:12:02 +0300 |
commit | fb7b3d71b179f877dca72d86eccf29eeb9f883b7 (patch) | |
tree | 5d48b4763e2fd918b467b0955bc0e8b60fe771c9 /spec/spec_helper.rb | |
parent | faa19db44a5a4d0fb7a3be07319ca6201caa185a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 921d6503099..091627c8a38 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -506,3 +506,16 @@ module TouchRackUploadedFile end Rack::Test::UploadedFile.prepend(TouchRackUploadedFile) + +# Monkey-patch to enable ActiveSupport::Notifications for Redis commands +module RedisCommands + module Instrumentation + def process(commands, &block) + ActiveSupport::Notifications.instrument('redis.process_commands', commands: commands) do + super(commands, &block) + end + end + end +end + +Redis::Client.prepend(RedisCommands::Instrumentation) |