[GODRIVER-2938] Move ownership of otelmongo Created: 09/Aug/23  Updated: 09/Jan/24

Status: Investigating
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Unknown
Reporter: Robert Pająk Assignee: Ashni Mehta
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to DRIVERS-719 Client Side Support for OpenTelemetry Defining Requirements
Quarter: FY24Q4
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Hello 👋 I am one of OpenTelemetry Go maintainers (https://github.com/pellared).

I started working on https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4163 and I think that it may be more beneficial for the community if the ownership of OpenTelemetry instrumentation would be moved under MongoDB.

The reasons are the following:

  1. This is currently a more preferred way according to our recommendation
  2. OTel maintainers and approvers have no capacity on maintaining otelmongo instrumentation library which seems to be quite popular. More: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/2834

Therefore, I am asking you could consider doing e.g. one of the following:

  1. Instrumenting with OpenTelemetry "natively" (without requiring the users to use an instrumentation library)
  2. Simply moving the otelmongo instrumentation library to https://github.com/mongodb/mongo-go-driver repository or to a new repository in https://github.com/mongodb organization.

You can look at following resources for further insight:

I would like to collaborate and together come up with a plan that could be well received by the users of both https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo and https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo.



 Comments   
Comment by Robert Pająk [ 09/Oct/23 ]

A few remarks regarding the maintenance effort.

1. Bumping dependencies (low effort, automated via dependabot)
2. Bumping the semantic conventions a new version of https://github.com/open-telemetry/semantic-conventions published and is available via https://github.com/open-telemetry/opentelemetry-go. So far most of the changes were almost effortless (just bumping the semconv version, sometimes some attributes are renamed or added. It is usually low effort (a few hours of work). However this may change thanks to newly established "database semantic conventions working group". It may occur that they may be more breaking changes in the semantic conventions. More: https://github.com/open-telemetry/semantic-conventions/issues/299
3. So far we had almost no issues for the instrumentation library. See: https://github.com/open-telemetry/opentelemetry-go-contrib/issues?q=is%3Aopen+is%3Aissue+otelmongo+label%3A%22instrumentation%3A+otelmongo%22. There were a few which were created in the past but most of them were closed without any code changes. See: https://github.com/open-telemetry/opentelemetry-go-contrib/issues?q=is%3Aissue+otelmongo+is%3Aclosed
4. I think that right now the biggest missing feature is the lack of metrics instrumentation defined here: https://opentelemetry.io/docs/specs/semconv/database/database-metrics/. And this is also something that probably would be guided/designed together with the Go Mongo Driver team.

Comment by Robert Pająk [ 09/Oct/23 ]

A few notes from my side after the meeting.

I propose to also look at https://github.com/IBM/sarama/issues/2510. It is a similar issue for another library, and it already explores some ideas around the migration.
We concluded that the safest and most pragmatic option would be migrate the Go module to a new repository e.g. to https://github.com/mongodb/otelmongo (reasoning here: https://github.com/IBM/sarama/issues/2510#issuecomment-1715056491).

I offer knowledge sharing and help in maintenance (e.g. I can be a reviewer).

For reference (part of knowledge sharing) here are some popular instrumentation libraries for database/sql package:

Unfortunately the OTel Go SIG had no consensus so far on the database/sql instrumentation design so people use these 3 libraries.

Comment by PM Bot [ 09/Aug/23 ]

Hi pellared@hotmail.com, thank you for reporting this issue! The team will look into it and get back to you soon.

Generated at Thu Feb 08 08:39:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.