# Request attribute condition for calculated service metric

**URL:** <https://community.dynatrace.com/t/request-attribute-condition-for-calculated-service-metric/44720>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, request-attributes\
**Created:** [March 18, 2024, 1:05pm UTC](https://community.dynatrace.com/t/request-attribute-condition-for-calculated-service-metric/44720 "2024-03-18T13:05:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fselvanadin](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fselvanadin/32/8969_2.png) [@Fselvanadin](https://community.dynatrace.com/u/Fselvanadin)\
**Post date:** [March 18, 2024, 1:05pm UTC](https://community.dynatrace.com/t/request-attribute-condition-for-calculated-service-metric/44720/1 "2024-03-18T13:05:01Z")

</div>

Hi community,

I need your help in order to create a calculated service metric based on service response time builtin metric.

I would like to collect service response time from a “top service” (SERVICE A) and using the conditions below :  
- only requests that calling the sub-service named “SERVICE T”  
AND  
- SERVICE T request attribute value (named RA\_HEADER\_X-TYPE) equals to “TYPE1”

From my understanding, we can create this kind of configuration by using “Match on downstream services”.

Unfortunately it doesn’t work as expected.  
For you information, SERVICE T is not the nearest service of SERVICE A (We could have several services called between them).

Please find below some configuration screenshots.

Have you ever use this feature? Do you know if it works when the sub-service is not directly called from the top one?

Thank you for your help.

Regards Freddy

 ![Fselvanadin_0-1710766900722.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/e/4ec2e6441bcdc977efc63b8ccff8e98aaae4bf0a.png)

 ![Fselvanadin_1-1710766939856.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d167f232d574f0e26c5d4802d2fa0a0dac4f6961.png)

---

<div class="post-metadata">

**Author:** ![Eric\_Yu](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/eric_yu/32/20360_2.png) [@Eric\_Yu](https://community.dynatrace.com/u/Eric_Yu)\
**Post date:** [March 19, 2024, 3:17pm UTC](https://community.dynatrace.com/t/request-attribute-condition-for-calculated-service-metric/44720/2 "2024-03-19T15:17:47Z")

</div>

Hi Freddy,

Not sure if you’re asking this, but if you’re trying to create a metric with a topology condition of calls\_from or calls\_to service, this is not supported.

 ![Eric_Yu_1-1710861087932.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/1/c14340d8e3170fea838903279d6c74aa6da5c755.png)  
&nbsp;&nbsp;  
 ![Eric_Yu_0-1710860978911.png](https://global.discourse-cdn.com/dynatrace/original/1X/bdff76fd2ccd83d745aecee77081bc1e94d421e8.png)

And regarding the “Match on downstream services”, I’m pretty sure it only applies to child services directly below them.

Regards,

---

<div class="post-metadata">

**Author:** ![Fselvanadin](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fselvanadin/32/8969_2.png) [@Fselvanadin](https://community.dynatrace.com/u/Fselvanadin)\
**Post date:** [March 22, 2024, 9:09am UTC](https://community.dynatrace.com/t/request-attribute-condition-for-calculated-service-metric/44720/3 "2024-03-22T09:09:37Z")

</div>

Hello&nbsp;[@Eric\_Yu](https://community.dynatrace.com/user/54474)

thank you for your answer.

I think you’re right.

I’ve tried to create a similar metric, from a “parent” service (directly connected to the one which extracts the request attribute) : the request attribute condition is working as expected.

Thank you for help

Regards

Freddy
