@gasket/plugin-elastic-apm 6.15.3-canary.0 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cookies.js +3 -3
- package/{index.js → lib/index.js} +4 -8
- package/package.json +7 -4
package/lib/cookies.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {*} config the Gasket config object
|
|
6
6
|
* @returns {string[]} an array of cookie names
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
const sensitiveCookies = (config) => {
|
|
9
9
|
if (
|
|
10
10
|
typeof config.elasticAPM === 'undefined' ||
|
|
11
11
|
typeof config.elasticAPM.sensitiveCookies === 'undefined'
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @param {object} payload The APM payload
|
|
24
24
|
* @returns {object} a modified version of the incoming APM payload
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
const filterSensitiveCookies = (config) => (payload) => {
|
|
27
27
|
if (
|
|
28
28
|
payload.context &&
|
|
29
29
|
payload.context.request &&
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
module.exports = {
|
|
46
46
|
filterSensitiveCookies,
|
|
47
47
|
sensitiveCookies
|
|
48
|
-
};
|
|
48
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { filterSensitiveCookies } = require('./
|
|
1
|
+
const { filterSensitiveCookies } = require('./cookies');
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Determines if the Elastic APM agent has sufficient config to be active
|
|
@@ -37,16 +37,12 @@ module.exports = {
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
preboot: {
|
|
40
|
-
handler: async (
|
|
40
|
+
handler: async ({ config }) => {
|
|
41
41
|
require('elastic-apm-node')
|
|
42
42
|
.start({
|
|
43
|
-
...
|
|
43
|
+
...config.elasticAPM
|
|
44
44
|
})
|
|
45
|
-
.addFilter(filterSensitiveCookies(
|
|
46
|
-
gasket.apm = {
|
|
47
|
-
setTransactionPath: (path) => console.log('setting path:', path),
|
|
48
|
-
captureError: (err) => console.log('logging error:', err),
|
|
49
|
-
};
|
|
45
|
+
.addFilter(filterSensitiveCookies(config));
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gasket/plugin-elastic-apm",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0",
|
|
4
4
|
"description": "Adds Elastic APM instrumentation to your application",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "lib",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib"
|
|
9
|
+
],
|
|
7
10
|
"scripts": {
|
|
8
|
-
"lint": "eslint
|
|
11
|
+
"lint": "eslint .",
|
|
9
12
|
"lint:fix": "npm run lint -- --fix",
|
|
10
13
|
"test": "npm run test:runner",
|
|
11
14
|
"test:runner": "jest test/*.test.js",
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
"elastic-apm-node": "^3.26.0"
|
|
41
44
|
},
|
|
42
45
|
"devDependencies": {
|
|
43
|
-
"@gasket/engine": "^6.
|
|
46
|
+
"@gasket/engine": "^6.19.0",
|
|
44
47
|
"eslint": "^8.7.0",
|
|
45
48
|
"eslint-config-godaddy": "^6.0.0",
|
|
46
49
|
"eslint-plugin-jest": "^25.7.0",
|