New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

instrumental

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instrumental

An agent for instrumentalapp.com. Supports the full collector protocol.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
2
Weekly downloads
 
Created
Source

Instrumental for Node

A node.js agent for instrumentalapp.com. It supports the full collector protocol.

Installation

npm install instrumental

Usage

The only settings that should need changing are api_key and perhaps max_queue_size if you have very frequent/infrequent data.

I = require('instrumental')
I.setup({
	// from here: https://instrumentalapp.com/docs/setup
	api_key			: "your_api_key", 		 
	
	// optional, default shown
	hostname 		: 'instrumentalapp.com', 
	
	// optional, default shown
	port 			: 8000,					 
	
	// optional, default shown. disconnect from the server
	// after this many milliseconds.
	timeout			: 10000,				 
	
	// optional, default shown. metrics will only be sent
	// to the server when this many have been queued,
	// reconnecting if necessary.
	max_queue_size	: 100,					 

}, function (is_api_key_valid) {
	// optional!
	//
	// this is called everytime the agent connects 
	// to the server to send metrics. it can indicate
	// a successful or unsuccessful connection based on
	// is_api_key_valid.
});

I.increment('metric.name', /* increment_by = 1, timestamp = now */);

I.gauge('metric.name', 82.12, /* timestamp = now */);

I.gauge_absolute('metric.name', 12.12, /* timestamp = now */);

I.notice('This is a notice', /* duration = 0, timestamp = now */);

// this forces the agent to send all current metrics to the server.
// good to call when the server is shutting down or similar
I.flush();

Keywords

FAQs

Package last updated on 06 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc