Add some potentially sensitive metadata -- this may include PII, but unnecessary data should never be tracked (this is a good fit for command args for instance).
Get a snapshot of the tracked public data.
Get a snapshot of the tracked sensitive data.
Run a function, monitoring how long it takes, and adding the elapsed time to a running total.
Add some public metadata -- this should not contain any PII.