[Dev] Should we log PoolRequest
and PoolRequestFullfilled
observations?
#3899
Closed
taimoorzaeem
started this conversation in
Open-ended discussion
Replies: 1 comment
-
Yes, that sounds fine. Maybe like: -- Observation.hs
PoolRequest ->
"Trying to borrow a connection from pool"
PoolRequestFullfilled ->
"Borrowed a connection from the pool"
What would be more important is to remove that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
While working on #3802, we noticed in comment#3802 that we are not logging all observations. Namely
PoolRequest
andPoolRequestFullfilled
(because we are only using them for metrics). Infact, we are just logging empty here for them here:postgrest/src/PostgREST/Observation.hs
Lines 140 to 142 in db85e64
This never gets executed because we intercept it in the
Logger.hs
:postgrest/src/PostgREST/Logger.hs
Lines 91 to 94 in db85e64
Solution
I think this needs a refactor and one way to solve this is to log these observations for
loglevel >= debug
. So it should be something like:and
Beta Was this translation helpful? Give feedback.
All reactions