[rush] Differentiate remote and local execution in telemetry. #4755
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.startTimestampMs
andendTimestampMs
which causes massive spikes in duration collected across your agents, as all but the primary agents report0.05s
and 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.