Class: SignalFxMetricsReporter

SignalFxMetricsReporter

A Reporter that reports metrics to Signal Fx


new SignalFxMetricsReporter(signalFxClient [, options])

Parameters:
Name Type Argument Description
signalFxClient SignalFxClient

The configured signal fx client.

options ReporterOptions <optional>

See ReporterOptions.

Source:

Extends

  • Reporter

Methods


<protected> _getValuesToProcessForCounter(name, counter)

Maps values from a Counter to a set of metrics to report to SigFx.

Parameters:
Name Type Description
name string

The registry name

counter Counter

The data from the measure metric object

Source:
Returns:

Returns an array of MetricValueTypeWrapper to use to build the request

Type
Array.<MetricValueTypeWrapper>

<protected> _getValuesToProcessForGauge(name, gauge)

Maps values from a Gauge to a set of metrics to report to SigFx.

Parameters:
Name Type Description
name string

The registry name

gauge Gauge

The Gauge

Source:
Returns:

Returns an array of MetricValueTypeWrapper to use to build the request

Type
Array.<MetricValueTypeWrapper>

<protected> _getValuesToProcessForHistogram(name, histogram)

Maps and Filters values from a Histogram to a set of metrics to report to SigFx.

Parameters:
Name Type Description
name string

The registry name

histogram Histogram

The Histogram

Source:
Returns:

Returns an array of MetricValueTypeWrapper to use to build the request

Type
Array.<MetricValueTypeWrapper>

<protected> _getValuesToProcessForTimer(name, timer)

Maps and Filters values from a Timer to a set of metrics to report to SigFx.

Parameters:
Name Type Description
name string

The registry name

timer Timer

The Timer

Source:
Returns:

Returns an array of MetricValueTypeWrapper to use to build the request

Type
Array.<MetricValueTypeWrapper>

<protected> _getValuesToProcessForType(name, metric)

Maps Measured Metrics Object JSON outputs to their respective signal fx metrics using logic from
com.signalfx.codahale.reporter.AggregateMetricSenderSessionWrapper in the java lib to derive naming

Parameters:
Name Type Description
name string

The registered metric base name

metric Metric

The metric.

Source:
Returns:

an array of MetricValueTypeWrapper that can be used to
build the SignalFx data point request

Type
Array.<MetricValueTypeWrapper>

<protected> _processMetric(metric, currentBuiltRequest)

Method for getting raw signal fx api request values from the Timer Object.

Parameters:
Name Type Description
metric MetricWrapper

metric The Wrapped Metric Object.

currentBuiltRequest any

The signal fx request that is being built.

Source:
Returns:

the currentBuiltRequest The signal fx request that is being built with the given metric in it.

Type
any

<protected> _reportMetrics(metrics)

Sends metrics to signal fx, converting name and dimensions and Metric to data signal fx can ingest

Parameters:
Name Type Description
metrics Array.<MetricWrapper>

The array of metrics to send to signal fx.

Source:

sendEvent(eventType [, category] [, dimensions] [, properties] [, timestamp])

Function exposes the event API of Signal Fx.
See https://github.com/signalfx/signalfx-nodejs#sending-events for more details.

Parameters:
Name Type Argument Description
eventType string

The event type (name of the event time series).

category SignalFxEventCategoryId <optional>

the category of event. See module:SignalFxEventCategories. Value by default is USER_DEFINED.

dimensions Dimensions <optional>

a map of event dimensions, empty dictionary by default

properties Object.<string, string> <optional>

a map of extra properties on that event, empty dictionary by default

timestamp number <optional>

a timestamp, by default is current time.

Source:
Example
const {
  SignalFxSelfReportingMetricsRegistry,
  SignalFxMetricsReporter,
  SignalFxEventCategories
} = require('measured-signalfx-reporter');
const registry = new SignalFxSelfReportingMetricsRegistry(new SignalFxMetricsReporter(signalFxClient));
registry.sendEvent('uncaughtException', SignalFxEventCategories.ALERT);