The aim is to provide a library that allows adding tracepoints to mongo servers. The primary intent for these tracepoints is to collect timing information (e.g., using ServiceContext::getFastClockSource) for an ongoing operation. The tracepoints must compile to a noop by default, unless requested otherwise at compile time.
The following is a possible/suggested API design for the tracepoints.
When enabled, the tracepoint must collect the timestamp at construction and at each checkpoint, and log the timestamps when the lifetime of the tracepoint object exceeds a threshold.
For example, if running runOperationA and runOperationB takes more than 100 milliseconds, we expect to see a line similar to the following in mongo logs:
- For the first pass, someone will do a POC timeboxed at 2 story points to answer some of the open questions