Module: inputValidators

This module contains various validators to validate publicly exposed input.

Source:

Methods


<static> validateCachedGaugeOptions(name, callback, dimensions, publishingIntervalInSeconds)

Validates @{link Gauge} options.

Parameters:
Name Type Description
name string

The metric name

callback function

The callback for the CachedGauge

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateCommonMetricParameters(name, dimensions, publishingIntervalInSeconds)

Validates the options that are common amoung all create metric methods

Parameters:
Name Type Description
name string

The metric name

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateCounterOptions(name, dimensions, publishingIntervalInSeconds)

Validates the create counter Options.

Parameters:
Name Type Description
name string

The metric name

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateGaugeOptions(name, callback, dimensions, publishingIntervalInSeconds)

Validates @{link Gauge} options.

Parameters:
Name Type Description
name string

The metric name

callback function

The callback for the Gauge

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateHistogramOptions(name, dimensions, publishingIntervalInSeconds)

Validates the create histogram Options.

Parameters:
Name Type Description
name string

The metric name

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateMetricName(name)

Validates the metric name.

Parameters:
Name Type Description
name

The metric name.

Source:

<static> validateNumberReturningCallback(callback)

Validates the provided callback.

Parameters:
Name Type Description
callback

The provided callback for a gauge.

Source:

<static> validateOptionalDimensions(dimensionsOptional)

Validates a set of optional dimensions

Parameters:
Name Type Description
dimensionsOptional
Source:

<static> validateOptionalLogger(loggerOptional)

Validates that an optional logger instance at least has the methods we expect.

Parameters:
Name Type Description
loggerOptional
Source:

<static> validateOptionalPublishingInterval(publishingIntervalInSecondsOptional)

Validates the optional publishing interval.

Parameters:
Name Type Description
publishingIntervalInSecondsOptional

The optional publishing interval.

Source:

<static> validateRegisterOptions(name, metric, dimensions, publishingIntervalInSeconds)

Validates the create timer Options.

Parameters:
Name Type Description
name string

The metric name

metric Metric

The metric instance

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateReporterInstance(reporter)

Validates that a valid Reporter object has been supplied

Parameters:
Name Type Description
reporter Reporter
Source:

<static> validateReporterParameters(options)

Validates optional params for a Reporter

Parameters:
Name Type Description
options ReporterOptions

The optional params

Source:

<static> validateSelfReportingMetricsRegistryParameters(reporters [, options])

Validates the input parameters for a SelfReportingMetricsRegistry

Parameters:
Name Type Argument Description
reporters Array.<Reporter>
options SelfReportingMetricsRegistryOptions <optional>
Source:

<static> validateSettableGaugeOptions(name, dimensions, publishingIntervalInSeconds)

Validates the create settable gauge Options.

Parameters:
Name Type Description
name string

The metric name

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<static> validateTimerOptions(name, dimensions, publishingIntervalInSeconds)

Validates the create timer Options.

Parameters:
Name Type Description
name string

The metric name

dimensions Dimensions

The optional custom dimensions

publishingIntervalInSeconds number

the optional publishing interval

Source:

<inner> validateMetric(metric)

Validates that a metric implements the metric interface.

Parameters:
Name Type Description
metric Metric

The object that is supposed to be a metric.

Source: