I need your wisdom in regular expressions and Dynatrace:
We have a situation in which an application is calling a third party, receiving all responses as 200 OK, but in a numeric field there could be different values to mark the completion status of the request. Unfortunately, there are several values that can mark it as succeeded and several to mark it as failed. We want to try and create a request attribute that will show us whether something have failed. Unfortunately, we only know which values are successful, and these are 0 and 9007 (Don't ask me about this choice of values please).
I've been trying to play with further processing of the RA in order to indentify those with different values, but the 9007 is failing me over and over again.
Is this doable at all? Can you assist?
Solved! Go to Solution.
Hi @ChadTurner ,
I must have mis-explained myself.
I'm not interested in the http response code, but in a parameter value that is returned from a function. I am able to collect this "raw" code.
The challenge here is that it can have different values that are expressing "good" execution and multiple values that express "failed" executions. I'm trying to find a regex that will set a request attribute to mark the failure if the value is not equal to one of several values. problem is that the values are numbers, some of them are with multiple digits (for example two valid codes are 0 and 9007).
Hope this is better understood.
Hi @gilgi ,
Try using negative lookahead (https://www.regular-expressions.info/lookaround.html). Something like this should work (I've only tested it in the UI):
So here we're basically telling the engine to parse any digit(s) that are not 9007 or 0. Also, be sure to prune whitespaces with this one.