The current mongo plugin instruments the low level driver to determine the operation type.
I think there's probably 2 ways to go about this:
- in the instrumentation library use a best-effort analysis of the cmd array size to determine if the query is bulkWrite
- wrap the
bulkWrite function in the higher level interface of the driver and generate a span for it, or pass down the details to the instrumentation plugin to use when generating the resource name
Delineating bulkWrite from the underlying operations is interesting because it provides an indicator to anyone looking at spans that this span may be driving heavier database IOPS, and currently bulkWrites masquerade as flat update, delete, insert type resources.
The current mongo plugin instruments the low level driver to determine the operation type.
I think there's probably 2 ways to go about this:
bulkWritefunction in the higher level interface of the driver and generate a span for it, or pass down the details to the instrumentation plugin to use when generating the resource nameDelineating
bulkWritefrom the underlying operations is interesting because it provides an indicator to anyone looking at spans that this span may be driving heavier database IOPS, and currentlybulkWritesmasquerade as flatupdate,delete,inserttype resources.