Members
-
<constant> DEFAULT_NODE_OS_METRICS_REPORTING_INTERVAL_IN_SECONDS :number
-
The default reporting interval for node os metrics is 30 seconds.
Type:
- number
-
<constant> DEFAULT_NODE_PROCESS_METRICS_REPORTING_INTERVAL_IN_SECONDS :number
-
The default reporting interval for node process metrics is 30 seconds.
Type:
- number
-
<constant> DEFAULT_REQUEST_METRICS_REPORTING_INTERVAL_IN_SECONDS :number
-
The default reporting interval for requests
Type:
- number
-
<constant> nodeOsMetrics
-
A map of Metric generating functions, that create Metrics to measure node os stats.
-
<constant> nodeProcessMetrics :Object.<string, function()>
-
A map of Metric generating functions, that create Metrics to measure node process stats.
Type:
- Object.<string, function()>
Type Definitions
-
CounterProperties
-
Properties that can be supplied to the constructor of a Counter
Type:
- Object
- Source:
Properties:
Name Type Description count
number An initial count for the counter. Defaults to 0.
Example
// Creates a counter that starts at 5. const counter = new Counter({ count: 5 })
-
DimensionAwareMetricsRegistryOptions
-
Configurable options for the Dimension Aware Metrics Registry
- Source:
Properties:
Name Type Description metricLimit
Number the maximum number of metrics the registry may hold before dropping metrics
lru
Boolean switch dropping strategy from "least recently added" to "least recently used"
-
Dimensions
-
A Dictionary of string, string key value pairs
Type:
- Object.<string, string>
Example
{ path: "/api/foo" method: "GET" statusCode: "200" }
-
HistogramData
-
The data returned from Histogram::toJSON()
Type:
- object
- Source:
Properties:
Name Type Description min
number | null The lowest observed value.
max
number | null The highest observed value.
sum
number | null The sum of all observed values.
variance
number | null The variance of all observed values.
mean
number | null The average of all observed values.
stddev
number | null The stddev of all observed values.
count
number The number of observed values.
median
number 50% of all values in the resevoir are at or below this value.
p75
number See median, 75% percentile.
p95
number See median, 95% percentile.
p99
number See median, 99% percentile.
p999
number See median, 99.9% percentile.
-
HistogramProperties
-
Properties to create a Histogram with.
Type:
- Object
- Source:
Properties:
Name Type Description sample
object The sample reservoir to use. Defaults to an ExponentiallyDecayingSample.
-
LoggingReporterOptions
-
Type:
- Object
- Source:
Properties:
Name Type Argument Description defaultDimensions
Dimensions A dictionary of dimensions to include with every metric reported
logger
Logger <optional>
The logger to use, if not supplied a new Buynan logger will be created
logLevel
string <optional>
The log level to use with the created console logger if you didn't supply your own logger.
defaultReportingIntervalInSeconds
number <optional>
The default reporting interval to use if non is supplied when registering a metric, defaults to 10 seconds.
logLevelToLogAt
string <optional>
You can specify the log level ['debug', 'info', 'warn', 'error'] that this reporter will use when logging the metrics via the logger.
-
MeterData
-
The data returned from Meter::toJSON()
Type:
- object
- Source:
Properties:
Name Type Description mean
number The average rate since the meter was started.
count
number The total of all values added to the meter.
currentRate
number The rate of the meter since the last toJSON() call.
1MinuteRate
number The rate of the meter biased towards the last 1 minute.
5MinuteRate
number The rate of the meter biased towards the last 5 minutes.
15MinuteRate
number The rate of the meter biased towards the last 15 minutes.
-
MeterProperties
-
Type:
- Object
- Source:
Properties:
Name Type Description rateUnit
number The rate unit. Defaults to 1000 (1 sec).
tickInterval
number The interval in which the averages are updated. Defaults to 5000 (5 sec).
keepAlive
boolean Optional flag to unref the associated timer. Defaults to
false
.Example
const meter = new Meter({ rateUnit: 1000, tickInterval: 5000})
-
MetricValueTypeWrapper
-
Wrapper object to wrap metric value and SFX metadata needed to send metric value to SFX data ingestion.
Type:
- Object
- Source:
Properties:
Name Type Description metric
string The metric name to report to SignalFx
value
number the value to report to SignalFx
type
string The mapped SignalFx metric type
-
MetricWrapper
-
A wrapper object around a Metric, Dimensions and the metric name
Type:
- Object
- Source:
Properties:
Name Type Description name
string The supplied name of the Metric
metricImpl
Metric The Metric object
dimensions
Dimensions The Dimensions for the given Metric
-
ReporterOptions
-
Options for creating a Reporter
Type:
- Object
- Source:
Properties:
Name Type Description defaultDimensions
Dimensions A dictionary of dimensions to include with every metric reported
logger
Logger The logger to use, if not supplied a new Buynan logger will be created
logLevel
string The log level to use with the created console logger if you didn't supply your own logger.
defaultReportingIntervalInSeconds
number The default reporting interval to use if non is supplied when registering a metric, defaults to 10 seconds.
unrefTimers
boolean Indicate if reporting timers should be unref'd, defaults to false.
resetMetricsOnInterval
boolean Indicate if metrics should be reset on each reporting interval, defaults to false.
-
SelfReportingMetricsRegistryOptions
-
Configurable options for the Self Reporting Metrics Registry
- Source:
Properties:
Name Type Description logger
Logger the Logger to use
logLevel
string The Log level to use if defaulting to included logger
registry
DimensionAwareMetricsRegistry The registry to use, defaults to new DimensionAwareMetricsRegistry
-
SettableGaugeProperties
-
Properties that can be supplied to the constructor of a Counter
Type:
- Object
- Source:
Properties:
Name Type Description initialValue
number An initial value to use for this settable gauge. Defaults to 0.
Example
// Creates a Gauge that with an initial value of 500. const settableGauge = new SettableGauge({ initialValue: 500 })
-
SignalFxEventCategoryId
-
Type:
- string
Example
const registry = new SignalFxSelfReportingMetricsRegistry(...); registry.sendEvent('uncaughtException', SignalFxEventCategories.ALERT);
-
StopwatchProperties
-
Type:
- Object
- Source:
Properties:
Name Type Description getTime
function optional function override for supplying time., defaults to new Date() / process.hrt()
-
TimerProperties
-
Type:
- Object
- Source:
Properties:
Name Type Description meter
Meter The internal meter to use. Defaults to a new Meter.
histogram
Histogram The internal histogram to use. Defaults to a new Histogram.
getTime
function optional function override for supplying time to the Stopwatch
keepAlive
boolean Optional flag to unref the associated timer. Defaults to
false
.