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

Apply request attribute as filter to multidimensional analysis tools

CarlosTF
Frequent Guest

Hello everybody.

I've been using the 'Custom multidimensional analysis' to get the 'Request Count', filtering  by Service types and by custom 'service tags' and  'process group tags', and spltting by dimension {Request:Name} to successfully get a list of top web request.

Now , I would like to narrow my querry a bit more by using a request attribute (yet to be done) as value to narrow the filter.

The results I've got so far look like these:

/bi/eu/checkout
/health/probe.html
/ma/ca/ginbi/1/authentication/loginInfo
/bc/ca/ginbi/1/authentication/loginInfo
preferences
/lu/ga/checkout

I would like to create a request attribute called 'region' that would use the following regex:
^/([a-z]{2})/
Which means that in case the request looks like this:
/**/co/whatever    -> It will get the value of the two characters between the 2nd and 3rd '/' character.

By doing this. When for example filtering by: Request attribute: region = "ca"     --> it should only return:
/ma/ca/ginbi/1/authentication/loginInfo
/bc/ca/ginbi/1/authentication/loginInfo

I've tried unsuccesfully different approaches by using these datasources:
Capture Web request URL path globally
Capture Web service method name globally
Capture Web request URL path globally
Capture Web request URL globally

But I only see the request attribute created and attached to traces but not to web request.

It is possible to get this done?

Any help about whjat can I be doing wrong?

Thank you in advance.

10 REPLIES 10

Mohamed_Hamdy
DynaMight Leader
DynaMight Leader

Hi @CarlosTF ,

I just want to confirm if I understood correctly, based on your message, the request attribute has been created and is being captured successfully, and you can see it in the traces. However, you’re looking to include this request attribute in the request name, correct?

If that’s the case, you can achieve this by creating a request naming rule that utilizes the request attribute.

Let me know if that helps or if I misunderstood anything.

Certified Dynatrace Professional | Certified Dynatrace Services Delivery - Observability & CloudOps | Dynatrace Partner - yourcompass.ca

Peter_Youssef
Leader

Hi @CarlosTF 

Kindly check the configured Oneagent headers features, make sure the required headers are activated and enabled properly, Thanks.

Peter_Youssef
Leader

Hi @CarlosTF 

if possible kindly share a configuration sample for further analysis, Thanks.

Peter_Youssef
Leader

Hello @CarlosTF 
PFA screenshot for validation
2025-04-21_11h09_17.png

BR,

Peter

Peter_Youssef
Leader

Hi @CarlosTF 

in addition to the available resource, kindly make sure that Dynatrace headers aren't blocked through Firewall or Network devices as per https://docs.dynatrace.com/docs/observe/digital-experience/web-applications/initial-setup/firewall-c...

  • on the other side, validate the CMC related configurations 
    2025-04-21_11h15_40.png

BR,

Peter

Peter_Youssef
Leader

Hi @CarlosTF 

PFA Dynatrace ref as it contains related information to the current scenario:

2025-04-21_11h23_07.png

Kindly keep us posted.
Hoping it helps,
BR

Good morning and thank you Peter, Mohammed, and everyody who tried to invstigate or answer this.

I've finally got it working when setting it like this:
Data type -> text

All disticnt values
To upper case
Allow this request attribute to access unmasked personal data. (Enabled)

Add new datasource:
Request attribute source: Web Request URL Path
Specify where the attribute is captured and then stored: Capture from both client ans server side and store where found.

This worked. 

Thank you all again 🙂




Em

Thanks @CarlosTF for keeping us posted, Best of luck during upcoming challenges and solutions :dynaspin:👍

No, thanks to you guys:

I forgot to add something

I've finally got it working when setting it like this:
Data type -> text

All disticnt values
To upper case
Allow this request attribute to access unmasked personal data. (Enabled)

Add new datasource:
Request attribute source: Web Request URL Path
Specify where the attribute is captured and then stored: Capture from both client ans server side and store where found.

Also in the 'Further restrict or process captured parameters (optional)' section:
Prune whitespace: Enabled
and 
Extract value from captured data per regex:    ^/([a-z]{2})/


This time, this is the right solution.

Thanks again

Featured Posts