cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connecting PurePath from reverse proxy and OneAgent SDK Incoming WebRequest

skrystosik
DynaMight Guru
DynaMight Guru

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

onesdk_incomingwebrequesttracer_set_remote_address

somehow?

Sebastian

Regards, Sebastian
6 REPLIES 6

christian_neumu
Dynatracer
Dynatracer

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.

  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.


Regards, Sebastian

skrystosik
DynaMight Guru
DynaMight Guru

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 🙂

Regards, Sebastian

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.

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.

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.

Regards, Sebastian

Featured Posts