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

Filter user actions by a http method

laurent
Visitor

Hey all,

I'm trying to define a couple of user actions same xhrurls, but a different http method.

Any way to do this? I tried to add a placeholder "httpMethod" linked to metadata + define user action with xhrurl + httpMethod equal to my verb, but it seems to not work.

Would the "session and action properties" work with the custom-defined property / server-side request feature? Any example of how to do this?

Thanks for your help!

3 REPLIES 3

AurelienGravier
DynaMight Pro
DynaMight Pro

Hello @laurent

 

My opinion below :

HTTP method is only available on request side not on user actions side.
So you can create a request attribute to catch the HTTP Method and define this request attribute as a user action properties (it will work only for XHR actions because you will have lot of values during loading page action) :

AurelienGravier_1-1675244559224.png

 

However, you can't use user action property as a placeholder in naming rules :

AurelienGravier_0-1675244517508.png

 

On your case, I recommend using data dtname :

"If the standard action name detection doesn't serve your purpose, you can also set the data-dtname custom attribute within the HTML tags and use it as a caption. " :

https://www.dynatrace.com/support/help/shortlink/custom-names#change-action-name-via-data-dtname

 

Regards, 

 

Observability consultant - Dynatrace Associate/Pro/Services certified

Ana_Kuzmenchuk
Community Team
Community Team

Hi @laurent, did the comment above help you solve your issue? Or maybe you found your own solution? Thanks for letting the Community know!

The only constant is change. Finding ways for great things to happen!

Viachaslau
Advisor

Another way:
If no one agent (only rum)

If no time to mark dtname for all XHR (usually if dtname marks is not a part of SDLC - you will wait for implementation CR)

Ask developers add add parameter or anchor in the query dispatcher method,
than You can parse is via placeholders and create a rule

e.g. {method} {xhr url}

it will be cheap, fast generic solution applied automatically to all XHR you have

Viachaslau_0-1683893057997.png

 

Featured Posts