@gasket/plugin-elastic-apm 6.15.3-canary.2 → 6.20.2

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 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
- const sensitiveCookies = (config) => {
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
- const filterSensitiveCookies = (config) => (payload) => {
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('./lib/cookies');
1
+ const { filterSensitiveCookies } = require('./cookies');
2
2
 
3
3
  /**
4
4
  * Determines if the Elastic APM agent has sufficient config to be active
@@ -37,12 +37,12 @@ module.exports = {
37
37
  }
38
38
  },
39
39
  preboot: {
40
- handler: async (gasket) => {
41
- gasket.apm = require('elastic-apm-node')
40
+ handler: async ({ config }) => {
41
+ require('elastic-apm-node')
42
42
  .start({
43
- ...gasket.config.elasticAPM
43
+ ...config.elasticAPM
44
44
  })
45
- .addFilter(filterSensitiveCookies(gasket.config));
45
+ .addFilter(filterSensitiveCookies(config));
46
46
  }
47
47
  }
48
48
  }
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@gasket/plugin-elastic-apm",
3
- "version": "6.15.3-canary.2",
3
+ "version": "6.20.2",
4
4
  "description": "Adds Elastic APM instrumentation to your application",
5
- "main": "index.js",
5
+ "main": "lib",
6
6
  "types": "lib/index.d.ts",
7
+ "files": [
8
+ "lib"
9
+ ],
7
10
  "scripts": {
8
- "lint": "eslint index.js test",
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.15.2",
46
+ "@gasket/engine": "^6.20.2",
44
47
  "eslint": "^8.7.0",
45
48
  "eslint-config-godaddy": "^6.0.0",
46
49
  "eslint-plugin-jest": "^25.7.0",
@@ -64,5 +67,6 @@
64
67
  },
65
68
  "jest": {
66
69
  "testEnvironment": "node"
67
- }
70
+ },
71
+ "gitHead": "0c34d84b6dd3010db139e90bbbda19b879a9396c"
68
72
  }
package/CHANGELOG.md DELETED
@@ -1,12 +0,0 @@
1
- # `@gasket/plugin-elastic-apm`
2
-
3
- ### 6.10.0
4
-
5
- - TypeScript definitions for config & lifecycles ([#311])
6
-
7
- ### 6.0.12
8
-
9
- - Initial release.
10
-
11
-
12
- [#311]:https://github.com/godaddy/gasket/pull/311