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
516 stars 52 forks source link

The return value of funtion:SettableGauge.getType is difference from the requested Type in funtion:Collection.settableGauge. #47

Closed ImHype closed 6 years ago

ImHype commented 6 years ago

version:1.10.0 SettableGauge.getType:

/**
   * The type of the Metric Impl. {@link MetricTypes}.
   * @return {string} The type of the Metric Impl.
   */
  getType() {
    return MetricTypes.METER;
  }

Collection.settableGauge

 settableGauge(name, properties) {
    this._validateName(name);

    let settableGauge;
    this._getMetricForNameAndType(name, MetricTypes.METER).ifPresentOrElse(
fieldju commented 6 years ago

@imhype thanks for opening this issue, I made a fix and released it.