-
Notifications
You must be signed in to change notification settings - Fork 81
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
[feat] Adding context propagation to net/http server instrumentation #92
[feat] Adding context propagation to net/http server instrumentation #92
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like you need to run make generate
based on the failure
Also the e2e failure is interesting, because it seems that this change removed the redundant empty span that @JamieDanielson was trying to fix in #86 (see test output)
Ah I see. Is that necessary for context propagation to work in this change? |
Is it cleaner to keep both function names in this PR so the output of the test remains the same, and I can update the other PR after this is merged in? That way we separate concerns, because I don't think the extra empty span has an impact on this one (though I could be mistaken, I've been working on a few different branches of branches lately). |
Yeah that's what I was wondering. if it's relevant to this PR, we can keep it, but otherwise @oxeye-gal can you remove that change so we don't duplicate the work? |
Hey @oxeye-gal - this PR needs rebasing after we merged ARM support in #82. I’m happy to help do that if you would like us to. |
0362e93
to
4471eb2
Compare
…trumentation into http_server_context_propagation # Conflicts: # pkg/instrumentors/bpf/net/http/server/probe.go
@oxeye-gal I've created a PR against your branch to fix the build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for the contribution @oxeye-gal. I'll look at updating #91 next 👍🏻
generated files have been updated, please re-review
@MikeGoldsmith seems like the build fails again due to the added Request.Header offset, what is the correct way to do it? thanks again for the help! |
You'll need to update the offsets.json after adding the new field. This can be done using |
I have added the new field to offsets-tracker, I hope this fixes it @MikeGoldsmith |
We're having hard time with this one 👎🏻 I'll give it a go too |
…trumentation into http_server_context_propagation # Conflicts: # CHANGELOG.md # pkg/instrumentors/bpf/net/http/server/bpf/probe.bpf.c # pkg/instrumentors/bpf/net/http/server/bpf_bpfel_arm64.go # pkg/instrumentors/bpf/net/http/server/bpf_bpfel_x86.go # pkg/instrumentors/bpf/net/http/server/probe.go
Http server context propagation
@open-telemetry/go-instrumentation-approvers this is ready for another review 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Hi,
This PR attempts to add context propagation to the net/http server instrumentation.
We do it by iterating over the buckets of the incoming request header map and trying to find the "traceparent" header.
This was tested with Go versions 1.12-1.19.
Our test environment consisted of instrumented Python application that sends a request to instrumented Go http server.
The produced trace looks like the following:
We would love to get your feedback on this.
Thanks!