HttpTrace(TraceableRequest request) { this.request = new Request(request); this.timestamp = Instant.now(); }
/** * Adds a new {@code HttpTrace} to the repository * * @param httpTrace the HttpTrace */ @Override public void add(HttpTrace httpTrace) { String path = httpTrace.getRequest().getUri().getPath(); if (Strings.isNullOrEmpty(path)) { return; } boolean ignore = ignoredPatterns.stream().anyMatch(pattern -> pattern.matcher(path).matches()); if (!ignore) { super.add(httpTrace); try { indexTrace(httpTrace); } catch (JsonProcessingException e) { logger.error("Cannot index trace", e); } } }