Skip to content
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

feat(instrumentation-mongodb): add support for mongodb v6 #1760

Merged

Conversation

david-luna
Copy link
Contributor

@david-luna david-luna commented Oct 30, 2023

Which problem is this PR solving?

  • This PR adds support for instrumentation of mongodb v6.

Short description of the changes

  • add 6.* in the necessary instrumentation modules
  • update npm scripts
  • update .tav.yml to add 6.x verisons
  • update CHANGELOG.md
  • update README.md

Closes: #1666

@david-luna david-luna requested a review from a team October 30, 2023 15:01
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #1760 (6ae7848) into main (f74bcc2) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1760   +/-   ##
=======================================
  Coverage   91.50%   91.50%           
=======================================
  Files         144      144           
  Lines        7369     7369           
  Branches     1467     1467           
=======================================
  Hits         6743     6743           
  Misses        626      626           
Files Coverage Δ
...try-instrumentation-mongodb/src/instrumentation.ts 52.85% <ø> (ø)

Comment on lines 3 to 8
## Unreleased

### Features

* **mongodb:** support v6 ([#1666](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1666))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog is automatically updated by the release automation. There is no need to do it here. It comes from the PR title.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed :)

@pichlermarc pichlermarc changed the title feat: add support for mongodb v6 feat(instrumentation-mongodb): add support for mongodb v6 Nov 14, 2023
@david-luna david-luna requested a review from dyladan November 15, 2023 09:45
@SeanReece
Copy link

Thanks @david-luna for taking this on. This is a big issue for us as our tracing is virtually useless without mongo spans and we're not about to downgrade to mongo v5.

Just pinging @osherv here as well as they seem to be the owner on this component.

@david-luna
Copy link
Contributor Author

@dyladan did a review. Maybe he could give the approval as well

@david-luna
Copy link
Contributor Author

There's a version that uses ??= assignment which is not supported in node v14. Nee to filter out specific versions of mongodb@6 to not run in not supported versions of node.

https://node.green/#ES2021-features-Logical-Assignment-----basic-support

@opentelemetry/instrumentation-mongodb: /home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-mongodb/node_modules/mongodb/node_modules/bson/lib/bson.cjs:479
@opentelemetry/instrumentation-mongodb:         inspect ??= defaultInspect;
@opentelemetry/instrumentation-mongodb:                 ^^^
@opentelemetry/instrumentation-mongodb: SyntaxError: Unexpected token '??='
@opentelemetry/instrumentation-mongodb:     at wrapSafe (internal/modules/cjs/loader.js:1029:16)
@opentelemetry/instrumentation-mongodb:     at Module._compile (internal/modules/cjs/loader.js:1078:27)
@opentelemetry/instrumentation-mongodb:     at Module.replacementCompile (/home/runner/work/opentelemetry-js-contrib/opentelemetry-js-contrib/node_modules/append-transform/index.js:60:13)

@SeanReece
Copy link

@dyladan If you could take another look that would great 🙏 We're really looking forward to this change.

@david-luna david-luna deleted the dluna/1666-feat-instrument-mongodb-v6 branch December 14, 2023 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support mongodb v6
4 participants