kwargs['timestamp'] = new Date().toISOString().split('.')[0];
kwargs['project'] = this.dsn.project_id;
kwargs['platform'] = 'node';
// Only include release information if it is set
if (this.release) {
kwargs['release'] = this.release;
}
var ident = {'id': kwargs['event_id']};
if (this.dataCallback) {
kwargs = this.dataCallback(kwargs);
}
// this will happen asynchronously. We don't care about it's response.
this._enabled && this.send(kwargs, ident);
return ident;
};
_.send = function send(kwargs, ident) {
var self = this;
// stringify, but don't choke on circular references, see: http://stackoverflow.com/questions/11616630/json-stringify-avoid-typeerror-converting-circular-structure-to-json
var cache = [];
var skwargs = JSON.stringify(kwargs, function(k, v) {