Repository: open-telemetry/opentelemetry-go-contrib
Pull request #2178 (2022-04-10 17:03:14)

build(deps): bump go.mongodb.org/mongo-driver from 1.8.4 to 1.9.0 in /instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo
Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.8.4 to 1.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/mongodb/mongo-go-driver/releases">go.mongodb.org/mongo-driver's releases</a>.</em></p>
<blockquote>
<h2>MongoDB Go Driver 1.9.0</h2>
<p>The MongoDB Go driver team is pleased to release version 1.9.0 of the official Go driver.</p>
<h2>Release Notes</h2>
<p>This release contains improvements to connection pool management, an extended API, and a number of bug fixes.</p>
<h3>Connection storm mitigation</h3>
<p>Previously, the propensity of the driver to inundate a server with new connections during failover events was a particular pain point. This version of the driver contains a number of improvements to mitigate these connection &quot;storms&quot; including:</p>
<ul>
<li>Consider server load during server selection</li>
<li>Prevent creating connections to unhealthy servers</li>
<li>Re-select a server if that server becomes unhealthy during check-out</li>
</ul>
<h3>Custom Aggregate and ChangeStream options</h3>
<p>Certain use-cases may require supplying custom options on <code>aggregate</code> commands. These <code>aggregate</code> operations could be on a <code>Database</code>, <code>Collection</code> or for the creation of a <code>ChangeStream</code>. This version of the driver adds new API to specify custom options in these cases:</p>
<ul>
<li><a href="https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/aggregateoptions.go#L61"><code>AggregateOptions.Custom</code></a> specifies custom options to be added to the aggregate expression</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/changestreamoptions.go#L54"><code>ChangeStreamOptions.Custom</code></a> specifies custom options to be added to the change stream creation aggregate expression</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/changestreamoptions.go#L59"><code>ChangeStreamOptions.CustomPipeline</code></a> specifies custom options to be added to the <code>$changeStream</code> pipeline stage in the change stream creation aggregate expression</li>
</ul>
<p>Note that all the custom options above must be marshalable into BSON. Users should always prefer using non-custom options where possible.</p>
<h3>Let option for CRUD commands</h3>
<p>This version of the driver adds a <code>Let</code> option to most CRUD command options. <code>Let</code> can be used to specify parameters for use in an aggregate expression context (e.g. &quot;$$var&quot;). <code>Let</code> must be a document mapping parameter names to values that are constant or closed expressions without references to document fields. Note that the <code>Let</code> option can only be used against server version 5.0 or higher. <code>Let</code> has been added to:</p>
<ul>
<li><code>AggregateOptions</code></li>
<li><code>BulkWriteOptions</code></li>
<li><code>DeleteOptions</code></li>
<li><code>FindOptions</code></li>
<li><code>FindOneAndDeleteOptions</code></li>
<li><code>FindOneAndReplaceOptions</code></li>
<li><code>FindOneAndUpdateOptions</code></li>
<li><code>ReplaceOptions</code></li>
<li><code>UpdateOptions</code></li>
</ul>
<h3>Cursor and SingleResult constructors</h3>
<p>This version of the driver exposes API to create <code>Cursor</code> and <code>SingleResult</code> instances from BSON document(s). In particular, two new constructor functions have been added: <a href="https://github.com/mongodb/mongo-go-driver/blob/master/mongo/cursor.go#L75"><code>NewCursorFromDocuments</code></a> and <a href="https://github.com/mongodb/mongo-go-driver/blob/master/mongo/single_result.go#L36"><code>NewSingleResultFromDocument</code></a>. The supplied document(s) must be marshalable and non-nil. These new functions should allow for the mocking of read operation results (such as <code>Find</code>, <code>FindOne</code> and <code>Aggregate</code>) for use in testing.</p>
<hr />
<p>For a full list of tickets included in this release, please see the links below:</p>
<ul>
<li><a href="https://jira.mongodb.org/issues/?jql=project%3Dgodriver%20and%20type%3Depic%20and%20status%20%3D%20Closed%20and%20fixVersion%3D1.9.0">Projects</a></li>
<li><a href="https://jira.mongodb.org/issues/?jql=project%3Dgodriver%20and%20type%3D%22new%20feature%22%20and%20status%20%3D%20Closed%20and%20fixVersion%3D1.9.0">New Features</a></li>
<li><a href="https://jira.mongodb.org/issues/?jql=project%3Dgodriver%20and%20type%3Dimprovement%20and%20status%20%3D%20Closed%20and%20fixVersion%3D1.9.0">Improvements</a></li>
<li><a href="https://jira.mongodb.org/issues/?jql=project%3DGODRIVER%20and%20type%3DBug%20and%20status%3Dclosed%20and%20fixVersion%3D1.9.0">Bugs</a></li>
<li><a href="https://jira.mongodb.org/issues/?jql=project%3Dgodriver%20and%20type%3D%22task%22%20and%20status%20%3D%20Closed%20and%20fixVersion%3D1.9.0">Tasks</a></li>
</ul>
<p>Documentation can be found on <a href="%5Bhttps://pkg.go.dev/go.mongodb.org/mongo-driver/mongo?tab=doc%5D(https://pkg.go.dev/go.mongodb.org/mongo-driver/bson?tab=doc)">pkg.go.dev</a> and the <a href="https://docs.mongodb.com/ecosystem/drivers/go/">MongoDB documentation site</a>. BSON library documentation is also available on <a href="https://pkg.go.dev/go.mongodb.org/mongo-driver/bson?tab=doc">pkg.go.dev</a>. Questions and inquiries can be asked on the <a href="https://community.mongodb.com/">MongoDB Developer Community</a>. Bugs can be reported in the <a href="https://jira.mongodb.org/secure/CreateIssue!default.jspa">Go Driver Jira</a> where a list of <a href="https://jira.mongodb.org/browse/GODRIVER">current issues</a> can be found.</p>
<h2>MongoDB Go Driver 1.8.5</h2>
<p>The MongoDB Go driver team is pleased to release version 1.8.5 of the official Go driver.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/35f33daefb0efe9f8820500028fb7779b690b9a1"><code>35f33da</code></a> Update version to v1.9.0</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/d4636c200911242a6f04c24d9ba116e0be7e7b24"><code>d4636c2</code></a> GODRIVER-2370 fix error message in CSFLE Custom Endpoint test Case 5</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/897aa8f704a8db34d714ad38d187850d1a7a96aa"><code>897aa8f</code></a> fix typo in comment (<a href="https://github-redirect.dependabot.com/mongodb/mongo-go-driver/issues/897">#897</a>)</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/b8d17a9bb740cc831642cf4214ea3c8d2b414365"><code>b8d17a9</code></a> GODRIVER-2360 replace admin db in CSFLE examples (<a href="https://github-redirect.dependabot.com/mongodb/mongo-go-driver/issues/894">#894</a>)</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/3d60e915318c66ac5cee869dd15e2e5c56ac269f"><code>3d60e91</code></a> GODRIVER-2068 Use monitor.TestPoolMonitor to replace most connection pool mon...</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/5970415b5bdd318697fc75b2af93a7f724a44e89"><code>5970415</code></a> GODRIVER-2311 Improve the BSON unmarshal buffer reuse fix to reduce memory al...</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/023a8643e432b315dc674ea51526faf0ab87263e"><code>023a864</code></a> GODRIVER-2310 Add snapshot query examples (<a href="https://github-redirect.dependabot.com/mongodb/mongo-go-driver/issues/887">#887</a>)</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/0cd9fa6de3b2c042f03453457a2272699ea75780"><code>0cd9fa6</code></a> GODRIVER-2349 Seed all pseudorandom number generators with a crypto-secure ra...</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/a26cf64eb49d46696a0f7265309432358b2e075c"><code>a26cf64</code></a> Remove unused ServerOption error. (<a href="https://github-redirect.dependabot.com/mongodb/mongo-go-driver/issues/888">#888</a>)</li>
<li><a href="https://github.com/mongodb/mongo-go-driver/commit/a6626e6319abd02a29faa8ed35a0de71ee17575b"><code>a6626e6</code></a> GODRIVER-2351 Add missing nil option checks (<a href="https://github-redirect.dependabot.com/mongodb/mongo-go-driver/issues/883">#883</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/mongodb/mongo-go-driver/compare/v1.8.4...v1.9.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=go.mongodb.org/mongo-driver&package-manager=go_modules&previous-version=1.8.4&new-version=1.9.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>

MrAlias: @dependabot rebase
codecov[bot]: # [Codecov](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) Report
> Merging [#2178](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) (dd818ab) into [main](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/commit/de6bffba0c3813e2bc036dbf9e025eb28fa3ed70?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) (de6bffb) will **increase** coverage by `16.8%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/graphs/tree.svg?width=650&height=150&src=pr&token=P6F3W9WA7Q&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)

```diff
@@           Coverage Diff            @@
##            main   #2178      +/-   ##
========================================
+ Coverage   69.4%   86.2%   +16.8%     
========================================
  Files        135       4     -131     
  Lines       6113     124    -5989     
========================================
- Hits        4244     107    -4137     
+ Misses      1741      14    -1727     
+ Partials     128       3     -125     
```


| [Impacted Files](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | |
|---|---|---|
| [instrumentation/runtime/runtime.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJ1bWVudGF0aW9uL3J1bnRpbWUvcnVudGltZS5nbw==) | | |
| [instrumentation/net/http/otelhttp/test/version.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJ1bWVudGF0aW9uL25ldC9odHRwL290ZWxodHRwL3Rlc3QvdmVyc2lvbi5nbw==) | | |
| [detectors/aws/ec2/version.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZGV0ZWN0b3JzL2F3cy9lYzIvdmVyc2lvbi5nbw==) | | |
| [...entation/github.com/go-kit/kit/otelkit/endpoint.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJ1bWVudGF0aW9uL2dpdGh1Yi5jb20vZ28ta2l0L2tpdC9vdGVsa2l0L2VuZHBvaW50Lmdv) | | |
| [propagators/b3/b3\_config.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cHJvcGFnYXRvcnMvYjMvYjNfY29uZmlnLmdv) | | |
| [propagators/ot/version.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cHJvcGFnYXRvcnMvb3QvdmVyc2lvbi5nbw==) | | |
| [...github.com/aws/aws-lambda-go/otellambda/version.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-aW5zdHJ1bWVudGF0aW9uL2dpdGh1Yi5jb20vYXdzL2F3cy1sYW1iZGEtZ28vb3RlbGxhbWJkYS92ZXJzaW9uLmdv) | | |
| [zpages/version.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-enBhZ2VzL3ZlcnNpb24uZ28=) | | |
| [samplers/aws/xray/fallback\_sampler.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-c2FtcGxlcnMvYXdzL3hyYXkvZmFsbGJhY2tfc2FtcGxlci5nbw==) | | |
| [propagators/aws/xray/propagator.go](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cHJvcGFnYXRvcnMvYXdzL3hyYXkvcHJvcGFnYXRvci5nbw==) | | |
| ... and [126 more](https://codecov.io/gh/open-telemetry/opentelemetry-go-contrib/pull/2178/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | |


Patch:
diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.mod b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.mod
index 0426078e3..921089d95 100644
--- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.mod
+++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.mod
@@ -5,7 +5,7 @@ go 1.13
 replace go.opentelemetry.io/contrib => ../../../../..
 
 require (
-	go.mongodb.org/mongo-driver v1.8.4
+	go.mongodb.org/mongo-driver v1.9.0
 	go.opentelemetry.io/otel v1.6.3
 	go.opentelemetry.io/otel/trace v1.6.3
 )
diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.sum b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.sum
index 758e1bc51..628dada82 100644
--- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.sum
+++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/go.sum
@@ -39,8 +39,8 @@ github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyh
 github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
-go.mongodb.org/mongo-driver v1.8.4 h1:NruvZPPL0PBcRJKmbswoWSrmHeUvzdxA3GCPfD/NEOA=
-go.mongodb.org/mongo-driver v1.8.4/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.9.0 h1:f3aLGJvQmBl8d9S40IL+jEyBC6hfLPbJjv9t5hEM9ck=
+go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
 go.opentelemetry.io/otel v1.6.3 h1:FLOfo8f9JzFVFVyU+MSRJc2HdEAXQgm7pIv2uFKRSZE=
 go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI=
 go.opentelemetry.io/otel/trace v1.6.3 h1:IqN4L+5b0mPNjdXIiZ90Ni4Bl5BRkDQywePLWemd9bc=


Test patch:
diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.mod b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.mod
index 404a0146e..4c19b725c 100644
--- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.mod
+++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.mod
@@ -4,7 +4,7 @@ go 1.16
 
 require (
 	github.com/stretchr/testify v1.7.1
-	go.mongodb.org/mongo-driver v1.8.4
+	go.mongodb.org/mongo-driver v1.9.0
 	go.opentelemetry.io/contrib v1.6.0
 	go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.31.0
 	go.opentelemetry.io/otel v1.6.3
diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.sum b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.sum
index a9d689b20..f0a38993a 100644
--- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.sum
+++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/test/go.sum
@@ -39,8 +39,8 @@ github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyh
 github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM=
 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
-go.mongodb.org/mongo-driver v1.8.4 h1:NruvZPPL0PBcRJKmbswoWSrmHeUvzdxA3GCPfD/NEOA=
-go.mongodb.org/mongo-driver v1.8.4/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
+go.mongodb.org/mongo-driver v1.9.0 h1:f3aLGJvQmBl8d9S40IL+jEyBC6hfLPbJjv9t5hEM9ck=
+go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
 go.opentelemetry.io/otel v1.6.3 h1:FLOfo8f9JzFVFVyU+MSRJc2HdEAXQgm7pIv2uFKRSZE=
 go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI=
 go.opentelemetry.io/otel/sdk v1.6.3 h1:prSHYdwCQOX5DrsEzxowH3nLhoAzEBdZhvrR79scfLs=