Table of Contents

Class ElasticsearchMetrics.ElasticsearchOperationContext

Namespace
Excalibur.Data.ElasticSearch.Monitoring
Assembly
Excalibur.Data.ElasticSearch.dll

Represents the context of an Elasticsearch operation for metrics tracking.

public sealed class ElasticsearchMetrics.ElasticsearchOperationContext : IDisposable
Inheritance
ElasticsearchMetrics.ElasticsearchOperationContext
Implements
Inherited Members

Remarks

Nested type is intentionally public as it is returned from StartOperation() method and part of the metrics API surface.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

RecordFailure(string, long?)

Records the completion of the operation with failure.

public void RecordFailure(string errorType, long? documentCount = null)

Parameters

errorType string

The type of error that occurred.

documentCount long?

The number of documents processed before failure (for bulk operations).

RecordSuccess(long?)

Records the completion of the operation with success.

public void RecordSuccess(long? documentCount = null)

Parameters

documentCount long?

The number of documents processed (for bulk operations).