-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
Context
Describe the background behind the problem.
The Rust driver, and Rust as an ecosystem, handles errors very differently than PyMongo. Stack traces are considered a debugging feature, not a normal part of exception handling. Exception handling in general is frowned upon in Rust: the preferred pattern is to treat errors as either recoverable and return them as a value, or unrecoverable and terminate the process. All of these differences pose challenges for a Python driver that wraps Rust.
Definition of done
What must be done to consider the task complete?
Provide possible solutions to each of the following categories:
- Error handling
- OpenTelemetry
- Logging
- APM
Pitfalls
What should the implementer watch out for? What are the risks?
- All behavior must be configurable through Python. Users cannot interface with Rust at all.
- Parity (or near-parity) with PyMongo is expected.