@Test public void determineUriPathTemplate_returns_null_if_passed_null() { assertThat(HttpSpanFactory.determineUriPathTemplate(null)).isNull(); }
public static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request) { if (request == null) { return null; } String path = getRequestAttributeAsString(request, KnownZipkinTags.HTTP_ROUTE); if (StringUtils.isNotBlank(path)) { return path; } path = getRequestAttributeAsString(request, SPRING_BEST_MATCHING_PATTERN_REQUEST_ATTRIBUTE_KEY); if (StringUtils.isNotBlank(path)) { return path; } return null; }
HttpSpanFactory { public static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request) { if (request == null) { return null; } String path = getRequestAttributeAsString(request, KnownZipkinTags.HTTP_ROUTE); if (StringUtils.isNotBlank(path)) { return path; } path = getRequestAttributeAsString(request, SPRING_BEST_MATCHING_PATTERN_REQUEST_ATTRIBUTE_KEY); if (StringUtils.isNotBlank(path)) { return path; } return null; } }
HttpSpanFactory { public static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request) { if (request == null) { return null; } String path = getRequestAttributeAsString(request, KnownZipkinTags.HTTP_ROUTE); if (StringUtils.isNotBlank(path)) { return path; } path = getRequestAttributeAsString(request, SPRING_BEST_MATCHING_PATTERN_REQUEST_ATTRIBUTE_KEY); if (StringUtils.isNotBlank(path)) { return path; } return null; } private  HttpSpanFactory(); }
HttpSpanFactory { public static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request) { if (request == null) { return null; } String path = getRequestAttributeAsString(request, KnownZipkinTags.HTTP_ROUTE); if (StringUtils.isNotBlank(path)) { return path; } path = getRequestAttributeAsString(request, SPRING_BEST_MATCHING_PATTERN_REQUEST_ATTRIBUTE_KEY); if (StringUtils.isNotBlank(path)) { return path; } return null; } private  HttpSpanFactory(); static Span fromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys); static String getUserIdFromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys); static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request); static @NotNull String getSpanName(@Nullable HttpServletRequest request); }
HttpSpanFactory { public static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request) { if (request == null) { return null; } String path = getRequestAttributeAsString(request, KnownZipkinTags.HTTP_ROUTE); if (StringUtils.isNotBlank(path)) { return path; } path = getRequestAttributeAsString(request, SPRING_BEST_MATCHING_PATTERN_REQUEST_ATTRIBUTE_KEY); if (StringUtils.isNotBlank(path)) { return path; } return null; } private  HttpSpanFactory(); static Span fromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys); static String getUserIdFromHttpServletRequest(HttpServletRequest servletRequest, List<String> userIdHeaderKeys); static @Nullable String determineUriPathTemplate(@Nullable HttpServletRequest request); static @NotNull String getSpanName(@Nullable HttpServletRequest request);  }