Skip to content

Commit

Permalink
[http] fix: use url.URL (#960)
Browse files Browse the repository at this point in the history
url.URL from the standard library should be used instead of the global URL which comes from the dom lib.

Signed-off-by: Naseem <naseem@transit.app>
  • Loading branch information
Naseem committed Apr 16, 2020
1 parent 7412d9b commit 1959930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/opentelemetry-plugin-http/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class HttpPlugin extends BasePlugin<Http> {

protected _getPatchOutgoingGetFunction(
clientRequest: (
options: RequestOptions | string | URL,
options: RequestOptions | string | url.URL,
...args: HttpRequestArgs
) => ClientRequest
) {
Expand All @@ -161,7 +161,7 @@ export class HttpPlugin extends BasePlugin<Http> {
// https://nodejs.org/dist/latest/docs/api/http.html#http_http_get_options_callback
// https://github.com/googleapis/cloud-trace-nodejs/blob/master/src/plugins/plugin-http.ts#L198
return function outgoingGetRequest<
T extends RequestOptions | string | URL
T extends RequestOptions | string | url.URL
>(options: T, ...args: HttpRequestArgs): ClientRequest {
const req = clientRequest(options, ...args);
req.end();
Expand Down

0 comments on commit 1959930

Please sign in to comment.