mirror of
https://github.com/actions/runner.git
synced 2025-12-11 04:46:58 +00:00
Generic telemetry (#1321)
* Add generateIdTokenUrl as an env var * Add generateIdTokenUrl to env vars * Add basic telemetry class and submit it on jobcompleted * Use constructor overload * Rename telemetry to jobTelemetry * Rename telemetry file * Make JobTelemetryType a string * Collect telemetry * Remove debugger * Update src/Runner.Worker/ActionCommandManager.cs Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * Use same JobTelemetry for all contexts * Mask telemetry data * Mask in JobRunner instead * Empty line * Change method signature Returning with a List suggests we clone it and that the original doesn't change.. * Update launch.json Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com>
This commit is contained in:
@@ -52,6 +52,7 @@ namespace GitHub.Runner.Worker
|
||||
Dictionary<string, VariableValue> JobOutputs { get; }
|
||||
ActionsEnvironmentReference ActionsEnvironment { get; }
|
||||
List<ActionsStepTelemetry> ActionsStepsTelemetry { get; }
|
||||
List<JobTelemetry> JobTelemetry { get; }
|
||||
DictionaryContextData ExpressionValues { get; }
|
||||
IList<IFunctionInfo> ExpressionFunctions { get; }
|
||||
JobContext JobContext { get; }
|
||||
@@ -150,6 +151,7 @@ namespace GitHub.Runner.Worker
|
||||
|
||||
public ActionsEnvironmentReference ActionsEnvironment { get; private set; }
|
||||
public List<ActionsStepTelemetry> ActionsStepsTelemetry { get; private set; }
|
||||
public List<JobTelemetry> JobTelemetry { get; private set; }
|
||||
public DictionaryContextData ExpressionValues { get; } = new DictionaryContextData();
|
||||
public IList<IFunctionInfo> ExpressionFunctions { get; } = new List<IFunctionInfo>();
|
||||
|
||||
@@ -294,6 +296,7 @@ namespace GitHub.Runner.Worker
|
||||
child.ContextName = contextName;
|
||||
child.EmbeddedId = embeddedId;
|
||||
child.SiblingScopeName = siblingScopeName;
|
||||
child.JobTelemetry = JobTelemetry;
|
||||
if (intraActionState == null)
|
||||
{
|
||||
child.IntraActionState = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
@@ -650,6 +653,8 @@ namespace GitHub.Runner.Worker
|
||||
// ActionsStepTelemetry
|
||||
ActionsStepsTelemetry = new List<ActionsStepTelemetry>();
|
||||
|
||||
JobTelemetry = new List<JobTelemetry>();
|
||||
|
||||
// Service container info
|
||||
Global.ServiceContainers = new List<ContainerInfo>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user