# How to pass tracing information in custom actions for end-to-end tracing

**URL:** <https://forum.rasa.com/t/how-to-pass-tracing-information-in-custom-actions-for-end-to-end-tracing/7114>\
**Category:** Tutorials, Resources & Videos\
**Created:** [April 16, 2019, 9:34pm UTC](https://forum.rasa.com/t/how-to-pass-tracing-information-in-custom-actions-for-end-to-end-tracing/7114 "2019-04-16T21:34:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tasdamen](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tasdamen/32/2591_2.png) [@tasdamen](https://forum.rasa.com/u/tasdamen)\
**Post date:** [April 16, 2019, 9:34pm UTC](https://forum.rasa.com/t/how-to-pass-tracing-information-in-custom-actions-for-end-to-end-tracing/7114/1 "2019-04-16T21:34:58Z")

</div>

I am working on a project that requires building a smart chatbot that enables commerce list/cart building. I have all the components of the architecture working however I need to enable end to end tracing that contains things like user\_id, session Id and request Id.

The incoming call to Rasa core API have session and request Id in the header and I need to pass it through to custom actions so logs can have the end-to-end view.

I have noticed that in the actions.py class action\_endpoint doesn’t pass any incoming request header through:

response = self.action\_endpoint.request( json=json, method=“post”, timeout=DEFAULT\_REQUEST\_TIMEOUT)

My custom channel is a using flask so arguably I should be able to pass along my custom headers doing something like

response = self.action\_endpoint.request( json=json, headers= request.headers, method=“post”, timeout=DEFAULT\_REQUEST\_TIMEOUT)

Since I am new to Python (not new to programming) I have two concerns:

- Not fully knowing the internals of Flask is this thread safe?
- Is there another extension point that I can use to enable passing custom headers to my custom action endpoints?

I will be more than happy to create a PR if this is valid approach.
