mblabs-roccato-backend-commons 1.0.73 → 1.0.74

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.
@@ -8,7 +8,7 @@ export declare namespace ElasticAPM {
8
8
  namespace Init {
9
9
  interface Request {
10
10
  data: {
11
- type: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
11
+ type?: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
12
12
  };
13
13
  credentials: Credentials;
14
14
  }
@@ -16,7 +16,7 @@ export declare namespace ElasticAPM {
16
16
  namespace CaptureError {
17
17
  interface Request {
18
18
  data: {
19
- type: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
19
+ type?: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
20
20
  error: Error | string;
21
21
  };
22
22
  credentials: Credentials;
@@ -14,9 +14,10 @@ class ElasticAPMService {
14
14
  environment: credentials.environment,
15
15
  secretToken: credentials.secretToken,
16
16
  captureBody: 'all',
17
- logLevel: data.type,
17
+ logLevel: data.type ?? 'off',
18
18
  active: true,
19
19
  verifyServerCert: false,
20
+ ignoreUrls: ['/docs', '/health'],
20
21
  });
21
22
  }
22
23
  captureError({ data, credentials }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mblabs-roccato-backend-commons",
3
- "version": "1.0.73",
3
+ "version": "1.0.74",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@ export namespace ElasticAPM {
9
9
  export namespace Init {
10
10
  export interface Request {
11
11
  data: {
12
- type: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
12
+ type?: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
13
13
  };
14
14
  credentials: Credentials;
15
15
  }
@@ -18,7 +18,7 @@ export namespace ElasticAPM {
18
18
  export namespace CaptureError {
19
19
  export interface Request {
20
20
  data: {
21
- type: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
21
+ type?: 'trace' | 'debug' | 'info' | 'warn' | 'warning' | 'error' | 'fatal' | 'critical' | 'off';
22
22
  error: Error | string;
23
23
  };
24
24
  credentials: Credentials;
@@ -13,9 +13,10 @@ class ElasticAPMService implements IElasticAPMService {
13
13
  environment: credentials.environment,
14
14
  secretToken: credentials.secretToken,
15
15
  captureBody: 'all',
16
- logLevel: data.type,
16
+ logLevel: data.type ?? 'off',
17
17
  active: true,
18
18
  verifyServerCert: false,
19
+ ignoreUrls: [ '/docs', '/health' ],
19
20
  });
20
21
  }
21
22