Class ConfluenceMonitoringNameGenerationParser
java.lang.Object
com.atlassian.confluence.util.profiling.ConfluenceMonitoringNameGenerationParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDetermines the monitoring bucket name for a given request URI.
-
Constructor Details
-
ConfluenceMonitoringNameGenerationParser
public ConfluenceMonitoringNameGenerationParser()
-
-
Method Details
-
parseRequestUriForMonitoringName
Determines the monitoring bucket name for a given request URI.The parser applies a sequence of rules to derive a low-cardinality name suitable for metrics. Evaluation order:
- Prefix rule (PREFIX_STRATEGY): collapses well-known top-level paths (e.g. s, x, display/SPACE, download, images, plugins/servlet, questions, REST version/root, rpc/trackback) into a normalized form of the first matching prefix, returned as "prefix.%".
- Custom rules (e.g. user space and combined label browsing): if the prefix rule does not apply, each custom rule is evaluated in order; the first rule that matches returns its normalized name (either a captured group or a constant), also formatted as "name.%".
- Parameters:
uri- the request path (context-path stripped) to classify, beginning with '/'; must not be null- Returns:
- a low-cardinality monitoring name such as "s.%", "display.SPACE.%", "label.tag.%" when a rule matches;
otherwise the original
uri
-