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

Zipkin exported http traffic is traced, causing infinite loop #1059

Closed
blumamir opened this issue May 14, 2020 · 3 comments · Fixed by #1060
Closed

Zipkin exported http traffic is traced, causing infinite loop #1059

blumamir opened this issue May 14, 2020 · 3 comments · Fixed by #1060
Assignees
Labels
bug Something isn't working

Comments

@blumamir
Copy link
Member

What version of OpenTelemetry are you using?

v0.8.0

What version of Node are you using?

v13.11.0

What did you do?

Instrumented http library with@opentelemetry/plugin-http, and export the trace data to zipkin using @opentelemetry/exporter-zipkin.
Then I sent two http request to the instrumented app.

What did you expect to see?

Single span per request in zipkin

What did you see instead?

Infinite loop of spans being created with url https://{host_name}:443/api/v2/spans.

Additional context

The issue is that http plugin is deleting the x-opentelemetry-outgoing-request header from the ORIGINAL options.headers object (supplied by the user in the http.request(...) function call).
Zipkin exporter is using the same options object for ALL http request, hence deleting the header in the first request is affecting the following requests which are not marked correctly as OT requests and create a new spans for Zipkin traffic.
I suggest to copy the headers object and delete the OT header from the copy.

I can create a PR to solve the issue if you think it's a good solution.

@blumamir blumamir added the bug Something isn't working label May 14, 2020
@blumamir blumamir changed the title Zipkin exported spans are traced, causing infinite loop Zipkin exported http traffic is traced, causing infinite loop May 14, 2020
@dyladan
Copy link
Member

dyladan commented May 14, 2020

Yes thank you that sounds like a good solution

@dyladan
Copy link
Member

dyladan commented May 14, 2020

I will hold the 0.8.1 release for this bugfix

@blumamir
Copy link
Member Author

Cool I'll send a PR soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants