cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BT split by http header

cortega
Participant

Hi,

I'm trying to split a business transaction by a header field with some different regex expressions but i dont have luck.

We have different values at this header, informing in which platform is running the application, for example:

  • user-agent: IOS 11.4.1 iPhone6Plus NATIVE_APP 2.6.3 STANDARD
  • user-agent: Android 7......

I want an split extracting the first part of the value (IOS, Android, WEB), can someone help me?

Thanks and regards,

Carlos Ortega.


4 REPLIES 4

arturomr
Inactive

Hi,

You need to create a custom split measure, based on the Web Request - Header Value default one, that make the transformation according to a defined regex (that extracts n characters, till the first space...).

Then use this new split/BT measure on your split part of the BT.

Hope this helps!


Hi,

My trouble comes with this regular expression, i dont know which one i have to use.

I supose that i dont have to filter any request, cause all have a valid value on the header field so the trick should be at the transformation field.

You know any web that can explain how to capture first N characters and skip the rest?

Thanks and regards,

Carlos Ortega.


arturomr
Inactive

Hi,

regex101 (https://regex101.com/) can explain you some basics about regular expressions, enough to build something that meets your requirements (capture everything till the first space or dash...) and also you can try regular expressions and build your own.

If not, a google search about regular expression find first word (or any search like this) will give you plenty of results on how you can build one! (ex. https://stackoverflow.com/questions/5041453/extrac...

Hope you get what you pursue!


Hello,

At least i got it, i was using a wrong regular expression.

Thank you,

Carlos Ortega.