Skip to content

Properly name bulkWrite operations in the mongo plugin #4073

Description

@vanstinator

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions