npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

stackdriver-event

0.0.1 • Public • Published

stackdriver-event

Submit annotation and deploy events to StackDriver.

This helps annotating graphs so you can corelate movements to events.

Example

var submit = require('stackdriver-event')(API_KEY);
 
// simple
 
submit.annotation('increase disk space', function(err){
  // ...
});
 
submit.deploy('3560d7a', function(err){
  // ...
});
 
// or detailed
 
submit.annotation({
  message: 'increase disk space',
  annotated_by: 'Julian',
  level: 'INFO',
  instance_id: 'id'
}, function(err){
  // ...  
});
 
submit.deploy({
  revision_id: '3560d7a',
  deployed_by: 'Julian',
  deployed_to: 'production',
  repository: 'Debugger'
}, function(err){
  // ...  
});

Installation

$ npm install stackdriver-event

API

Event(key)

Create an event submitter instance with your api key.

#annotation(data|message, fn)

Submit an annotation event with message or data with those keys:

  • message (required)
  • annotated_by
  • level
  • instance_id
  • event_epoch

For more information, see the StackDriver Docs.

#deploy(data|revision_id, fn)

Submit an deploy event with revision_id or data with those keys:

  • revision_id (required)
  • deployed_by
  • deployed_to
  • repository

For more information, see the StackDriver Docs.

License

MIT

Keywords

none

install

npm i stackdriver-event

Downloadsweekly downloads

14

version

0.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability