-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use default skip pattern for MP metrics, openapi, health #95
Conversation
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
To test this I have added servlets mapped to |
@kenfinnigan @Emily-Jiang could you please have a look at ^^ |
* @author Pavol Loffay | ||
*/ | ||
@WebServlet(value = "/metrics/*") | ||
public class MetricsServlet extends HttpServlet { |
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.
e.g. I test metrics exclusion by adding this servlet
@@ -192,6 +192,8 @@ Configuration of the skip pattern leverages MicroProfile Config specification. | |||
The skip pattern is specified as a string with key `mp.opentracing.server.skip-pattern` which has to be | |||
compliant with `java.util.regex.Pattern`. An example skip pattern might be `mp.opentracing.server.skip-pattern=/health|/metrics.*` | |||
|
|||
The default value of the skip pattern excludes tracing for endpoints defined by MicroProfile Health, Config and OpenAPI specification. |
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.
Should this be "Metrics" and not "Config"?
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.
lol I don't know what I wanted to exclude in config
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
I think it's fine to add a servlet to test that the skip pattern works |
@fmhwong could you please also have a look? |
@@ -80,6 +81,7 @@ public static WebArchive createDeployment() { | |||
|
|||
WebArchive war = ShrinkWrap.create(WebArchive.class, "opentracing.war") | |||
.addPackages(true, OpenTracingClientBaseTests.class.getPackage()) | |||
.addClass(HealthServlet.class) |
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.
Shouldn't the metric and openapi servlets be added aswell?
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 will remove this. There are added in addPackages
and then auto-discovered. This was just my debug attempt :)
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
LGTM |
Resolves #89
Signed-off-by: Pavol Loffay ploffay@redhat.com