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

Delete a part of the request/make the request disappear

Veleda
Visitor


I wanted to do some operations with regular expressions and I am a little bit lost.

1- I wanted to delete a part of the request.
2-I wanted to make a request disappear.

Can you help me?

9 REPLIES 9

Pierre_L
Helper

Hello @Veleda 

Can you send samples of request name you want to operate with a regex and what you want to keep ?

Observability Consultant - Dynatrace Associate

For example I want from these examples:

/Borradores/Errors/getErrors/57580

/Borradores/Errors/getFormatsErrors/57580/312

Only show /Borradores/Errors the rest do not.

I made this that in a test works for me but not here:([^v]Borradores/Errors)

And the second case is that for example I get this request:

/Health and I want to delete it every time it comes out(That it doesn't show me anything).

I don't know if this is the cleanest regex possible but it should works :

(.[^\/]++.[^\/]++.)

For request I don't want to follow or receive alert I use muted request :

https://docs.dynatrace.com/docs/shortlink/service-monitoring-mute

Pierre_L_0-1703762332866.png

 

Observability Consultant - Dynatrace Associate

I don't want to mute it, I want Health to disappear and appear either alone / or blank. But only that request, I want the rest to stay like that.

In this case it should be blank space instead of /Health

(.*)\bHealth\/\b(.*)

Pawel_Zalewski_0-1703767143478.png

 

"The lions does not ally with the coyotes"

Veleda_0-1703768321447.png

 

Ok it's clear.

As you cannot have more than one capture group in the regex, maybe you should try to enable a naming rule with 2 placeholders where each one have a regex that extract before and after the health part in your request :

Pierre_L_0-1703769171893.png

 

Observability Consultant - Dynatrace Associate

HI!,

Try this ^(.*?)Errors

Pawel_Zalewski_0-1703764862910.png

 

"The lions does not ally with the coyotes"

In the test it does not do it for me

Veleda_0-1703766797965.png

 

Featured Posts