vidi-seneca-metrics

0.2.0 • Public • Published

Banner

vidi-seneca-metrics

A Vidi: Metrics plugin that generates metrics Seneca. Can be ran as a plugin or as a stand-alone micro-service. Used on both collectors and emitters.

  • Work in progress: This module is currently a work in progress.

Running as a plugin

To use as a plugin, install via npm and use in your Seneca system,

npm install vidi-metrics
npm install vidi-seneca-metrics
var opts = {
  collector: {enabled: true},
  emitter: {enabled: true}
}
 
require('seneca')()
  .use('vidi-metrics', opts)
  .use('vidi-seneca-metrics')
  ...

Running as a micro-service

A demo micro-service can be found in srv/demo.js and ran via npm. Simply clone this repository locally and run,

npm install; npm run demo

The demo runs emits seneca messages on regular intervals and prints the mapped results to screen.

Options

{
  // The name the plugin is registered with
  plugin: 'vidi-seneca-metrics',
 
  // The role to use when acting and adding actions
  role: 'metrics',
 
  // A group to assign to emitted metrics
  group: '',
 
  // A tag to assign to emitted metrics
  tag: '',
 
  // A pid to assign to emitted metrics
  pid: process.pid,
 
  // The size of the rolling stats
  size: 9999,
 
  // The interval to calculate rolling stats
  interval: 1000
}
 

Contributing

The Vidi: Insights org encourages open and safe participation.

If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

License

Copyright (c) 2016, Dean McDonnell and other contributors. Licensed under MIT.

Readme

Keywords

none

Package Sidebar

Install

npm i vidi-seneca-metrics

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • mcdonnelldean