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

fix mongodb integration not instrumenting correctly #1159

Merged
merged 1 commit into from Nov 19, 2020

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Nov 18, 2020

What does this PR do?

Fix mongodb integration not instrumenting correctly.

Motivation

The mongodb integration had many instrumentation issues:

  • No support for the unified topology introduced since 3.2.
  • Incorrect number of spans for cursors since all calls to next were traced instead of just batches actually retrieved from the Mongo instance.
  • Incorrect resource names for cursor spans since there was previously no way to know the cursor state.
  • Spans were created for commands not actually sent to the instance.
  • Query spans were not analyzed when analytics=true because they were considered cursor spans.

All of these are fixed in a single PR because many of them require completely changing where the module is instrumented.

Fixes #1078 #1021 #1008 #892 #719

@rochdev rochdev added bug Something isn't working integrations labels Nov 18, 2020
@rochdev rochdev added this to the 0.29.0 milestone Nov 18, 2020
@rochdev rochdev requested a review from a team as a code owner November 18, 2020 19:29
@rochdev rochdev merged commit c0b6d76 into master Nov 19, 2020
@rochdev rochdev deleted the fix-mongo-unified-topology branch November 19, 2020 14:20
Czechh added a commit that referenced this pull request Dec 1, 2020
…rada/add-trace-to-lambda-invoke

* 'master' of github.com:DataDog/dd-trace-js:
  fix graphql plugin error when using sampling (#1164)
  v0.29.0 (#1160)
  fix mongodb integration not instrumenting correctly (#1159)
  clean up test scripts (#1158)
  fix consumer span not waiting for message ack before finishing (#1152)
  provide a way to know when flush is finished (#1154)
  add experimental option to mark internal spans on errors (#1153)
  Remove only from it, probably left in by accident (#1149)
  add support for @grpc/grpc-js (#1147)
  remove idle call frame samples from profiles (#1143)
  fix socket connect callback not running in parent scope (#1142)
  add a fast path in toArray for length-8 IDs (#1138)
  Fix GraphQL span finishTime calculation (#1139)
  v0.28.0 (#1137)
  skip browser test for setUrl (#1135)
  fix ingestion rate limiter drifting on interval change (#1132)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mongo/DocDB Insert, update and admin commands not recorded with useUnifiedTopology: true
2 participants