Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21241

Record timestamp in root of sample document

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.2.0-rc3
    • Affects Version/s: None
    • Component/s: Diagnostics
    • Labels:
    • Minor Change
    • Platform C (11/20/15)

      Currently timestamps are recorded in a few places (_id for chunk, start/end for each data source). However for certain kinds of filtering operations it is useful to have a guaranteed reliable place to find a timestamp for each sample. Currently the closest is serverStatus.start (or serverStatus.localTime), but that is potentially fragile in that it is tied to a particular data source (serverStatus), and as we expand the range of data sources (collections, system stats, etc.) we will want to make some data sources optional, and for consistency we may wish to make every data source optional.

      A more robust and future-proof design would be to have a "start" (and possibly "end") timestamp for each sample at the root of the sample document, independent of any particular data source. If we do this now, the tooling could be made more future proof by using that as the timing source for the sample rather than relying on timestamps in serverStatus. Ideally the _id for the chunk would be the same as the start field of the first sample (although this is not a requirement).

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: