search cancel

APM Java - How to normalize Frontends urls using introscope.agent.urlgroup.preprocessor

book

Article ID: 229212

calendar_today

Updated On:

Products

DX Application Performance Management CA Application Performance Management Agent (APM / Wily / Introscope)

Issue/Introduction

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}

Environment

DX Application Performance Management (APM)

Resolution

Open the <AGENT)HOME>/core/config/IntroscopeAgent.profile

Add:

introscope.agent.urlgroup.preprocessor.path.4=s/[A-Za-z]*[0-9]{3,}[A-Za-z-]*[0-9-]*/{number}/g

Restart the JVM/Agent

 

You can validate the regex using online tools such as :  https://www.freeformatter.com/regex-tester.html

below an example:

Attachments