Add better step telemetry and tracing for composite Actions (#1229)

* Add Step Telemetry

* better telemetry and tracing

* cleanup
This commit is contained in:
Thomas Boop
2021-07-30 10:45:49 -04:00
committed by GitHub
parent 4e95d0d6ad
commit 92ec3d0f29
9 changed files with 192 additions and 30 deletions

View File

@@ -69,6 +69,19 @@ namespace GitHub.Runner.Worker.Handlers
target = Data.Post;
}
// Add Telemetry to JobContext to send with JobCompleteMessage
if (stage == ActionRunStage.Main)
{
var telemetry = new ActionsStepTelemetry {
Ref = GetActionRef(),
HasPreStep = Data.HasPre,
HasPostStep = Data.HasPost,
IsEmbedded = ExecutionContext.IsEmbedded,
Type = "node12"
};
ExecutionContext.Root.ActionsStepsTelemetry.Add(telemetry);
}
ArgUtil.NotNullOrEmpty(target, nameof(target));
target = Path.Combine(ActionDirectory, target);
ArgUtil.File(target, nameof(target));