-
Notifications
You must be signed in to change notification settings - Fork 148
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
Nginx auth_request does not share trace id of parent request #143
Comments
@phillipuniverse I came across the same problem and the problem seems to be that the
You should see on your logs 3 requests with the same trace id. |
@jmadureira this is probably what's going on, I will let you know when I have a chance to test this. What you're saying is to move the
|
@jmadureira I still can't quite get this to work event with moving in the What exactly did you mean by this?
It seems like no matter what, there are different |
@DebajitDas thanks for the clarification in #174 about what that is designed to fix. Is the idea that eventually the I'm trying to figure out if I should roll up my sleeves and try to figure out what's going on with these sub requests in the main nginx library or if there is just something obvious I'm missing in my configuration. |
@eguzki would this help? |
It helps to understand and validate our current config, but unfortunately does not work as expected. The gateway calls the "auth server" in a post action
And calling the upstream app is done using openresty's ngx.exec. Interesting to note that the "auth" call replaces parent span and upstream span is never created. Still looking at it. |
Describe your environment
I am running in Docker and copying in the OpenTelemetry module from https://github.com/nginxinc/nginx-unsupported-modules, specifically this image,
sha256:43f2fbf6bd3ca9186e4712e9ab79d36abfa2a5d32624478cf02f46f657208272
. This module is built directly frommain
and was created at2022-04-12T02:50:18.92379913Z
.I am in the process of converting to OpenTracing to OpenTelemetry for Nginx. Most of this went ok, but it appears that sub requests from
auth_request
has their own trace_id. I would expect that the trace_id would be the same for the parent and sub request with just different span ids. Below are the files I am using to reproduce the issue.Steps to reproduce
Dockerfile
:localdev.conf
:otel-config.toml
:Copy these files into a folder and then:
Once the server is up, you can
curl localhost:8080
.These are examples of the 2 access logs that are emitted:
/public-gateway-internal-routes/auth/
trace id - 7a0b6b7d06ea20df87f2bf13b184d949/
trace id - 25a831094334f5e595ce0da24dc1c41fWhat is the expected behavior?
I expected both of these to share the same trace id but with different span ids. This seems like the intended behavior from #94.
What is the actual behavior?
Trace ids are different between the parent and sub request.
Additional context
N/A
The text was updated successfully, but these errors were encountered: