import once from 'lodash.once' ; import * as Prometheus from 'prom-client' ; import { skipMetricsInEnvironment } from '../environment' ; const defaultRegister = Prometheus . register ; interface TClientOptions extends Prometheus . DefaultMetricsCollectorConfiguration { detectKubernetes ? : boolean ; } const configure = once ( ( options ) => { const shouldSkipMetricsInEnvironment = skipMetricsInEnvironment ( options ) ; if ( ! shouldSkipMetricsInEnvironment ) { Prometheus . collectDefaultMetrics ( options ) ; } } ) ; export { Prometheus , defaultRegister , configure } ;