Skip to main content

Variable: pdsMetrics

const pdsMetrics: object

Defined in: src/observability/prometheus-registry.ts:314

Pre-defined metrics for PDS scanning and backfilling.

Type declaration​

pdsesDiscovered​

pdsesDiscovered: Gauge<string>

PDSes discovered gauge.

Remarks​

Total number of PDSes known to the system.

Example​

pdsMetrics.pdsesDiscovered.set(count);

pdsesWithRecords​

pdsesWithRecords: Gauge<string>

PDSes with Chive records gauge.

Remarks​

Number of PDSes that have pub.chive.* records.

Example​

pdsMetrics.pdsesWithRecords.set(count);

recordIndexDuration​

recordIndexDuration: Histogram<"status" | "collection">

Record indexing duration histogram.

Remarks​

Labels: collection, status

Example​

const end = pdsMetrics.recordIndexDuration.startTimer({ collection: 'pub.chive.eprint.submission' });
// ... index record ...
end({ status: 'success' });

recordsIndexed​

recordsIndexed: Counter<"status" | "collection">

Total records indexed counter.

Remarks​

Labels: collection, status (success/error)

Example​

pdsMetrics.recordsIndexed.inc({ collection: 'pub.chive.eprint.submission', status: 'success' });

recordsScanned​

recordsScanned: Counter<"collection">

Total records scanned counter.

Remarks​

Labels: collection (pub.chive.eprint.submission, etc.)

Example​

pdsMetrics.recordsScanned.inc({ collection: 'pub.chive.eprint.submission' });

scanDuration​

scanDuration: Histogram<"status">

PDS scan duration histogram.

Remarks​

Labels: status (success/error)

Example​

const end = pdsMetrics.scanDuration.startTimer();
// ... scan PDS ...
end({ status: 'success' });

scansTotal​

scansTotal: Counter<"status">

Total PDS scans counter.

Remarks​

Labels: status (success/error/skipped)

Example​

pdsMetrics.scansTotal.inc({ status: 'success' });

Remarks​

Tracks PDS discovery, scanning, and record indexing operations.