# request attributes for Node.js

**URL:** <https://community.dynatrace.com/t/request-attributes-for-node-js/50576>\
**Category:** Open Q&A\
**Tags:** oneagent, processes\
**Created:** [March 5, 2025, 8:52pm UTC](https://community.dynatrace.com/t/request-attributes-for-node-js/50576 "2025-03-05T20:52:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seba-Gadrid](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Seba-Gadrid](https://community.dynatrace.com/u/Seba-Gadrid)\
**Post date:** [March 5, 2025, 8:52pm UTC](https://community.dynatrace.com/t/request-attributes-for-node-js/50576/1 "2025-03-05T20:52:18Z")

</div>

What are the alternatives to request attributes for Node.js?  
In the header they use a JSON Web Token, from which I could extract information after decoding it. Will this be possible with attributes?

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [March 6, 2025, 4:16am UTC](https://community.dynatrace.com/t/request-attributes-for-node-js/50576/2 "2025-03-06T04:16:36Z")

</div>

Hi&nbsp;[@Seba-Gadrid](https://community.dynatrace.com/user/78040)&nbsp;,

It is possible to set request attributes using HTTP headers. here is information from the document.

> **[Capture request attributes based on web request data](https://docs.dynatrace.com/docs/observe/application-observability/services/request-attributes/capture-request-attributes-based-on-web-request-data)**
>
> Create request attributes based on web request data.

Technology-independent sources, such as:

- HTTP POST parameters
- [Client IP addresses](https://docs.dynatrace.com/docs/observe/digital-experience/rum-concepts/detection-of-ip-addresses-locations-and-user-agents#ip-addresses)  
The value of the first matching header is reported.
- HTTP request and response headers
- Web request URL or one of its constituents, like the path or a query parameter

In the last two cases, you can also choose the side of the web request on which to capture and store the attribute.

---

<div class="post-metadata">

**Author:** ![Seba-Gadrid](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@Seba-Gadrid](https://community.dynatrace.com/u/Seba-Gadrid)\
**Post date:** [March 7, 2025, 8:07pm UTC](https://community.dynatrace.com/t/request-attributes-for-node-js/50576/3 "2025-03-07T20:07:00Z")

</div>

Hello&nbsp;[@RohitBisht](https://community.dynatrace.com/user/45903)

The information I need comes in a bearer token, will it be possible to extract it from there?

---

<div class="post-metadata">

**Author:** ![RohitBisht](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/rohitbisht/32/38577_2.png) [@RohitBisht](https://community.dynatrace.com/u/RohitBisht)\
**Post date:** [March 7, 2025, 9:02pm UTC](https://community.dynatrace.com/t/request-attributes-for-node-js/50576/4 "2025-03-07T21:02:14Z")

</div>

Ideally we should be able to capture as request headers are supported. Best is to test it out.
