Skip to content

Instantly share code, notes, and snippets.

@andrewtamura
Last active June 28, 2016 07:59
Show Gist options
  • Save andrewtamura/830541e1fea55f0c0998a7b146a5e941 to your computer and use it in GitHub Desktop.
Save andrewtamura/830541e1fea55f0c0998a7b146a5e941 to your computer and use it in GitHub Desktop.
Set EC2 instance ID as Sentry Tag
var AWS = require('aws-sdk');
var Raven = require('./raven');
var meta = new AWS.MetadataService();
meta.request("/latest/meta-data/instance-id", function(err, data){
Raven.setTagsContext({
EC2InstanceId: data
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment