Releases: ysa23/metrics-reporter
v1.1.0
v1.0.0 - RTM version
First major version of metrics reporter.
Features:
- Pluggable metrics reporting framework
- Built-in support for Graphite & DataDog
- Optimized for performance and low memory footprint
- TypeScript compatible
- No package dependencies for production distribution
BREAKING CHANGES FROM PREVIOUS VERSIONS:
https://github.com/ysa23/metrics-reporter/releases/tag/v0.11.0
https://github.com/ysa23/metrics-reporter/releases/tag/v0.12.0
https://github.com/ysa23/metrics-reporter/releases/tag/v0.14.0
v0.15.0: TypeScript Declarations
What's Changed
- Feature: TypeScript declarations to all exported modules #38
Full Changelog: v0.14.2...v0.15.0
v0.14.2: Allow to init Metrics with no reporters
In order to allow disabling reporting, we now allowing to send an empty array in the reporters list.
v0.14.1: ConsoleReporter bug fix
Merge pull request #34 from ysa23/fix/console-reporter Fix: Console reporter
v0.14.0: Metrics default tags
Move defaults tags to the metrics object instead of dealing with them individually within each reporter.
BREAKING CHANGES
tags
are initialized inMetrics
- e.g. will be ignored if initialized in each reporter (GraphiteReporter
,DataDogReporter
). To migrate, initialize default tags in theMetrics
objects and not in the reporter. Please see the docs- Reporters - will get the complete
tags
object in each reporting function. I.e. no need to implement merging of tags anymore in the reporter level.
v0.12.0 - Single error callback for network based reporters
#27 - To improve memory utilization, reporters will stop getting the callback upon invocation of a report, but rather get an error callback upon creation.
BREAKING CHANGES
- Reporters - to get errors from a reporter, initialize it with its own error callback in addition to the error callback in the main
Metrics
object - Reporters - error callback will only be triggered upon error, and not for each invocation
- No default callback (was previously
console.error
) for errors.
Standardization (BREAKING CHANGES)
Refactor the package according to current standards:
- All files under src folder
- Avoid using this in constructor functions as much as possible
- RORO in all constructors
- Return object in exports
In this release there are breaking changes with reference to version 0.10.1 and eariler:
Metrics
object constructor now uses RORO instead of inline parameters:new Metrics([reporter1, reporter1])
=>new Metrics({ reporters: [reporter1,reporter2] })
InMemoryReporter
object constructor now uses RORO instead of inline parameters:new InMemoryReporter([])
=> `new InMemoryReporter({ buffer: [] })StringReporter
object constructor now use RORO instead of inline parameters:new StringReporter(stat => { })
=>new StringReporter({ action: stat => {} })
DataDogReporter
:defaultTags
option has been renamed totags
- All exported objects (Metrics and reporters) now has rigid input validation with reference to previous versions, so they will fail early upon intialization
All of these changes have been reflected in the documentation.
Reduce package size
Reduce package size with npmignore
Graphite: Support batching
Graphite reporter now supports batching as a default (same as DataDog reporter).
Batching means that instead of dispatching a metric immediately, it will be stored in a buffer and flushed when either the buffer exceeds its maximum size or on a predefined interval.
Configuration available:
- Disable batching
- Change max buffer size
- Change flush interval
Please see README for additional information.
To make sure metrics are flushed on deployment of your app or on restart, please make sure to call close
function on the reporter on application shutdown