This first section just ensures that operations will get the right name, specially the ones that are implemented as bulk writes to Mongo.
This first section just ensures that operations will get the right name, specially the ones that are implemented as bulk writes to Mongo. In the cases where we know that the name will not be captured properly we are explicitly adding the operation name to the operation instance so that it can be used when naming the Spans.
These are the actual classes we are instrumenting to track operations.
These are the actual classes we are instrumenting to track operations. Since the same classes are used for both Sync and Async variants (and the Async driver is used for the Reactive Streams and Scala Drivers) we are going for a unified instrumentation that only needs special treatment around the execute/executeAsync methods.