-
Notifications
You must be signed in to change notification settings - Fork 806
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
fix(http-plugin): don't modify user's headers object in plugin #1060
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.
Looks great! Can you also check if this issue affects the jaeger exporter?
From the code it looks like Jaeger Exporter is using UDP, so it should not be affected. |
There was a PR to introduce http sending... possible it wasn't merged yet. Ah yes #965 still open. Thanks for the fix. |
@OlivierAlbertini as original plugin author would be nice to get your 👍 here |
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.
perhaps, we could add a test for ensuring that we will have no regression on this, WDYT ?
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
Co-authored-by: Rauno Viskus <Rauno56@users.noreply.github.com>
Which problem is this PR solving?
Fixes #1059
Zipkin exporter is constructing an
headers
object once and then use the same object in all http outgoing requests to Zipkin server. If the http plugin delete a key from the headers object, it affects following requests which are sent without OT header, thus being traced and create infinite loop of spans.Short description of the changes
When http plugin receive outgoing request with OT header, it first clone the headers object, and then
delete
from the clone without modifying the original user's object.