Table of Contents

Collect Sync

collect-sync is an analyst workstation tool. It saves analysts from manually finding and downloading the trace files assigned to them, and it archives the files for traces that are closed.

What it does

The CLI runs two phases in a loop:

stateDiagram-v2
  [*] --> Login
  Login --> Download
  Download --> Delete
  Delete --> Wait: Wait for the next download phase
  Wait --> Download

Download phase

  1. Authenticate with the analyst's username and password.
  2. Pull the list of trace files that are Assigned but not yet Downloaded from TracesController.DownloadQueue.
  3. Download the artifacts to the configured folder structure.
  4. Submit the downloaded trace-file ids to TracesController.SetDownloadStatus so the portal records the new status.

Delete phase

  1. Identify the trace files that are Closed or ClosedDuplicate.
  2. Delete them from the local disk and archive them in Blob Storage.
  3. Submit the ids to TracesController.SetClosedStatus.

The full state machine is in the generated trace file lifecycle, and the sequence is in the generated Collect Sync workflow.

Inputs

Input Meaning
Username The analyst's portal username.
Password The analyst's portal password.
Folder The local root folder. Supports a template.

If an input is omitted on the command line, the tool prompts for it.

Folder template

A template such as:

C:\ETL files\[Customer]\[Application]\[BlobWeek]\[Environment]-[Machine]-[Filename]

produces a tree like:

[User's trace folder]
  [Customer]
    [Application]
      [BlobWeek]
        [Environment]-[Machine]-[Filename].etl
        [Environment]-[Machine]-[Filename].netperf.zip
        [Environment]-[Machine]-[Filename].diagsession
        [Environment]-[Machine]-[Filename].dmp

[Filename] includes the original extension. Keep enough free disk space for the largest trace or dump you expect to download.

Security

  • Use a dedicated analyst account, not a shared login.
  • The CLI downloads through time-limited SAS URLs; do not copy those URLs into tickets or chat.
  • Treat downloaded dumps and traces as sensitive production data. They can contain customer payloads, connection strings and personal data.
  • Delete local files after the delete phase archives them.

Troubleshooting

Symptom Check
No files are downloaded The analyst has no Assigned traces, or the queue endpoint returned an empty page.
Download fails The SAS URL expired or the analyst lacks access to the customer's artifacts.
Status does not advance SetDownloadStatus or SetClosedStatus failed; check the API response and the analyst's role.
Disk fills up Reduce the local retention window or run the delete phase more often.