Table of Contents

Public namespace Rowles.LeanLucene.Diagnostics

Classes

Public class DefaultMetricsCollector

Lock-free metrics collector using Interlocked operations.

Public class IndexSizeCalculator

Calculates and reports the on-disk size of an index and its segments.

Public class IndexSizeReport

Overall index size report.

Internal classInternal LeanLuceneActivitySource

Shared System.Diagnostics.ActivitySource for LeanLucene instrumentation. Activities are only allocated when a listener is attached — zero overhead otherwise.

Public class MeterMetricsCollector

IMetricsCollector backed by System.Diagnostics.Metrics.Meter. Instruments are published under the meter name Rowles.LeanLucene and can be consumed by any System.Diagnostics.Metrics.MeterListener — including OpenTelemetry OTLP exporters.

Public class MetricsSnapshot

Point-in-time snapshot of operational metrics.

Public class NullMetricsCollector

No-op metrics collector — the default when no metrics are configured.

Public class SearchAnalytics

Thread-safe ring buffer of per-search events. Events are captured in Search(Query, int) when wired via SearchAnalytics.

Public class SearchEvent

A single search event captured by SearchAnalytics.

Public class SegmentSizeReport

Per-segment size breakdown.

Internal classInternal SlowQueryEntry
Public class SlowQueryJsonContext
Public class SlowQueryLog

Logs individual queries that exceed a configurable latency threshold. Output is one JSON object per line (JSON Lines format).

Interfaces

Public interface IMetricsCollector

Interface for collecting operational metrics from IndexSearcher, IndexWriter, and QueryCache.