Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

newrelic-node

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newrelic-node - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

readme.md

20

newrelic-node.js

@@ -65,4 +65,22 @@ var sys = require('util');

var path = url.parse(req.url).pathname;
this.log({"timespent":timespent, "path":path, "httpStatus":res.statusCode, "httpMethod":req.method});
this.log({"timespent":{URI_WEB_TRANSACTION:timespent}, "path":path, "httpStatus":res.statusCode, "httpMethod":req.method});
}
};
exports.logRequestError = function(messsage, req, res, timespent){
if (connected) {
var path = url.parse(req.url).pathname;
this.log({"timespent":{URI_WEB_TRANSACTION:timespent}, "path":path, "httpStatus":res.statusCode, "httpMethod":req.method, "error":messsage});
}
};
exports.logWebTransactionExternalAll = function(req, res, timespent){
if (connected) {
var path = url.parse(req.url).pathname;
this.log({"timespent":{WEB_TRANSACTION_EXTERNAL_ALL: timespent}, "path":path, "httpStatus":res.statusCode, "httpMethod":req.method});
}
};

2

package.json
{ "name" : "newrelic-node"
, "description" : "Logger para newrelic"
, "tags" : ["newrelic"]
, "version" : "0.0.7"
, "version" : "0.0.8"
, "author" : "Matias Rege <matias.rege@mercadolibre.com>"

@@ -6,0 +6,0 @@ , "repository" :

@@ -49,3 +49,3 @@ var newrelic = require( "../newrelic-node.js" );

done();
}, 4000);
}, 2000);
}).listen(8085);

@@ -59,3 +59,38 @@ request({

});
it("envio de error",function(done){
this.timeout(5000);
http.createServer(function(request, response) {
response.writeHead(500, {});
newrelic.logRequestError("Un error", request, response, 5000);
setTimeout(function() {
done();
}, 2000);
}).listen(8086);
request({
url:"http://127.0.0.1:8086/pingError",
method:"GET",
jar: false
},function(error,response,body){
})
});
it("log WEB_TRANSACTION_EXTERNAL_ALL",function(done){
this.timeout(5000);
http.createServer(function(request, response) {
response.writeHead(200, {});
newrelic.logWebTransactionExternalAll(request, response, 5000);
setTimeout(function() {
done();
}, 2000);
}).listen(8087);
request({
url:"http://127.0.0.1:8087/ping",
method:"GET",
jar: false
},function(error,response,body){
})
});
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc