def METHOD_NAME(self, event):
    # type: (CommandStartedEvent) -> None
    hub = Hub.current
    if hub.get_integration(PyMongoIntegration) is None:
        return
    with capture_internal_exceptions():
        command = dict(copy.deepcopy(event.command))
        command.pop("$db", None)
        command.pop("$clusterTime", None)
        command.pop("$signature", None)
        op = "db.query"
        tags = {
            "db.name": event.database_name,
            SPANDATA.DB_SYSTEM: "mongodb",
            SPANDATA.DB_OPERATION: event.command_name,
        }
        try:
            tags["net.peer.name"] = event.connection_id[0]
            tags["net.peer.port"] = str(event.connection_id[1])
        except TypeError:
            pass
        data = {"operation_ids": {}}  # type: Dict[str, Any]
        data["operation_ids"]["operation"] = event.operation_id
        data["operation_ids"]["request"] = event.request_id
        data.update(_get_db_data(event))
        try:
            lsid = command.pop("lsid")["id"]
            data["operation_ids"]["session"] = str(lsid)
        except KeyError:
            pass
        if not _should_send_default_pii():
            command = _strip_pii(command)
        query = "{} {}".format(event.command_name, command)
        span = hub.start_span(op=op, description=query)
        for tag, value in tags.items():
            span.set_tag(tag, value)
        for key, value in data.items():
            span.set_data(key, value)
        with capture_internal_exceptions():
            hub.add_breadcrumb(message=query, category="query", type=op, data=tags)
        self._ongoing_operations[self._operation_key(event)] = span.__enter__()