rushstack
rushstack copied to clipboard
[rush] Differentiate remote and local execution in telemetry.
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
- 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. - You calculate duration from
startTimestampMsandendTimestampMswhich causes massive spikes in duration collected across your agents, as all but the primary agents report0.05sand the primary agent reports15.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.