Prevent mongodb instrumentation from applying to async/reactive clients #476
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
mongodb-3.0
,mongodb-3.1
, andmongodb-3.7
instrumentation modules could incorrectly apply to the async/reactive mongo drivers which they are not intended to do. This can cause issues such as segment timeouts and incorrect metrics due to asynchronous behavior that the instrumentation isn't intended to handle.This is a followup to #341
This change means that some customers will lose visibility into mongodb calls where the async/reactive mongo drivers were being erroneously instrumented.
It also resolves an issue where both the
mongodb-3.1
andmongodb-3.7
could apply.Issue #198 is intended to add instrumentation for the async/reactive mongo drivers.
Tested with an app that was using a few different versions of the reactive client:
mongodb-driver-reactivestreams:1.12.0
withmongodb-driver-core:3.11.2
mongodb-driver-reactivestreams:4.2.3
withmongodb-driver-core:4.2.3
As expected none of the mongodb instrumentation modules loaded:
Tested with an app that was using the sync client:
mongodb-driver-sync:4.1.1
withmongodb-driver-core:4.1.1
As expected, only the
mongodb-3.7
instrumentation loaded:Tested with an app that was using the sync client:
mongodb-driver-sync:3.6.3
withmongodb-driver-core:3.6.3
As expected, only the
mongodb-3.1
instrumentation loaded:AITs pass: https://javaagent-build.pdx.vm.datanerd.us/job/AIT_Configurable/127/
Instrumentation tests pass for all three modified instrumentation modules.