Skip to content
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

FISH-777 Exclude OpenAPI rest endpoint from tracing #4923

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,15 @@ private boolean canTrace(final ContainerRequest request, final Traced tracedAnno

// Prepend a slash for safety (so that a pattern of "/blah" or just "blah" will both match)
final String uriPath = "/" + request.getUriInfo().getPath();
// Because the openapi resource path is always empty we need to use the base path
final String baseUriPath = request.getUriInfo().getBaseUri().getPath();
// First, check for the mandatory skips
if (uriPath.equals("/health")
|| uriPath.equals("/metrics")
|| uriPath.contains("/metrics/base")
|| uriPath.contains("/metrics/vendor")
|| uriPath.contains("/metrics/application")) {
|| uriPath.contains("/metrics/application")
|| baseUriPath.equals("/openapi/")) {
return false;
}

Expand Down