# Connecting PurePath from reverse proxy and OneAgent SDK Incoming WebRequest

**URL:** <https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462>\
**Category:** Open Q&A\
**Tags:** nginx, oneagent, oneagent-sdk\
**Created:** [October 5, 2020, 8:27am UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462 "2020-10-05T08:27:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 5, 2020, 8:27am UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/1 "2020-10-05T08:27:02Z")

</div>

Hello, I have question to you. What are conditions needed to connect purepath between nginx reverse proxy and OneAgent SDK Incoming WebRequest instrumentation? We have nginx that is used as reverse proxy and sends traffic to 0.0.0.0:PORT. I see it as request to unmonitored host. Than I have proper purepaths started from SDK. I catch all headers via SDK, so x-dynatrace is available for agent as well. Should I use

```auto
onesdk_incomingwebrequesttracer_set_remote_address

```

somehow?

Sebastian

---

<div class="post-metadata">

**Author:** ![christian\_neumu](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@christian\_neumu](https://community.dynatrace.com/u/christian_neumu)\
**Post date:** [October 5, 2020, 8:49am UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/2 "2020-10-05T08:49:26Z")

</div>

Hi! Please check these two:

1. You call onesdk\_incomingwebrequesttracer\_add\_request\_header _before_ calling onesdk\_tracer\_start.
2. The X-dynaTrace header is actually sent/passed-through by nginx. E.g. log your calls to onesdk\_incomingwebrequesttracer\_add\_request\_header to ensure it’s really there.

Calling onesdk\_incomingwebrequesttracer\_set\_remote\_address with the remote socket address you get the request is recommended, but is not related to your problem as it is not used for linking PurePaths.

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 5, 2020, 9:17am UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/3 "2020-10-05T09:17:20Z")

</div>

1. I have nesdk\_incomingwebrequesttracer\_add\_request\_header executed before onesdk\_tracer\_start and proper headers are collected (I have loop over all of them)
2. I thought so, this is why I’m thinking about what else can be wrong 🙂 Header is available I see it in Dynatrace as well on list of collected headers.

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 5, 2020, 9:32am UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/4 "2020-10-05T09:32:16Z")

</div>

Ok I’ve make it work, Headers are case sensitive, in my case all headers were Capitilized by framework. I’ve had to restore them proper names using simple string modification and no purepaths are connected properly 🙂

---

<div class="post-metadata">

**Author:** ![christian\_neumu](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@christian\_neumu](https://community.dynatrace.com/u/christian_neumu)\
**Post date:** [October 6, 2020, 2:59pm UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/5 "2020-10-06T14:59:15Z")

</div>

Thank you for reporting that, this should not be the case as the matching is intended to be case insensitive. I will report this internally and we will investigate.

---

<div class="post-metadata">

**Author:** ![christian\_neumu](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@christian\_neumu](https://community.dynatrace.com/u/christian_neumu)\
**Post date:** [October 6, 2020, 3:08pm UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/6 "2020-10-06T15:08:15Z")

</div>

Do you have an example of a header name that was not processed properly? Are you sure it is only capitalization or does your framework give you headers in CGI format (with underscores instead of minus/hyphen)? These would be expected to not work.

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 7, 2020, 1:40pm UTC](https://community.dynatrace.com/t/connecting-purepath-from-reverse-proxy-and-oneagent-sdk-incoming-webrequest/20462/7 "2020-10-07T13:40:53Z")

</div>

For example, I have header X\_DYNATRACE returned by object inside my application. I had to change it to X\_Dynatrace. x\_dynatrace wasn’t working as well.
