yaorg / node-measured

A Node metrics library for measuring and reporting application-level metrics, inspired by Coda Hale, Yammer Inc's Dropwizard Metrics Libraries
https://yaorg.github.io/node-measured/
MIT License
517 stars 52 forks source link

feat: The sendEvent wrapper now returns a promise #63

Closed anacasner closed 5 years ago

anacasner commented 5 years ago

In the SignalFx library sendEvent is async and returns a promise. In the SignalFxSelfReportingMetricsRegistry, the sendEvent wrapper always returned undefined (since it was returning the result of forEach). So there was no way to track when it was done.

Here's the source for the SignalFx client sendEvent: https://github.com/signalfx/signalfx-nodejs/blob/master/lib/client/ingest/signal_fx_client.js#L167

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 369


Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/measured-signalfx-reporter/lib/registries/SignalFxSelfReportingMetricsRegistry.js 0 4 0.0%
<!-- Total: 0 4 0.0% -->
Totals Coverage Status
Change from base Build 367: 0.08%
Covered Lines: 751
Relevant Lines: 830

💛 - Coveralls
fieldju commented 5 years ago

@anacasner this is great thanks for opening the PR!