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
Also when using WHATWG URL + options like this: http.get(new url.URL('http://localhost:8080/helloworld'), { headers: { 'x-foo': 'bar' } }
traceparent header is missing.
What did you expect to see?
traceparent header should be present
What did you see instead?
traceparent header is missing
Additional context
a missing traceparent header is causing disconnected spans.
What version of OpenTelemetry are you using?
0.2.0
What version of Node are you using?
10.17.0
What did you do?
Use a WHATWG URL (https://nodejs.org/dist/latest-v10.x/docs/api/url.html#url_class_url) in
http.get()
instead an options object orstring
.e.g. in https://github.com/open-telemetry/opentelemetry-js/blob/v0.2.0/examples/http/client.js#L22 replace
http.get({ host: 'localhost', port: 8080, path: '/helloworld' }
by
http.get(new url.URL('http://localhost:8080/helloworld')
.Also when using WHATWG URL + options like this:
http.get(new url.URL('http://localhost:8080/helloworld'), { headers: { 'x-foo': 'bar' } }
traceparent header is missing.
What did you expect to see?
traceparent header should be present
What did you see instead?
traceparent header is missing
Additional context
a missing traceparent header is causing disconnected spans.
The current implementation handles WHATWG URL objects like an options object and attaches a
headers
property to it. But node core is ignoring aheaders
property on WHATWG URL objects (see https://github.com/nodejs/node/blob/v12.13.1/lib/_http_client.js#L96 and https://github.com/nodejs/node/blob/v12.13.1/lib/internal/url.js#L1257.If wanted I can try to create a PR to fix this.
The text was updated successfully, but these errors were encountered: