import { Proxiable } from './domain' ; import { MetricsConstants } from '../MetricsConstants' ; import { MetricName } from '../common/MetricName' ; deprecated export class MetricsProcessChannel { static instance ; static getInstance ( ) { if ( ! this . instance ) { this . instance = new MetricsProcessChannel ( ) ; } return this . instance ; } register ( group , name , metric ) { name = this . buildName ( name ) ; if ( global [ MetricsConstants . GLOBAL_METRICS_KEY ] && global [ MetricsConstants . GLOBAL_METRICS_KEY ] . register ) { global [ MetricsConstants . GLOBAL_METRICS_KEY ] . register ( group , name , metric ) ; } } buildName ( name ) { if ( typeof name === 'string' ) { name = MetricName . build ( < string > name ) ; } return name ; } }