Sending telemetry about actions usage. (#1688)

* Sending telemetry about actions usage.

* .

* L0 tests.

* .
This commit is contained in:
Tingluo Huang
2022-02-16 12:18:21 -05:00
committed by GitHub
parent f2578529b0
commit 882f36dcf8
13 changed files with 476 additions and 73 deletions

View File

@@ -67,7 +67,7 @@ namespace GitHub.Runner.Worker.Handlers
steps = Data.Steps;
}
// Add Telemetry to JobContext to send with JobCompleteMessage
// Set extra telemetry base on the current context.
if (stage == ActionRunStage.Main)
{
var hasRunsStep = false;
@@ -84,15 +84,14 @@ namespace GitHub.Runner.Worker.Handlers
}
}
ExecutionContext.StepTelemetry.Ref = GetActionRef();
ExecutionContext.StepTelemetry.HasPreStep = Data.HasPre;
ExecutionContext.StepTelemetry.HasPostStep = Data.HasPost;
ExecutionContext.StepTelemetry.IsEmbedded = ExecutionContext.IsEmbedded;
ExecutionContext.StepTelemetry.Type = "composite";
ExecutionContext.StepTelemetry.HasRunsStep = hasRunsStep;
ExecutionContext.StepTelemetry.HasUsesStep = hasUsesStep;
ExecutionContext.StepTelemetry.StepCount = steps.Count;
}
ExecutionContext.StepTelemetry.Type = "composite";
try
{