-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Command Logging and Monitoring
At the time of writing, our CommandStartedEvent, CommandFailedEvent and CommandSucceededEvent classes make use of our deepCopy helper function. This helper throws type errors when passed in documents with a constructor key that doesn't have a name field. In addition, when passed in a document with a __proto__ key it will set the object's prototype to the value of that key. This limits the capabilities of our Command Monitoring functionality.
Use Case
As a... driver engineer
I want... _Command Monitoring Events to handle objects with constructor and __proto__ keys
So that...the driver doesn't crash when command monitoring is enabled
User Impact
- At least one customer (HELP-48067)
Dependencies
- N/A
Unknowns
- Should we eliminate deepCopy entirely?
Acceptance Criteria
Implementation Requirements
- Refactor the aforementioned Command Monitoring events to be able to handle commands/documents with constructor and __proto__ keys
Testing Requirements
- Unit tests for the constructors of each command monitoring event to ensure that they do not throw an error when passed in documents with constructor and __proto__ keys
Documentation Requirements
- Release note about change in behaviour of Command Monitoring Event constructors
Follow Up Requirements
- additional tickets to file, required releases, etc
- related to
-
NODE-5318 Investigate improvements or removal of command monitoring object cloning
- Backlog