Class ConfluenceMonitoringNameGenerationRule
java.lang.Object
com.atlassian.confluence.util.profiling.ConfluenceMonitoringNameGenerationRule
-
Constructor Summary
ConstructorsConstructorDescriptionConfluenceMonitoringNameGenerationRule
(String regex, String nameToGenerate) ConfluenceMonitoringNameGenerationRule
(Pattern patternToMatch) ConfluenceMonitoringNameGenerationRule
(Pattern pattern, String nameToGenerate) -
Method Summary
Modifier and TypeMethodDescriptiongenerateName
(String input) Attempts to generate a low-cardinality monitoring name for the provided input by applying this rule's pattern.getNameGenerationStrategy
(String regex) getNameGenerationStrategy
(String regex, String nameToGenerate)
-
Constructor Details
-
ConfluenceMonitoringNameGenerationRule
-
ConfluenceMonitoringNameGenerationRule
-
ConfluenceMonitoringNameGenerationRule
-
ConfluenceMonitoringNameGenerationRule
-
-
Method Details
-
generateName
Attempts to generate a low-cardinality monitoring name for the provided input by applying this rule's pattern.Behavior depends on how this rule was constructed:
- Default rule (regex only): when the pattern matches, the first capturing group is used as the base name, and the method returns "group-1.%". The pattern MUST define at least one capturing group.
- Named rule (regex + name): when the pattern matches, the provided constant name is used as the base name, and the method returns "name.%".
input
is returned unchanged so that callers may fall back or try additional rules.- Parameters:
input
- the request path (context-path stripped) to classify; must not be null- Returns:
- a normalized monitoring name such as "download.%" or "display.SPACE.%" if this rule matches;
otherwise the original
input
-
getNameGenerationStrategy
-
getNameGenerationStrategy
public static ConfluenceMonitoringNameGenerationRule getNameGenerationStrategy(String regex, String nameToGenerate)
-