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.