You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ORIGINALoptions.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.
The text was updated successfully, but these errors were encountered:
blumamir
changed the title
Zipkin exported spans are traced, causing infinite loop
Zipkin exported http traffic is traced, causing infinite loop
May 14, 2020
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 ORIGINALoptions.headers
object (supplied by the user in thehttp.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.
The text was updated successfully, but these errors were encountered: