opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Add `go.mongodb.org/mongo-driver/v2` specific instrumentation

Open MrAlias opened this issue 11 months ago • 5 comments

v2 specific instrumentation needs to be added in addition. Support for v1 needs to continue.

Originally posted by @MrAlias in https://github.com/open-telemetry/opentelemetry-go-contrib/issues/6418#issuecomment-2532600175

MrAlias avatar Dec 10 '24 18:12 MrAlias

Currently the Mongo DB instrumentation has no owner. The new owner needs to assume this task or we should close this along with https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5551 if we do not land on ownership.

MrAlias avatar Dec 10 '24 18:12 MrAlias

cc @prestonvasquez

MrAlias avatar Dec 10 '24 18:12 MrAlias

I did a copy/paste implementation using the new mongo-driver/v2 library: https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6539

I chose the folder structure to match the golang package name.

AlaricWhitney avatar Dec 28 '24 17:12 AlaricWhitney

@MrAlias I would be happy to help review #6539.

prestonvasquez avatar Dec 30 '24 23:12 prestonvasquez

I would be happy to help review

Feel free to do so, as that's definitely a good way forward being code owner :)

dmathieu avatar Jan 06 '25 09:01 dmathieu

I can see that #6539 is merged and Release notes for v1.36.0 mentions that "Add instrumentation support for go.mongodb.org/mongo-driver/v2" but I dont see a release version of this package.

go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo is listed under excluded-modules in versions.yaml cc @prestonvasquez @dmathieu

nimesh-madhavan avatar Jun 26 '25 12:06 nimesh-madhavan

If you look at the PR merging the new instrumentation, we decided not to ship it for now. That doesn't prevent using it. You can use commit hashes as a go module version.

dmathieu avatar Jun 27 '25 06:06 dmathieu

This was shipped in https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation/go.mongodb.org/mongo-driver/v2/mongo/otelmongo

dmathieu avatar Nov 28 '25 12:11 dmathieu