-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[instrumentation-mongodb] test failing for [email protected]
#1983
Comments
cc @david-luna might be of interest for you as I seem to remember you working on this instrumentation before 🙂 |
Yah, I was poking David as well ;) - checkOut(callback: Callback<Connection>): void {
+ async checkOut(): Promise<Connection> { This breaks this patch in instr-mongodb/src/instrumentation.ts // This patch will become unnecessary once
// https://jira.mongodb.org/browse/NODE-5639 is done.
private _getV4ConnectionPoolCheckOut() {
return (original: V4ConnectionPool['checkOut']) => {
return function patchedCheckout(this: unknown, callback: any) {
const patchedCallback = context.bind(context.active(), callback);
return original.call(this, patchedCallback);
};
};
} |
Thanks for the heads up :) I'm going to work on it today |
Some issues here:
|
The new version of mongodb `v6.4.0` comes with some internal changes that break the instrumentation. Details of the changes are described in #1983 (comment) Closes: #1983
Description:
[email protected]
released with a refactor that changed how the internalConnection.command()
works, so no spans are generated and test fail.In the instrumentation, we heavily rely on
command
, seeopentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-mongodb/src/instrumentation.ts
Lines 495 to 506 in 2e9fce4
Since the signature changed we return
original.call()
instead of instrumenting.resultHandler
isundefined
and therefore not a function. also the other args have changed, see below. Right now I think this is not causing problems in end-user apps but if it is, we should temporarily disable[email protected]
instrumentation until a fix is ready.Resources:
connection.ts
at[email protected]
- worksconnection.ts
at[email protected]
- failsSee failing test on
main
18.18.2
onmain
after seeing failures in chore(deps): update deps matching "@opentelemetry/*" #1978The text was updated successfully, but these errors were encountered: