Class UnityInitializationPipelineDebugTelemetry
Debug telemetry implementation for initialization pipeline that logs detailed progress and status information.
Provides comprehensive logging of pipeline events including start, progress, task completion, failures, and final completion status.
Implements
Inherited Members
Namespace: Serenity.InitializationPipeline.InterfaceAdapters
Assembly: Serenity.UnityInitializationPipeline.InterfaceAdapters.dll
Syntax
public class UnityInitializationPipelineDebugTelemetry : IInitializationPipelineTelemetry
Constructors
UnityInitializationPipelineDebugTelemetry(ILogService)
Initializes a new instance of UnityInitializationPipelineDebugTelemetry with the specified log service.
The log service will be used to output all telemetry information during pipeline execution.
Declaration
public UnityInitializationPipelineDebugTelemetry(ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogService | logService | Service used for logging pipeline telemetry events |
Methods
OnCompleted(TimeSpan, bool)
Called when the entire initialization pipeline completes execution.
Logs the total execution time and success status as an informational summary message.
Declaration
public void OnCompleted(TimeSpan total, bool success)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | total | Total time taken to execute the entire pipeline |
| bool | success | Whether the pipeline completed successfully without critical failures |
OnProgress(string, float)
Called to report progress updates for individual tasks during execution.
Logs the task ID and percentage completion as an informational message.
Declaration
public void OnProgress(string taskId, float p01)
Parameters
| Type | Name | Description |
|---|---|---|
| string | taskId | Unique identifier of the task reporting progress |
| float | p01 | Progress value from 0.0 to 1.0 representing completion percentage |
OnStarted(IEnumerable<InitializationPipelineStep>)
Called when the initialization pipeline starts execution.
Logs an informational message indicating the pipeline has begun processing.
Declaration
public void OnStarted(IEnumerable<InitializationPipelineStep> plan)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<InitializationPipelineStep> | plan | Collection of initialization steps that will be executed |
OnTaskCompleted(string, TimeSpan)
Called when an individual task completes successfully.
Logs the task ID and execution time as an informational message with a checkmark symbol.
Declaration
public void OnTaskCompleted(string taskId, TimeSpan elapsed)
Parameters
| Type | Name | Description |
|---|---|---|
| string | taskId | Unique identifier of the completed task |
| TimeSpan | elapsed | Time taken to execute the task |
OnTaskFailed(string, Exception, bool)
Called when a task fails during execution.
Logs both an error message with failure details and the complete exception information.
Declaration
public void OnTaskFailed(string taskId, Exception ex, bool isCritical)
Parameters
| Type | Name | Description |
|---|---|---|
| string | taskId | Unique identifier of the failed task |
| Exception | ex | Exception that caused the task failure |
| bool | isCritical | Whether the failure is critical to overall pipeline success |