Table of Contents

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

logger ILogger<PipelineTelemetryCollector>
options IOptions<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

context PipelineExecutionContext
success bool
itemsProcessed long
exception Exception

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

format MetricsExportFormat
cancellationToken CancellationToken

Returns

Task<string>

GetAllPipelineMetrics()

Gets all pipeline metrics snapshots.

public IReadOnlyDictionary<string, PipelineMetricsSnapshot> GetAllPipelineMetrics()

Returns

IReadOnlyDictionary<string, PipelineMetricsSnapshot>

GetPipelineMetrics(string)

Gets comprehensive pipeline metrics for a specific pipeline.

public PipelineMetricsSnapshot? GetPipelineMetrics(string pipelineId)

Parameters

pipelineId string

Returns

PipelineMetricsSnapshot

RecordCacheAccess(string, bool)

Records cache access with lock-free operation.

public void RecordCacheAccess(string pipelineId, bool hit)

Parameters

pipelineId string
hit bool

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

pipelineId string
stageId string
duration TimeSpan
success bool
memoryUsed long

StartPipelineExecution(string, string?)

Records the start of a pipeline execution with minimal overhead.

public PipelineExecutionContext StartPipelineExecution(string pipelineId, string? correlationId = null)

Parameters

pipelineId string
correlationId string

Returns

PipelineExecutionContext