UNPKG

@ogcio/o11y-sdk-node

Version:

Opentelemetry standard instrumentation SDK for NodeJS based project

19 lines (18 loc) 591 B
import { getMetric } from "../metrics.js"; // Cached singleton instance of the redaction counter metric let _redactedCounter; /** * Returns a singleton OpenTelemetry counter metric used to record occurrences of PII redactions. * * @returns {Counter} The singleton OpenTelemetry counter metric for PII redactions. */ export function _getPIICounterRedactionMetric() { if (_redactedCounter) { return _redactedCounter; } _redactedCounter = getMetric("counter", { meterName: "o11y", metricName: "o11y_pii_redaction", }); return _redactedCounter; }