# Is there a way to modify User sessions with custom log attributes?

**URL:** <https://community.dynatrace.com/t/is-there-a-way-to-modify-user-sessions-with-custom-log-attributes/45675>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-sessions\
**Created:** [May 20, 2024, 9:30am UTC](https://community.dynatrace.com/t/is-there-a-way-to-modify-user-sessions-with-custom-log-attributes/45675 "2024-05-20T09:30:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AquariusDarius](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@AquariusDarius](https://community.dynatrace.com/u/AquariusDarius)\
**Post date:** [May 20, 2024, 9:30am UTC](https://community.dynatrace.com/t/is-there-a-way-to-modify-user-sessions-with-custom-log-attributes/45675/1 "2024-05-20T09:30:56Z")

</div>

I’m looking to track user drop-offs between user actions using the User Journey. We want to include a custom attribute from logs ingested via Mulesoft. Is it possible to do this, or is it similar to the situation where Real User Monitoring couldn’t access OneAgent logs? Thank you.

---

<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:** [May 20, 2024, 12:23pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-modify-user-sessions-with-custom-log-attributes/45675/2 "2024-05-20T12:23:22Z")

</div>

If your services are monitored with OneAgents and the User Action to Trace links for in your case, then I would take the approach to add trace context information into your logs (see [Connecting log data to traces](https://docs.dynatrace.com/docs/shortlink/lma-log-enrichment)).&nbsp; So the trace context will be written into your log files, then logs will be ingested into Dynatrace (by OneAgent or by other means) and you will can drill down from a user session to trace and the log entries and vice versa.

See this in action here&nbsp;[Dynatrace connects logs with user sessions for user journey optimization](https://www.dynatrace.com/news/blog/connects-logs-with-user-sessions/)

---

<div class="post-metadata">

**Author:** ![AquariusDarius](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@AquariusDarius](https://community.dynatrace.com/u/AquariusDarius)\
**Post date:** [May 21, 2024, 7:05am UTC](https://community.dynatrace.com/t/is-there-a-way-to-modify-user-sessions-with-custom-log-attributes/45675/3 "2024-05-21T07:05:19Z")

</div>

![felicianoangelo_0-1716275013822.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/f/4fbdb865c5b8c4d8a6dafb5270e9aa2decb06a55.png)

Hi Julius, thanks for your response. Apparently I got this message when i tried to check my logs. Do you think it is still doable on my side. Also, Session Replay is not enabled on my side. Thanks. Hoping for your response.

---

<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:** [May 21, 2024, 5:16pm UTC](https://community.dynatrace.com/t/is-there-a-way-to-modify-user-sessions-with-custom-log-attributes/45675/4 "2024-05-21T17:16:03Z")

</div>

You need to have the trace context in your logs and ingested them to Dynatrace and the dt.trace\_id must not be removed. It really depends on how your logging patterns, format and log pipeline are configured.

See this observability clinic for more examples

[![](https://global.discourse-cdn.com/dynatrace/original/3X/c/0/c01400cc20c295461be762aec149b827bb7a3c5f.jpeg "Integrating Logs and Distributed Traces for Advanced Diagnostics with Dynatrace") ](https://www.youtube.com/watch?v=Ac5_aPBx2f0)
