Type Definitions
-
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>
- Source:
Example
{ path: "/api/foo" method: "GET" statusCode: "200" }
-
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.
-
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