Submit annotation
and deploy
events to StackDriver.
This helps annotating graphs so you can corelate movements to events.
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){
// ...
});
$ npm install stackdriver-event
Create an event submitter instance with your api key
.
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.
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.
MIT