# Find traces related to session/user actions

**URL:** <https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329>\
**Category:** Real User Monitoring\
**Tags:** distributed-traces-classic, services-classic\
**Created:** [April 17, 2023, 1:55pm UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329 "2023-04-17T13:55:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![clc](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@clc](https://community.dynatrace.com/u/clc)\
**Post date:** [April 17, 2023, 1:55pm UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329/1 "2023-04-17T13:55:39Z")

</div>

We are having some issues with some services not being correlated correctly to a useraction.

In the good old Appmon it was easy to see since all purepaths/webrequest/services it was not able to correlate to a user action was still in the session just greyed out.

Are there any easyway to find all services/purepaths that are not correct correlated to a usersession/useraction in Dynatrace?

-Claus

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [April 17, 2023, 3:19pm UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329/2 "2023-04-17T15:19:18Z")

</div>

Hi,

Maybe using&nbsp;[request attributes](https://www.dynatrace.com/support/help/shortlink/request-attributes)&nbsp;to enrich/add user action information to requests.

And then, you can filter traces with those request attributes.

Best regards

---

<div class="post-metadata">

**Author:** ![benjamin\_mullan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/benjamin_mullan/32/38132_2.png) [@benjamin\_mullan](https://community.dynatrace.com/u/benjamin_mullan)\
**Post date:** [April 17, 2023, 11:42pm UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329/3 "2023-04-17T23:42:21Z")

</div>

[@clc](https://community.dynatrace.com/user/12958)&nbsp;I have had stitching issues with web front end calls to backend api calls when they are on a different domain. I found the dtCookie value was different on every single backend call for a single user/session. I believe this is a FE coding issue (but that’s a guess an not my expertise) instead I utilized&nbsp;the following “Use the x-dtc header” instead of the cookie base approach.

> **[Link cross-origin XHR user actions and their distributed traces in RUM Classic](https://docs.dynatrace.com/docs/observe/digital-experience/rum-classic/web-applications/initial-setup/link-cross-origin-xhrs)**
>
> Enable the correlation between cross-origin XHR actions and distributed traces.

Another thing to check is if you are exceeding the “Adaptive traffic management” limits. I’m not entirely sure if this can be a culprit for stitching issues or not, I’m assuming it is but hopefully someone can confirm that.

You should have a dashboard in your tenant called&nbsp;OneAgent Traces - Adaptive traffic management. This has some handy info around the ATM limits in your environment.

---

<div class="post-metadata">

**Author:** ![clc](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@clc](https://community.dynatrace.com/u/clc)\
**Post date:** [April 18, 2023, 5:56am UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329/4 "2023-04-18T05:56:23Z")

</div>

We could extract a unique session id and tag the individual services, but it will not be able to use it for traces with multible services used and thats almost all our traces so can use it in this case.

---

<div class="post-metadata">

**Author:** ![clc](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@clc](https://community.dynatrace.com/u/clc)\
**Post date:** [April 18, 2023, 6:06am UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329/5 "2023-04-18T06:06:14Z")

</div>

Sessions are ok and all useraction within a usersession is in the visit, issue is some webrequest er not stitched correctly to useraction. So we have issue with purepaths that encounters a error but because they are not stitched to a useraction it seems all ok, and im having problem tracing it back to a session since I can not find a unique trace id for a useraction/usersession, but guessing that there must be for correlation.

No issues with to many purepaths/load so no adaptive traffic issues seen in our environment.

---

<div class="post-metadata">

**Author:** ![gbaudart](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@gbaudart](https://community.dynatrace.com/u/gbaudart)\
**Post date:** [April 19, 2024, 1:48pm UTC](https://community.dynatrace.com/t/find-traces-related-to-session-user-actions/39329/6 "2024-04-19T13:48:26Z")

</div>

Hi&nbsp;[@clc](https://community.dynatrace.com/user/12958)&nbsp;  
In certain cases, if you use agentless and if you activate cross-origin, it may be necessary to pass the x-dtc header into CORS in order to be able to link user actions (or errors) to backend traces.

documentation link :&nbsp;[https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/initial-setup/l…](https://docs.dynatrace.com/docs/platform-modules/digital-experience/web-applications/initial-setup/link-cross-origin-xhrs)
