UNPKG

logs-interceptor

Version:

High-performance, production-ready log interceptor for Node.js applications with Loki integration. Built with Clean Architecture principles. Supports Node.js, Browser, and Node-RED.

14 lines 392 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SamplingService = void 0; class SamplingService { shouldSample(rate) { if (rate >= 1.0) return true; if (rate <= 0.0) return false; return Math.random() < rate; } } exports.SamplingService = SamplingService; //# sourceMappingURL=SamplingService.js.map