Repository: honeycombio/beeline-nodejs
Pull request #292 (2021-01-18 05:04:01)

Bump eslint from 7.17.0 to 7.18.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.17.0 to 7.18.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/eslint/eslint/releases">eslint's releases</a>.</em></p>
<blockquote>
<h2>v7.18.0</h2>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/e3264b26a625d926a1ea96df1c4b643af5c3797c"><code>e3264b2</code></a> Upgrade: @eslint/eslintrc to improve error message for invalid extends (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/14009">#14009</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/f17c3c371789ffa84f0cda57101e8193899adbe6"><code>f17c3c3</code></a> Update: check logical assignment operators in the complexity rule (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13979">#13979</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/672deb057a14a7acad8c669189870009f1edb8a6"><code>672deb0</code></a> Docs: fix no-invalid-regexp docs regarding ecmaVersion (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13991">#13991</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/179a910b32e853bc12a9dd71f7c10e762cbeac44"><code>179a910</code></a> Fix: --init crash on question to upgrade/downgrade ESLint (fixes <a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13978">#13978</a>) (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13995">#13995</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/292b1c0017bc442d399f67e01d699c59e6b71453"><code>292b1c0</code></a> Fix: no-extra-parens false positive with <code>let</code> identifier in for-loop (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13981">#13981</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/de61f9444cf58a4d70e126ab3d10bf20851de7c9"><code>de61f94</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/9250d167ceb5684669eabe93dae326e33f0684f2"><code>9250d16</code></a> Upgrade: Bump lodash to fix security issue (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13993">#13993</a>) (Frederik Prijck)</li>
<li><a href="https://github.com/eslint/eslint/commit/75fea9bcdd3dde5a07e0089d9011a4df518cdbe3"><code>75fea9b</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/f2687e71f9e2a2773f821c4dc1a02abe95b97df4"><code>f2687e7</code></a> Docs: update space-in-parens related rules (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13985">#13985</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/4a38bbe81b4b29ca1a4e62d0a0cc8d525455b063"><code>4a38bbe</code></a> Docs: space-in-parens examples with no arguments etc. (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13987">#13987</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/3e491698687aa08b3b798cee0931f0872ca1bc55"><code>3e49169</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/c5bf1f2150a9fbbb9e74c04808dc3bfeda1ed321"><code>c5bf1f2</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/98a729c9def54cee9e5478e75e8bd6f28167d5e8"><code>98a729c</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/e83a6962b51b05c2ddfe42b0748b405d515eeb9d"><code>e83a696</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/78cb48345c725e9f90fd0e631c476802244df4a4"><code>78cb483</code></a> Chore: test <code>foo( )</code> with space-in-parens option &quot;always&quot; (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13986">#13986</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/f6948f6bdc763dca0787bb2786bc9f6f9ed88f43"><code>f6948f6</code></a> Docs: Update semantic versioning policy (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13970">#13970</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/068821248e2d2eff11152f270102d537d8fa8126"><code>0688212</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/aeba5e5e6062095a06d9b867d7e7ee75422f25b9"><code>aeba5e5</code></a> Chore: fix typo (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13975">#13975</a>) (Nitin Kumar)</li>
<li><a href="https://github.com/eslint/eslint/commit/4ee113414bdcbea240a5d9db27da6a10df472005"><code>4ee1134</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/eslint/eslint/blob/master/CHANGELOG.md">eslint's changelog</a>.</em></p>
<blockquote>
<p>v7.18.0 - January 15, 2021</p>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/e3264b26a625d926a1ea96df1c4b643af5c3797c"><code>e3264b2</code></a> Upgrade: @eslint/eslintrc to improve error message for invalid extends (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/14009">#14009</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/f17c3c371789ffa84f0cda57101e8193899adbe6"><code>f17c3c3</code></a> Update: check logical assignment operators in the complexity rule (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13979">#13979</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/672deb057a14a7acad8c669189870009f1edb8a6"><code>672deb0</code></a> Docs: fix no-invalid-regexp docs regarding ecmaVersion (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13991">#13991</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/179a910b32e853bc12a9dd71f7c10e762cbeac44"><code>179a910</code></a> Fix: --init crash on question to upgrade/downgrade ESLint (fixes <a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13978">#13978</a>) (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13995">#13995</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/292b1c0017bc442d399f67e01d699c59e6b71453"><code>292b1c0</code></a> Fix: no-extra-parens false positive with <code>let</code> identifier in for-loop (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13981">#13981</a>) (Milos Djermanovic)</li>
<li><a href="https://github.com/eslint/eslint/commit/de61f9444cf58a4d70e126ab3d10bf20851de7c9"><code>de61f94</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/9250d167ceb5684669eabe93dae326e33f0684f2"><code>9250d16</code></a> Upgrade: Bump lodash to fix security issue (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13993">#13993</a>) (Frederik Prijck)</li>
<li><a href="https://github.com/eslint/eslint/commit/75fea9bcdd3dde5a07e0089d9011a4df518cdbe3"><code>75fea9b</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/f2687e71f9e2a2773f821c4dc1a02abe95b97df4"><code>f2687e7</code></a> Docs: update space-in-parens related rules (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13985">#13985</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/4a38bbe81b4b29ca1a4e62d0a0cc8d525455b063"><code>4a38bbe</code></a> Docs: space-in-parens examples with no arguments etc. (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13987">#13987</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/3e491698687aa08b3b798cee0931f0872ca1bc55"><code>3e49169</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/c5bf1f2150a9fbbb9e74c04808dc3bfeda1ed321"><code>c5bf1f2</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/98a729c9def54cee9e5478e75e8bd6f28167d5e8"><code>98a729c</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/e83a6962b51b05c2ddfe42b0748b405d515eeb9d"><code>e83a696</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/78cb48345c725e9f90fd0e631c476802244df4a4"><code>78cb483</code></a> Chore: test <code>foo( )</code> with space-in-parens option &quot;always&quot; (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13986">#13986</a>) (Chris Brody)</li>
<li><a href="https://github.com/eslint/eslint/commit/f6948f6bdc763dca0787bb2786bc9f6f9ed88f43"><code>f6948f6</code></a> Docs: Update semantic versioning policy (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13970">#13970</a>) (Nicholas C. Zakas)</li>
<li><a href="https://github.com/eslint/eslint/commit/068821248e2d2eff11152f270102d537d8fa8126"><code>0688212</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
<li><a href="https://github.com/eslint/eslint/commit/aeba5e5e6062095a06d9b867d7e7ee75422f25b9"><code>aeba5e5</code></a> Chore: fix typo (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13975">#13975</a>) (Nitin Kumar)</li>
<li><a href="https://github.com/eslint/eslint/commit/4ee113414bdcbea240a5d9db27da6a10df472005"><code>4ee1134</code></a> Sponsors: Sync README with website (ESLint Jenkins)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/eslint/eslint/commit/6509705a3b8d2542d09d1c22041fe73dd0d0638f"><code>6509705</code></a> 7.18.0</li>
<li><a href="https://github.com/eslint/eslint/commit/ad923cb9fde31fb2be0f53e1eccb25f21c412c02"><code>ad923cb</code></a> Build: changelog update for 7.18.0</li>
<li><a href="https://github.com/eslint/eslint/commit/e3264b26a625d926a1ea96df1c4b643af5c3797c"><code>e3264b2</code></a> Upgrade: @eslint/eslintrc to improve error message for invalid extends (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/14009">#14009</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/f17c3c371789ffa84f0cda57101e8193899adbe6"><code>f17c3c3</code></a> Update: check logical assignment operators in the complexity rule (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13979">#13979</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/672deb057a14a7acad8c669189870009f1edb8a6"><code>672deb0</code></a> Docs: fix no-invalid-regexp docs regarding ecmaVersion (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13991">#13991</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/179a910b32e853bc12a9dd71f7c10e762cbeac44"><code>179a910</code></a> Fix: --init crash on question to upgrade/downgrade ESLint (fixes <a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13978">#13978</a>) (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13">#13</a>...</li>
<li><a href="https://github.com/eslint/eslint/commit/292b1c0017bc442d399f67e01d699c59e6b71453"><code>292b1c0</code></a> Fix: no-extra-parens false positive with <code>let</code> identifier in for-loop (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13981">#13981</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/de61f9444cf58a4d70e126ab3d10bf20851de7c9"><code>de61f94</code></a> Sponsors: Sync README with website</li>
<li><a href="https://github.com/eslint/eslint/commit/9250d167ceb5684669eabe93dae326e33f0684f2"><code>9250d16</code></a> Upgrade: Bump lodash to fix security issue (<a href="https://github-redirect.dependabot.com/eslint/eslint/issues/13993">#13993</a>)</li>
<li><a href="https://github.com/eslint/eslint/commit/75fea9bcdd3dde5a07e0089d9011a4df518cdbe3"><code>75fea9b</code></a> Sponsors: Sync README with website</li>
<li>Additional commits viewable in <a href="https://github.com/eslint/eslint/compare/v7.17.0...v7.18.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint&package-manager=npm_and_yarn&previous-version=7.17.0&new-version=7.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/lib/instrumentation/http.js b/lib/instrumentation/http.js
index 7d3cb08..367c563 100644
--- a/lib/instrumentation/http.js
+++ b/lib/instrumentation/http.js
@@ -50,7 +50,7 @@ let instrumentHTTP = (http, opts = {}) => {
       // make sure options is populated enough for url.format to give us reasonable results.  these are all defaults from nodejs docs.
       combinedOptions.protocol = combinedOptions.protocol || "http:";
       combinedOptions.port = combinedOptions.port !== 80 ? combinedOptions.port : null;
-      combinedOptions.pathname = combinedOptions.path || "/";
+      combinedOptions.pathname = combinedOptions.pathname || combinedOptions.path || "/";
       if (!combinedOptions.hostname && !combinedOptions.host) {
         combinedOptions.hostname = "localhost";
       }
diff --git a/lib/instrumentation/https.js b/lib/instrumentation/https.js
index eb0e0e0..ee9da7d 100644
--- a/lib/instrumentation/https.js
+++ b/lib/instrumentation/https.js
@@ -51,7 +51,7 @@ let instrumentHTTPS = (https, opts = {}) => {
       // make sure options is populated enough for url.format to give us reasonable results.  these are all defaults from nodejs docs.
       combinedOptions.protocol = combinedOptions.protocol || "https:";
       combinedOptions.port = combinedOptions.port !== 443 ? combinedOptions.port : null;
-      combinedOptions.pathname = combinedOptions.path || "/";
+      combinedOptions.pathname = combinedOptions.pathname || combinedOptions.path || "/";
       if (!combinedOptions.hostname && !combinedOptions.host) {
         combinedOptions.hostname = "localhost";
       }
diff --git a/package-lock.json b/package-lock.json
index f701e8d..535bea6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -395,9 +395,9 @@
       }
     },
     "@eslint/eslintrc": {
-      "version": "0.2.2",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz",
-      "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==",
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz",
+      "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==",
       "dev": true,
       "requires": {
         "ajv": "^6.12.4",
@@ -407,9 +407,17 @@
         "ignore": "^4.0.6",
         "import-fresh": "^3.2.1",
         "js-yaml": "^3.13.1",
-        "lodash": "^4.17.19",
+        "lodash": "^4.17.20",
         "minimatch": "^3.0.4",
         "strip-json-comments": "^3.1.1"
+      },
+      "dependencies": {
+        "lodash": {
+          "version": "4.17.20",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+          "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+          "dev": true
+        }
       }
     },
     "@istanbuljs/load-nyc-config": {
@@ -2586,13 +2594,13 @@
       }
     },
     "eslint": {
-      "version": "7.17.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.17.0.tgz",
-      "integrity": "sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ==",
+      "version": "7.18.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
+      "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
       "dev": true,
       "requires": {
         "@babel/code-frame": "^7.0.0",
-        "@eslint/eslintrc": "^0.2.2",
+        "@eslint/eslintrc": "^0.3.0",
         "ajv": "^6.10.0",
         "chalk": "^4.0.0",
         "cross-spawn": "^7.0.2",
@@ -2616,7 +2624,7 @@
         "js-yaml": "^3.13.1",
         "json-stable-stringify-without-jsonify": "^1.0.1",
         "levn": "^0.4.1",
-        "lodash": "^4.17.19",
+        "lodash": "^4.17.20",
         "minimatch": "^3.0.4",
         "natural-compare": "^1.4.0",
         "optionator": "^0.9.1",
@@ -2697,6 +2705,12 @@
             "type-check": "~0.4.0"
           }
         },
+        "lodash": {
+          "version": "4.17.20",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+          "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
+          "dev": true
+        },
         "optionator": {
           "version": "0.9.1",
           "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@@ -4008,9 +4022,9 @@
       "dev": true
     },
     "husky": {
-      "version": "4.3.7",
-      "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.7.tgz",
-      "integrity": "sha512-0fQlcCDq/xypoyYSJvEuzbDPHFf8ZF9IXKJxlrnvxABTSzK1VPT2RKYQKrcgJ+YD39swgoB6sbzywUqFxUiqjw==",
+      "version": "4.3.8",
+      "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz",
+      "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==",
       "dev": true,
       "requires": {
         "chalk": "^4.0.0",


Test patch:
diff --git a/lib/instrumentation/http.test.js b/lib/instrumentation/http.test.js
index f6efeb8..6255b84 100644
--- a/lib/instrumentation/http.test.js
+++ b/lib/instrumentation/http.test.js
@@ -82,6 +82,33 @@ test("url as options", (done) => {
   );
 });
 
+test("url as options with pathname and query", done => {
+  tracker.setTracked(newMockContext());
+
+  http.get(
+    {
+      hostname: "localhost",
+      port: 9009,
+      path: "/test?something=true",
+      pathname: "/test",
+      search: "?something=true",
+    },
+    res => {
+      expect(res.headers[api.TRACE_HTTP_HEADER.toLowerCase()]).toBe(
+        "1;trace_id=0,parent_id=51001,context=e30="
+      );
+      expect(api._apiForTesting().sentEvents).toEqual([
+        expect.objectContaining({
+          [schema.EVENT_TYPE]: "http",
+          name: "GET",
+          url: "http://localhost:9009/test?something=true",
+        }),
+      ]);
+      done();
+    }
+  );
+});
+
 test("correct response context", (done) => {
   tracker.setTracked(newMockContext());
 
diff --git a/lib/instrumentation/https.test.js b/lib/instrumentation/https.test.js
index 5b85512..2619dab 100644
--- a/lib/instrumentation/https.test.js
+++ b/lib/instrumentation/https.test.js
@@ -89,6 +89,44 @@ test("url as options", (done) => {
   );
 });
 
+test("url as options with pathname and query", done => {
+  tracker.setTracked(newMockContext());
+
+  https.get(
+    {
+      hostname: "google.com",
+      path: "/search?q=honeycomb.io",
+      pathname: "/search",
+      search: "?q=honeycomb.io",
+    },
+    _res => {
+      expect(api._apiForTesting().sentEvents).toMatchObject(
+        semver.lt(process.version, "9.0.0")
+          ? [
+              {
+                [schema.EVENT_TYPE]: "http",
+                [schema.TRACE_SPAN_NAME]: "GET",
+                url: "http://google.com:443/search?q=honeycomb.io",
+              },
+              {
+                [schema.EVENT_TYPE]: "https",
+                [schema.TRACE_SPAN_NAME]: "GET",
+                url: "https://google.com/search?q=honeycomb.io",
+              },
+            ]
+          : [
+              {
+                [schema.EVENT_TYPE]: "https",
+                [schema.TRACE_SPAN_NAME]: "GET",
+                url: "https://google.com/search?q=honeycomb.io",
+              },
+            ]
+      );
+      done();
+    }
+  );
+});
+
 test("correct response context", (done) => {
   tracker.setTracked(newMockContext());