I'd like to have a regular expression that detects:
- 3 or more numbers within a block
OR
- any character 3 numbers any character
OR
- any character 3 numbers any character endofline
Then to replace the block with the text : {number}
EXAMPLE#1:
/cc/api/policy/SDFVRT0662341293-1/risk/GCEE598LB/claimTypes
to be normalized as
/cc/api/policy/{number}/risk/{number}/claimTypes
EXAMPLE#2:
/api/autore/flaim/moto/et535yj
normalized it as
/api/autore/flaim/moto/{number}
EXAMPLE#3:
/srv/brww/caucion/cust/00010122C
normalized it as
/srv/brww/caucion/cust/{number}
APM SaaS agents Only
NOTE: the introscope.agent.urlgroup.preprocessor.path functionality is not available in 10.7 Agents
1) Open the <AGENT)HOME>/core/config/IntroscopeAgent.profile
2) Add
introscope.agent.urlgroup.preprocessor.path.4=s/[A-Za-z]*[0-9]{3,}[A-Za-z-]*[0-9-]*/{number}/g
3) Restart the JVM/Agent
NOTE: You can validate a regex using online tools such as : https://www.freeformatter.com/regex-tester.html
below an example: