Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set context header for jaeger #35

Closed
ssorathia opened this issue May 7, 2018 · 11 comments
Closed

Unable to set context header for jaeger #35

ssorathia opened this issue May 7, 2018 · 11 comments

Comments

@ssorathia
Copy link

I seem to be having an issue setting a custom header for the propagation of the traceid.

I have a config like the following:

load_module modules/ngx_http_opentracing_module.so;
load_module modules/ngx_http_jaeger_module.so;

events {
  worker_connections  1024;  ## Default: 1024
}

http {
   opentracing on;
   jaeger_trace_context_header_name custom-trace-id;
   jaeger_service_name nginx;
   jaeger_sampler_type const;
   jaeger_sampler_param 1;

   server {
      location /dump {
         proxy_pass http://localhost:8080;
      }
   }
}

However, when I issue a simple curl command against this endpoint, curl localhost/dump, the downstream service that gets proxied to still sees the Uber-Trace-Id header and my custom trace header is nowhere to be found. I'm not sure if I'm doing something wrong, or if I'm not understanding what that configuration parameter is really supposed to do. I'm using the latest docker container at rnburn/nginx-opentracing:latest to run this.

Any help on this would be appreciated.

@rnburn
Copy link
Collaborator

rnburn commented May 7, 2018

Could you try adding proxy_pass_request_headers on;?

@ssorathia
Copy link
Author

I believe that is the default for that option, but I gave it a try and I see the same behavior.

@rnburn
Copy link
Collaborator

rnburn commented May 7, 2018

@isaachier - any idea what's going on here?

@isaachier
Copy link
Contributor

Ya I think I just fixed this. See jaegertracing/jaeger-client-cpp#91.

@rnburn
Copy link
Collaborator

rnburn commented May 7, 2018

@ssorathia - that fix hasn't been released yet, but try rebuilding the docker image with these arguments:

docker build --build-arg JAEGER_CPP_VERSION=master -t nginx-opentracing .

@isaachier
Copy link
Contributor

Ya very sorry I didn't see this bug until recently.

@ssorathia
Copy link
Author

Ok, let me give it a try, I'll get back to you shortly.

@ssorathia
Copy link
Author

That looks like it resolved the issue! The header seems to both be used for new trace's as well as if a trace id is passed in via the new header. From my perspective, this is the expected behavior.

Thanks for the quick fixes, I can use what I have right now, but just wondering as to when you think this will be rolled into a release?

@isaachier
Copy link
Contributor

Hopefully I'll push a release within the next few days. If @rnburn is ready, a corresponding change here can be merged immediately afterwards.

@ssorathia
Copy link
Author

That would be awesome! I'll keep an eye out for it. Do you guys want to close this issue, want me to close it, or what is your process for these types of issues?

@rnburn
Copy link
Collaborator

rnburn commented Jun 8, 2018

Fixed in 0.4.0 docker image.

@rnburn rnburn closed this as completed Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants