Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit ab3d882

Browse files
committed
Merge pull request #409 from cloudspokes/SUP-214-api-stability
Sup 214 api stability
2 parents ac2036f + fff741f commit ab3d882

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

initializers/nrmid.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var newrelic = require("newrelic");
2+
3+
var fixTransactionName = function(connection, actionTemplate, next) {
4+
if(connection.type === 'web'){
5+
newrelic.setControllerName(actionTemplate.name);
6+
}
7+
next(connection, true);
8+
}
9+
10+
var reportException = function(type, err, extraMessages, severity){
11+
newrelic.noticeError(err);
12+
}
13+
14+
exports.nrmid = function(api, next){
15+
api.actions.preProcessors.push(fixTransactionName);
16+
api.exceptionHandlers.reporters.push(reportException);
17+
next();
18+
};

routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ exports.routes = {
333333

334334
{ path: "/:apiVersion/download/document/:docId", action: "downloadDocument" },
335335

336-
{ path: "/:apiVersion/reports/analyze", action: "getChallengeAnalyze" },
336+
//{ path: "/:apiVersion/reports/analyze", action: "getChallengeAnalyze" },
337337
{ path: "/:apiVersion/reports/client/costs", action: "getClientChallengeCosts" },
338338
{ path: "/:apiVersion/reports/client/challenges", action: "clientChallengeCosts" },
339339
{ path: "/:apiVersion/reports/client/activeChallenges", action: "getClientActiveChallengeCosts" },

0 commit comments

Comments
 (0)