# Custom request attributes using PHP

**URL:** <https://community.dynatrace.com/t/custom-request-attributes-using-php/42694>\
**Category:** Open Q&A\
**Tags:** request-attributes\
**Created:** [November 17, 2023, 8:02pm UTC](https://community.dynatrace.com/t/custom-request-attributes-using-php/42694 "2023-11-17T20:02:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EduardoLourenco](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@EduardoLourenco](https://community.dynatrace.com/u/EduardoLourenco)\
**Post date:** [November 17, 2023, 8:02pm UTC](https://community.dynatrace.com/t/custom-request-attributes-using-php/42694/1 "2023-11-17T20:02:45Z")

</div>

Hi,

We are using PHP with Dynatrace but when we searched for the SDK we did not find the “Add custom request attributes” section like in other languages (DotNet, Pyton, etc).  
Will this functionality be added in the future?  
We have many attributes to send through the code that cannot be sent via header or request parameters, what is the current best way to add new custom attributes by PHP at runtime?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [November 17, 2023, 8:24pm UTC](https://community.dynatrace.com/t/custom-request-attributes-using-php/42694/2 "2023-11-17T20:24:52Z")

</div>

You can add request attributes for PHP directly in Dynatrace if it is a method argument, see&nbsp;[https://docs.dynatrace.com/docs/shortlink/request-attributes-method-arguments.](https://docs.dynatrace.com/docs/shortlink/request-attributes-method-arguments)

If you need to push information and context from the code, I’d suggest using [OpenTelemetry instead](https://docs.dynatrace.com/docs/extend-dynatrace/opentelemetry/walkthroughs/php). Then you can create your own spans and send span attributes, which can be used as the source for request attributes.

---

<div class="post-metadata">

**Author:** ![EduardoLourenco](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@EduardoLourenco](https://community.dynatrace.com/u/EduardoLourenco)\
**Post date:** [November 21, 2023, 3:08pm UTC](https://community.dynatrace.com/t/custom-request-attributes-using-php/42694/3 "2023-11-21T15:08:43Z")

</div>

Thanks for the answer [@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;!  
I’ll read these documents, but do you know if there is any update plan for the [OneAgent SDK for PHP](https://github.com/Dynatrace/OneAgent-SDK-for-PHP)?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [November 21, 2023, 3:35pm UTC](https://community.dynatrace.com/t/custom-request-attributes-using-php/42694/4 "2023-11-21T15:35:39Z")

</div>

Unfortunately, I don’t have such information, but I’d not expect to make any significant improvements in OneAgent SDK as the industry focus is on OpenTelemetry. Maybe [@michael\_kopp](https://community.dynatrace.com/user/34884)&nbsp;or [@\_Alexander\_](https://community.dynatrace.com/user/4565)&nbsp;can confirm that.
