rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] Differentiate remote and local execution in telemetry.

Open aramissennyeydd opened this issue 1 year ago • 0 comments

Summary

Fixes #4737. My goal is to address data skew questions before we go ahead with #4680 which just adjusts the data skew.

Details

There is no great way currently to determine if telemetry for an operation was generated from the current machine or a remote machine. This is likely to cause data skew depending on how you ingest the Rush telemetry, either

  1. You restore duration from nonCachedDurationMs, which causes multiple events with the same duration (+/- a few milliseconds) if you emit events from each cobuild agent. That messes with averages and whatnot when aggregating your data.
  2. You calculate duration from startTimestampMs and endTimestampMs which causes massive spikes in duration collected across your agents, as all but the primary agents report 0.05s and the primary agent reports 15.00s. That also messes with averages and whatnot during aggregation.

I propose a new wasExecutedOnThisMachine flag that monorepo maintainers can then use in their plugins to decide whether or not they want to process the given operation's data.

How it was tested

Tested in this repository, using the sharded-repo sandbox.

Impacted documentation

Anything where Rush describes writing your own telemetry plugin.

aramissennyeydd avatar May 30 '24 21:05 aramissennyeydd