-
Notifications
You must be signed in to change notification settings - Fork 306
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
PAYARA-4123 Refactored server JAXRS Request Tracing #4219
PAYARA-4123 Refactored server JAXRS Request Tracing #4219
Conversation
dmatej
commented
Sep 16, 2019
- removed filter + exception mapper solution, which failed TCK's completitioncallback tests
- introduced EventListener solution, depends on Jersey
- removed trailing whitespaces in the module
- added logging and several generics
- reduced nesting of blocks in favor of readibility
- EnvironmentConfigSource uses AccessController to avoid security exceptions
Jenkins test please |
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.
Haven't fully reviewed the code yet, but made some observations.
I'm not convinced this works quite right - or it at least works differently.
I get different trace outcomes from simply enabling request tracing with the following settings:
- Applications Only = Disabled
- Threshold Unit = Milliseconds
- Selected Notifiers = service-log
https://gist.github.com/Pandrex247/fde4ed9fa2c813e2a4359e8f2dca18b9
https://gist.github.com/Pandrex247/80d0b0dda3f8419877d778cc7baed7a4
I also get an IOException when running the default endpoint of the following app from a blog I did a while ago, with it claiming that the active scope is null due it already being shut, something that worked previously. The example is a bit weird admittedly, but should probably be looked at.
Also also, I'm getting these log messages printed out which look a bit like debug statements:
onEvent(event.type=MATCHING_START)
onEvent(event.type=REQUEST_FILTERED)
|
Jenkins test please |
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.
NPE when enabling request tracing from admin console:
- Enable request tracing, Threshold Unit Microseconds, Applications Only disabled, service-log notifier enabled.
- Values save successfully but NPE in logs:
java.lang.NullPointerException
at fish.payara.notification.requesttracing.RequestTrace.assignReferences(RequestTrace.java:307)
at fish.payara.notification.requesttracing.RequestTrace.endTrace(RequestTrace.java:184)
at fish.payara.nucleus.requesttracing.RequestTraceSpanStore.endTrace(RequestTraceSpanStore.java:88)
at fish.payara.nucleus.requesttracing.RequestTracingService.endTrace(RequestTracingService.java:428)
&& span.getTraceEndTime().compareTo(comparisonSpan.getTraceEndTime() Could it be currently processed request? |
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.
When combined with #4234 everything seems to work
I didn't get conflicts when I merged them locally... |
- removed filter + exception mapper solution, which failed TCK's completitioncallback tests - introduced EventListener solution, depends on Jersey - removed trailing whitespaces in the module - added logging and several generics - reduced nesting of blocks in favor of readibility - EnvironmentConfigSource uses AccessController to avoid security exceptions
- tracedAnnotation instance cannot be resolved if the event is for example ON_EXCEPTION invoked sooner than after REQUEST_MATCHED event. - how to simulate: invoke unmapped context causing HTTP 404.
It depends on merging strategy and GIT settings - it detected "file copy" but it was false positive. I will push rebased version after TCK tests ... |
Jenkins test please |