FIX: exec_params needs instrumentation

FIX: exec_params needs instrumentation

the method no longer routes to “exec” or “async_exec” in latest PG so we
need to explicitly intercept

From 955cdad64991fe37ae3efcf8939d30266731452b Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Mon, 10 Dec 2018 14:28:10 +1100
Subject: [PATCH] FIX: exec_params needs instrumentation

the method no longer routes to "exec" or "async_exec" in latest PG so we
need to explicitly intercept

diff --git a/lib/middleware/request_tracker.rb b/lib/middleware/request_tracker.rb
index 26680bf..7bfcc64 100644
--- a/lib/middleware/request_tracker.rb
+++ b/lib/middleware/request_tracker.rb
@@ -18,7 +18,7 @@ class Middleware::RequestTracker
 
     unless @patched_instrumentation
       MethodProfiler.patch(PG::Connection, [
-        :exec, :async_exec, :exec_prepared, :send_query_prepared, :query
+        :exec, :async_exec, :exec_prepared, :send_query_prepared, :query, :exec_params
       ], :sql)
 
       MethodProfiler.patch(Redis::Client, [

GitHub

1 Like