Skip to content

Commit

Permalink
adapt regex pattern to determine message path queries;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Oct 19, 2021
1 parent 6d18d98 commit 352d955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/**
* TraceUriGenerator generates a trace uri based on a specified path.
* <p>
* The purpose of this class is to minimize the amount of requests to be logged (e. g. by shortening requests),
* The purpose of this class is to minimize the amount of requests to be logged (e.g. by shortening requests),
* in order to avoid the creation of too many Kamon traces (causing OutOfMemory).
*/
@Immutable
Expand Down Expand Up @@ -65,7 +65,7 @@ public final class TraceUriGenerator implements Function<String, TraceInformatio
private static final List<String> PATHS_EXACT = Arrays.asList("ws/2", "health", "status", "status/health",
"overall/status/health", "devops/logging", "devops/config");
private static final String PATHS_EXACT_REGEX_TEMPLATE = "(?<" + PATHS_EXACT_LENGTH_GROUP + ">^/({0}))/?$";
private static final Pattern messagePattern = Pattern.compile("(.*/messages/.*)|(.*/claim)");
private static final Pattern messagePattern = Pattern.compile("(.*/(inbox|outbox)/messages/.*)|(.*/inbox/claim)");

@Nullable private static TraceUriGenerator instance = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class TraceUtils {
private static final String FILTER_AUTH_METRIC_NAME = "filter_auth";
private static final String LIVE_CHANNEL_NAME = "live";
private static final String TWIN_CHANNEL_NAME = "twin";
private static final Pattern messagePattern = Pattern.compile("(.*/messages/.*)|(.*/claim)");
private static final Pattern messagePattern = Pattern.compile("(.*/(inbox|outbox)/messages/.*)|(.*/inbox/claim)");

private TraceUtils() {
throw new AssertionError();
Expand Down

0 comments on commit 352d955

Please sign in to comment.