-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Jetty Plugin (sync) #771
Jetty Plugin (sync) #771
Conversation
@@ -140,6 +140,8 @@ public static ProfilerConfig load(String pinpointConfigFileName) throws IOExcept | |||
private boolean memcached = true; | |||
private boolean memcachedKeyTrace = false; | |||
|
|||
private Filter<String> jettyExcludeUrlFilter = new SkipFilter<String>(); |
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.
This field is not used anywhere. You'd better remove it.
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.
If I'm not mistaken I needed this field as a default for filtering within the ServerHandleInterceptor:
final String requestURI = request.getRequestURI();
if (excludeUrlFilter.filter(requestURI)) {
if (isTrace) {
logger.trace("filter requestURI:{}", requestURI);
}
return null;
}
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.
excludedUrlFilter comes from JettyConfiguration not ProfilerConfig.
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.
JettyConfiguration uses ProfilerConfig though:
public JettyConfiguration(ProfilerConfig config) {
final String jettyExcludeURL = config.readString("profiler.jetty.excludeurl", "");
if (!jettyExcludeURL.isEmpty()) {
this.jettyExcludeUrlFilter = new ExcludeUrlFilter(jettyExcludeURL);
}
else{
this.jettyExcludeUrlFilter = new SkipFilter<String>();
}
}
is this still not using the field I've added above?
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.
No, it's not using ProfilerConfig.jettyExcludeUrlFilter. Among members of ProfilerConfig, JettyConfiguration only uses readString(), which is not accessing jettyExcludedUrlFilter.
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.
Right. Got jettyExcludeUrlFilter and jettyExcludeURL confused. Thank you!
@lioolli |
👍 |
This is a Jetty plugin that supports synchronous requests. #446
I've added my notes on the plugin in the wiki if anyone wants to take a look.