Skip to content

Releases: ysa23/metrics-reporter

v1.1.0

29 Feb 12:48
53d8880
Compare
Choose a tag to compare

What's Changed

  • Fix: meter on async function does not return the value from the measured function
  • Fix: meter TypeScript declaration

Full Changelog: v1.0.0...v1.1.0

v1.0.0 - RTM version

13 Feb 07:54
Compare
Choose a tag to compare

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

31 Jan 06:43
78a693e
Compare
Choose a tag to compare

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

30 May 11:19
29ccbb8
Compare
Choose a tag to compare

In order to allow disabling reporting, we now allowing to send an empty array in the reporters list.

v0.14.1: ConsoleReporter bug fix

11 Mar 12:45
06c33ee
Compare
Choose a tag to compare
Merge pull request #34 from ysa23/fix/console-reporter

Fix: Console reporter

v0.14.0: Metrics default tags

11 Mar 09:00
7efe044
Compare
Choose a tag to compare

Move defaults tags to the metrics object instead of dealing with them individually within each reporter.

BREAKING CHANGES

  • tags are initialized in Metrics - e.g. will be ignored if initialized in each reporter (GraphiteReporter, DataDogReporter). To migrate, initialize default tags in the Metrics 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

18 Feb 10:12
4a0c833
Compare
Choose a tag to compare

#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)

08 Feb 18:25
ceb0eae
Compare
Choose a tag to compare

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 to tags
  • 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

03 Feb 14:46
b9fac5b
Compare
Choose a tag to compare

Reduce package size with npmignore

Graphite: Support batching

03 Feb 09:43
417d711
Compare
Choose a tag to compare

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