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

APM Java agent - 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

APM SaaS agents Only

NOTE: the introscope.agent.urlgroup.preprocessor.path functionality is not available in 10.7 Agents

Resolution

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:

Attachments