Giter Site home page Giter Site logo

zetta-usage-addon's Introduction

Zetta Usage Resource

API Driven analytics collection for the Z2Z protocol.

Install

npm install zetta-usage-addon --save

Usage

var zetta = require('zetta');
var MemDeviceRegistry = require('./memory_device_registry');
var MemPeerRegistry = require('./memory_peer_registry');
var UsageApp = require('zetta-usage-addon');

var options = {};

// Once hub is connected only send metrics every 30 seconds
//options.publishFrequency = 30000;
//options.publishHeaders  = true|falsey
//options.ignoredHeaders = []; Headers to stripout 
//options.enableApi = true|false. Usage api /usage

var app = new UsageApp(options)

zetta({registry: new MemDeviceRegistry(), peerRegistry: new MemPeerRegistry()})
  .name('server.1')
  .use(app.collect())
  .listen(1338);

zetta-usage-addon's People

Contributors

adammagaluk avatar mdobson avatar

Watchers

brian mulloy avatar  avatar James Cloos avatar  avatar  avatar

Forkers

pkdevboxy

zetta-usage-addon's Issues

Crashes in some cases

 /zetta_target/node_modules/zetta-usage-addon/usage_app.js:41
 usage[connectionId].active = false;
 ^
 TypeError: Cannot set property 'active' of undefined
 at /zetta_target/node_modules/zetta-usage-addon/usage_app.js:41:34
 at EventEmitter.<anonymous> (/zetta_target/node_modules/zetta/lib/pubsub_service.js:65:5)
 at EventEmitter.emit (events.js:95:17)
 at PubSub.publish (/zetta_target/node_modules/zetta/lib/pubsub_service.js:11:16)
 at null.<anonymous> (/zetta_target/node_modules/zetta/lib/http_server.js:135:29)
 at emit (events.js:92:17)
 at Socket.<anonymous> (/zetta_target/node_modules/zetta/lib/peer_socket.js:113:10)
 at Socket.emit (events.js:117:20)
 at _stream_readable.js:929:16
 at process._tickDomainCallback (node.js:463:13)

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.