@verii/error-aggregation 1.3.0-pre.1792361655.0 → 1.3.0-pre.1792379683.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/package.json +2 -2
- package/src/sentry.js +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verii/error-aggregation",
|
|
3
|
-
"version": "1.3.0-pre.
|
|
3
|
+
"version": "1.3.0-pre.1792379683.0",
|
|
4
4
|
"description": "Aggregation of errors",
|
|
5
5
|
"repository": "https://github.com/LFDT-Verii/core",
|
|
6
6
|
"main": "index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sentry/node": "^8.
|
|
13
|
+
"@sentry/node": "^11.8.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"eslint": "9.39.5",
|
package/src/sentry.js
CHANGED
|
@@ -14,6 +14,24 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
const restrictedKeys = {
|
|
18
|
+
deny: ['forwarded', '-ip', 'remote-', 'via', '-user'],
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Sentry v11 collects request bodies, cookies and user info by default.
|
|
22
|
+
// Keep the v10 baseline so credentials and PII are not attached to error events.
|
|
23
|
+
const dataCollection = {
|
|
24
|
+
userInfo: false,
|
|
25
|
+
cookies: false,
|
|
26
|
+
httpHeaders: { request: restrictedKeys, response: restrictedKeys },
|
|
27
|
+
httpBodies: [],
|
|
28
|
+
urlQueryParams: restrictedKeys,
|
|
29
|
+
genAI: { inputs: false, outputs: false },
|
|
30
|
+
databaseQueryData: false,
|
|
31
|
+
queues: false,
|
|
32
|
+
graphQL: { document: false, variables: false },
|
|
33
|
+
};
|
|
34
|
+
|
|
17
35
|
const initSentry = async ({ dsn, release, environment, debug }) => {
|
|
18
36
|
const Sentry = await import('@sentry/node');
|
|
19
37
|
|
|
@@ -22,6 +40,7 @@ const initSentry = async ({ dsn, release, environment, debug }) => {
|
|
|
22
40
|
release,
|
|
23
41
|
environment,
|
|
24
42
|
debug,
|
|
43
|
+
dataCollection,
|
|
25
44
|
});
|
|
26
45
|
return Sentry;
|
|
27
46
|
};
|