Last active
June 28, 2016 07:59
-
-
Save andrewtamura/830541e1fea55f0c0998a7b146a5e941 to your computer and use it in GitHub Desktop.
Set EC2 instance ID as Sentry Tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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