-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ajk-service-request-timer #1939
Conversation
Note that the codacy-report complaining about
is wrong, as this isn't an Option but a ValueHolder. |
@@ -132,6 +132,9 @@ trait HTTPProvider { | |||
} | |||
|
|||
private def postBoot { | |||
if (!LiftRules.logServiceRequestTiming) { | |||
LiftRules.installServiceRequestTimer(NoOpServiceTimer) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I quite understand this line. If request timing is off, we install the no-op timer in the new place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm proposing is to remove logServiceRequestTiming
and only use ServiceRequestTimer
, but we cannot make such a breaking change (removinglogServiceRequestTiming
) in 3.x can we? So to not break existing apps the line in postBoot
installs the NoOpServiceTimer
implementation which will give the same behavior as today's logServiceRequestTiming=false
. Currently logServiceRequestTiming
defaults to true
, which corresponds to having StandardServiceTimer
as default, which is the default in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me. I'll probably give it a test run before merging but I think this is good for 3.3.0-M2!
Refactor timing of servicing a request out to ServiceRequestTimer.
The default-implementation, StandardServiceTimer, gives the same
logging as the old parameter logServiceRequestTiming=true