Giter Club home page Giter Club logo

circonus-cip's People

Contributors

bdunavant avatar cjihrig avatar maier avatar postwait avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

bdunavant maier geek

circonus-cip's Issues

Metrics data is always 0

Hey!

Yesterday I tried to integrate my node application by using circonous-cip npm package and trap method. This is how my code looks like:

import * as circonus_cip from 'circonus-cip';
import * as express from 'express';
import { Logger } from '../logger/logger';
import { IMetricsOptions } from './configuration';
export class MetricsStorage {
  private readonly trap = circonus_cip.makeTrap(
    this._opts.uuid,
    this._opts.secret,
  );

  constructor(app: express.Express, private readonly _opts: IMetricsOptions) {
    if (!this._opts.secret || !this._opts.uuid) {
      Logger.getLogger().warn(
        `Metrics are disabled - undefined secret or uuid`,
      );
      return;
    }
    app.use(circonus_cip.express(this._opts.uuid, this._opts.secret));
  }
  public addMetric(name: string, value: number | string | boolean) {
    this.trap.record(name, value);
  }
}

The main issue that I have with this code is:

  • I can create new metrics chart when I change metrics name which is fine
  • data in each chart is always 0.

To detect problem with 0 value I used new Date().getTime() value to always have different big value. Example code:

service.metrics.addMetric('sample', new Date().getTime());

Am I doing something wrong? It seems like package contains all necessary data but circonous anyway display 0 on each chart :(

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.