Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_getValuesToProcessForType(name, metric) {
const type = metric.getType();
switch (type) {
case MetricTypes.TIMER:
return this._getValuesToProcessForTimer(name, metric);
case MetricTypes.GAUGE:
return this._getValuesToProcessForGauge(name, metric);
case MetricTypes.COUNTER:
return this._getValuesToProcessForCounter(name, metric);
case MetricTypes.HISTOGRAM:
return this._getValuesToProcessForHistogram(name, metric);
case MetricTypes.METER:
this._log.warn(
'Meters are not reported to SignalFx. Meters do not make sense to use with SignalFx because the same values ' +
'can be calculated using simple counters and aggregations within SignalFx itself.'
);
return [];
default:
this._log.error(`Metric Type: ${type} has not been implemented to report to signal fx`);
return [];