Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 1c348f0

Browse files
WardormeurDanielBrierton
authored andcommitted
Fix NR not registering acts
1 parent 50e89e4 commit 1c348f0

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

service.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ if (process.env.MAILTRAP_ENABLED === 'true') {
2929
seneca.use('mail', config.email);
3030
}
3131

32-
if (!_.isUndefined(newrelic)) {
33-
seneca.use(senecaNR, {
34-
newrelic,
35-
roles: ['cd-users', 'cd-profiles', 'cd-oauth2', 'cd-user-profile'],
36-
filter (p) {
37-
p.user = p.user ? p.user.id : undefined;
38-
p.login = p.login ? p.login.id : undefined;
39-
return p;
40-
}
41-
});
42-
}
43-
4432
function shutdown (err) {
4533
if (err !== undefined) {
4634
var error = {
@@ -86,7 +74,17 @@ require('./migrate-psql-db.js')(function (err) {
8674
seneca.use(require('cp-permissions-plugin'), {
8775
config: __dirname + '/config/permissions'
8876
});
89-
77+
if (!_.isUndefined(newrelic)) {
78+
seneca.use(senecaNR, {
79+
newrelic,
80+
roles: ['cd-users', 'cd-profiles', 'cd-oauth2', 'cd-user-profile'],
81+
filter (p) {
82+
p.user = p.user ? p.user.id : undefined;
83+
p.login = p.login ? p.login.id : undefined;
84+
return p;
85+
}
86+
});
87+
}
9088
process.on('SIGINT', shutdown);
9189
process.on('SIGTERM', shutdown);
9290
process.on('uncaughtException', shutdown);

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,8 +3443,8 @@ [email protected]:
34433443
resolved "https://registry.yarnpkg.com/newline/-/newline-0.0.3.tgz#0f6a74493223dba04fe7dbfb6cdc804bf7e46dd0"
34443444

34453445
newrelic@^2.6.0:
3446-
version "2.6.0"
3447-
resolved "https://registry.yarnpkg.com/newrelic/-/newrelic-2.6.0.tgz#8672c25c3bda68582ba8dd00a25e3198ef98e42e"
3446+
version "2.6.1"
3447+
resolved "https://registry.yarnpkg.com/newrelic/-/newrelic-2.6.1.tgz#ebf490a290616b9002e18a5a0f250b8c6e3ae365"
34483448
dependencies:
34493449
async "^2.1.4"
34503450
concat-stream "^1.5.0"

0 commit comments

Comments
 (0)