new SignalFxSelfReportingMetricsRegistry()
Extends
- SelfReportingMetricsRegistry
Methods
-
getOrCreateMeter(name, dimensions, publishingIntervalInSeconds)
-
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.Parameters:
Name Type Description name
string The Metric name
dimensions
Dimensions any custom Dimensions for the Metric
publishingIntervalInSeconds
number a optional custom publishing interval
Returns:
- Type
- NoOpMeter | *
-
getOrCreateTimer(name, dimensions, publishingIntervalInSeconds)
-
Creates a Timer or get the existing Timer for a given name and dimension combo with a NoOpMeter.
Parameters:
Name Type Description name
string The Metric name
dimensions
Dimensions any custom Dimensions for the Metric
publishingIntervalInSeconds
number a optional custom publishing interval
Returns:
- Type
- Timer
-
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.
Example
const { SignalFxSelfReportingMetricsRegistry, SignalFxMetricsReporter, SignalFxEventCategories } = require('measured-signalfx-reporter'); const registry = new SignalFxSelfReportingMetricsRegistry(new SignalFxMetricsReporter(signalFxClient)); registry.sendEvent('uncaughtException', SignalFxEventCategories.ALERT);