Class PipelineTelemetryCollector
- Namespace
- DotCompute.Core.Telemetry
- Assembly
- DotCompute.Core.dll
High-performance pipeline telemetry collector with lock-free operations and minimal overhead. Provides comprehensive metrics collection for pipeline execution analysis and optimization.
public sealed class PipelineTelemetryCollector : IDisposable
- Inheritance
-
PipelineTelemetryCollector
- Implements
- Inherited Members
- Extension Methods
Constructors
PipelineTelemetryCollector(ILogger<PipelineTelemetryCollector>, IOptions<PipelineTelemetryOptions>)
Initializes a new instance of the PipelineTelemetryCollector.
public PipelineTelemetryCollector(ILogger<PipelineTelemetryCollector> logger, IOptions<PipelineTelemetryOptions> options)
Parameters
loggerILogger<PipelineTelemetryCollector>optionsIOptions<PipelineTelemetryOptions>
Methods
CompletePipelineExecution(PipelineExecutionContext, bool, long, Exception?)
Records the completion of a pipeline execution with performance metrics.
public void CompletePipelineExecution(PipelineExecutionContext context, bool success, long itemsProcessed = 0, Exception? exception = null)
Parameters
contextPipelineExecutionContextsuccessboolitemsProcessedlongexceptionException
Dispose()
Performs dispose.
public void Dispose()
ExportMetricsAsync(MetricsExportFormat, CancellationToken)
Exports metrics in the specified format with optimal performance.
public Task<string> ExportMetricsAsync(MetricsExportFormat format, CancellationToken cancellationToken = default)
Parameters
formatMetricsExportFormatcancellationTokenCancellationToken
Returns
GetAllPipelineMetrics()
Gets all pipeline metrics snapshots.
public IReadOnlyDictionary<string, PipelineMetricsSnapshot> GetAllPipelineMetrics()
Returns
GetPipelineMetrics(string)
Gets comprehensive pipeline metrics for a specific pipeline.
public PipelineMetricsSnapshot? GetPipelineMetrics(string pipelineId)
Parameters
pipelineIdstring
Returns
RecordCacheAccess(string, bool)
Records cache access with lock-free operation.
public void RecordCacheAccess(string pipelineId, bool hit)
Parameters
RecordStageExecution(string, string, TimeSpan, bool, long)
Records stage execution with minimal performance impact.
public void RecordStageExecution(string pipelineId, string stageId, TimeSpan duration, bool success, long memoryUsed = 0)
Parameters
StartPipelineExecution(string, string?)
Records the start of a pipeline execution with minimal overhead.
public PipelineExecutionContext StartPipelineExecution(string pipelineId, string? correlationId = null)