@gasket/plugin-elastic-apm 7.0.0-next.65 → 7.0.0-next.67

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.
Files changed (2) hide show
  1. package/README.md +12 -9
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -22,14 +22,14 @@ export default makeGasket({
22
22
  });
23
23
  ```
24
24
 
25
- Add a `--require` flag to a `package.json` start script:
25
+ Add `NODE_OPTIONS=--import=./setup.js` to the `package.json` start script:
26
26
 
27
27
  ```diff
28
28
  "scripts": {
29
- "build": "gasket build",
30
- - "start": "gasket start",
31
- + "start": "gasket start --require ./setup.js",
32
- "local": "gasket local"
29
+ "build": "next build",
30
+ - "start": "next start",
31
+ + "start": "NODE_OPTIONS=--import=./setup.js next start",
32
+ "local": "next dev"
33
33
  }
34
34
  ```
35
35
 
@@ -37,13 +37,16 @@ Add a `setup.js` script to the root of your app
37
37
 
38
38
  ```
39
39
  // setup.js
40
- require('dotenv').config();
40
+ import dotenv from 'dotenv/config';
41
+ import apm from 'elastic-apm-node';
41
42
 
42
- require('elastic-apm-node').start({
43
+ // Elastic APM setup
44
+ apm.start({
43
45
  serviceName: 'my-service-name',
46
+ captureHeaders: false,
44
47
  secretToken: process.env.ELASTIC_APM_SECRET_TOKEN,
45
48
  serverUrl: process.env.ELASTIC_APM_SERVER_URL
46
- // any additional configurations options
49
+ // additional configuration options
47
50
  });
48
51
  ```
49
52
 
@@ -62,7 +65,7 @@ are not present, the APM agent will be disabled.
62
65
  ### Plugin Configurations
63
66
 
64
67
  The Gasket plugin provides some additional setup helpers. These can be
65
- configured under `elasticAPM` in the `gasket.config.js`.
68
+ configured under `elasticAPM` in the `gasket.js`.
66
69
 
67
70
  - **`sensitiveCookies`** - (string[]) A list of sensitive cookies to filter
68
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gasket/plugin-elastic-apm",
3
- "version": "7.0.0-next.65",
3
+ "version": "7.0.0-next.67",
4
4
  "description": "Adds Elastic APM instrumentation to your application",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "homepage": "https://github.com/godaddy/gasket/tree/main/packages/gasket-plugin-elastic-apm",
42
42
  "devDependencies": {
43
- "@gasket/core": "7.0.0-next.65",
43
+ "@gasket/core": "7.0.0-next.67",
44
44
  "dotenv": "^16.4.5",
45
45
  "elastic-apm-node": "^4.4.1",
46
46
  "eslint": "^8.56.0",
@@ -69,5 +69,5 @@
69
69
  "jest": {
70
70
  "testEnvironment": "node"
71
71
  },
72
- "gitHead": "93fb05fe933682704607eed6a2dfc870cf35c2d1"
72
+ "gitHead": "a18369e46ce5322ac965ae0dff22c2fca99d5997"
73
73
  }