Type Definitions
-
DimensionAwareMetricsRegistryOptions
-
Configurable options for the Dimension Aware Metrics Registry
- Source:
Properties:
Name Type Description metricLimitNumber the maximum number of metrics the registry may hold before dropping metrics
lruBoolean 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 defaultDimensionsDimensions A dictionary of dimensions to include with every metric reported
loggerLogger <optional>
The logger to use, if not supplied a new Buynan logger will be created
logLevelstring <optional>
The log level to use with the created console logger if you didn't supply your own logger.
defaultReportingIntervalInSecondsnumber <optional>
The default reporting interval to use if non is supplied when registering a metric, defaults to 10 seconds.
logLevelToLogAtstring <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 namestring The supplied name of the Metric
metricImplMetric The Metric object
dimensionsDimensions The Dimensions for the given Metric
-
ReporterOptions
-
Options for creating a Reporter
Type:
- Object
- Source:
Properties:
Name Type Description defaultDimensionsDimensions A dictionary of dimensions to include with every metric reported
loggerLogger The logger to use, if not supplied a new Buynan logger will be created
logLevelstring The log level to use with the created console logger if you didn't supply your own logger.
defaultReportingIntervalInSecondsnumber The default reporting interval to use if non is supplied when registering a metric, defaults to 10 seconds.
unrefTimersboolean Indicate if reporting timers should be unref'd, defaults to false.
resetMetricsOnIntervalboolean 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 loggerLogger the Logger to use
logLevelstring The Log level to use if defaulting to included logger
registryDimensionAwareMetricsRegistry The registry to use, defaults to new DimensionAwareMetricsRegistry
Measured