@dineroregnskab/datadog 6.1.0 → 6.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"http-status-code-0.d.ts","sourceRoot":"","sources":["../../src/filters/http-status-code-0.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,qBAAqB,EAAE;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,SAAS,CAAC;CAQlB,CAAC"}
1
+ {"version":3,"file":"http-status-code-0.d.ts","sourceRoot":"","sources":["../../src/filters/http-status-code-0.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,qBAAqB,EAAE;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,SAAS,CAAC;CAwBlB,CAAC"}
@@ -1,10 +1,24 @@
1
1
  export const httpStatusCode0Filter = {
2
2
  logs: (log) => {
3
3
  var _a;
4
- return ((_a = log.http) === null || _a === void 0 ? void 0 : _a.status_code) === 0;
4
+ return (((_a = log.http) === null || _a === void 0 ? void 0 : _a.status_code) === 0 ||
5
+ // Fallback for wrapped HttpErrorResponse logs when the enricher
6
+ // didn't fire — log.message still carries the raw wrapper string.
7
+ log.message.startsWith('DineroHttpError 0 '));
5
8
  },
6
9
  rum: (event) => {
7
- return event.type === 'resource' && event.resource.status_code === 0;
10
+ var _a;
11
+ if (event.type === 'resource') {
12
+ return event.resource.status_code === 0;
13
+ }
14
+ if (event.type !== 'error') {
15
+ return false;
16
+ }
17
+ return (
18
+ // Enriched resource info from wrapped HttpErrorResponse errors.
19
+ ((_a = event.error.resource) === null || _a === void 0 ? void 0 : _a.status_code) === 0 ||
20
+ // Fallback for the same wrapped errors if the RUM enricher didn't fire.
21
+ event.error.message.startsWith('DineroHttpError 0 '));
8
22
  },
9
23
  };
10
24
  //# sourceMappingURL=http-status-code-0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-status-code-0.js","sourceRoot":"","sources":["../../src/filters/http-status-code-0.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,qBAAqB,GAG9B;IACA,IAAI,EAAE,CAAC,GAAc,EAAW,EAAE;;QAC9B,OAAO,CAAA,MAAA,GAAG,CAAC,IAAI,0CAAE,WAAW,MAAK,CAAC,CAAC;IACvC,CAAC;IACD,GAAG,EAAE,CAAC,KAAe,EAAW,EAAE;QAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,KAAK,CAAC,CAAC;IACzE,CAAC;CACJ,CAAC"}
1
+ {"version":3,"file":"http-status-code-0.js","sourceRoot":"","sources":["../../src/filters/http-status-code-0.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,qBAAqB,GAG9B;IACA,IAAI,EAAE,CAAC,GAAc,EAAW,EAAE;;QAC9B,OAAO,CACH,CAAA,MAAA,GAAG,CAAC,IAAI,0CAAE,WAAW,MAAK,CAAC;YAC3B,gEAAgE;YAChE,kEAAkE;YAClE,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAC/C,CAAC;IACN,CAAC;IACD,GAAG,EAAE,CAAC,KAAe,EAAW,EAAE;;QAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC,QAAQ,CAAC,WAAW,KAAK,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO;QACH,gEAAgE;QAChE,CAAA,MAAA,KAAK,CAAC,KAAK,CAAC,QAAQ,0CAAE,WAAW,MAAK,CAAC;YACvC,wEAAwE;YACxE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC,CACvD,CAAC;IACN,CAAC;CACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"status-401.d.ts","sourceRoot":"","sources":["../../src/filters/status-401.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,eAAe,EAAE;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,SAAS,CAAC;CAclB,CAAC"}
1
+ {"version":3,"file":"status-401.d.ts","sourceRoot":"","sources":["../../src/filters/status-401.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,eAAO,MAAM,eAAe,EAAE;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,GAAG,EAAE,SAAS,CAAC;CA0BlB,CAAC"}
@@ -1,12 +1,27 @@
1
1
  export const status401Filter = {
2
2
  logs: (log) => {
3
3
  var _a;
4
- return (log.message.includes('"status": 401') ||
4
+ return (
5
+ // Legacy raw HttpErrorResponse object serialization.
6
+ log.message.includes('"status": 401') ||
7
+ // Fallback for wrapped HttpErrorResponse logs when the enricher
8
+ // didn't fire — log.message carries the raw wrapper string.
9
+ log.message.startsWith('DineroHttpError 401 ') ||
5
10
  Boolean(((_a = log.http) === null || _a === void 0 ? void 0 : _a.status_code) === 401));
6
11
  },
7
12
  rum: (event) => {
8
- return (event.type === 'error' &&
9
- event.error.message.includes('"status": 401'));
13
+ var _a;
14
+ if (event.type !== 'error') {
15
+ return false;
16
+ }
17
+ return (
18
+ // Legacy raw HttpErrorResponse object serialization.
19
+ event.error.message.includes('"status": 401') ||
20
+ // Fallback for wrapped HttpErrorResponse RUM errors if the
21
+ // enricher didn't fire.
22
+ event.error.message.startsWith('DineroHttpError 401 ') ||
23
+ // Enriched resource info from wrapped HttpErrorResponse errors.
24
+ ((_a = event.error.resource) === null || _a === void 0 ? void 0 : _a.status_code) === 401);
10
25
  },
11
26
  };
12
27
  //# sourceMappingURL=status-401.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"status-401.js","sourceRoot":"","sources":["../../src/filters/status-401.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,eAAe,GAGxB;IACA,IAAI,EAAE,CAAC,GAAc,EAAW,EAAE;;QAC9B,OAAO,CACH,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;YACrC,OAAO,CAAC,CAAA,MAAA,GAAG,CAAC,IAAI,0CAAE,WAAW,MAAK,GAAG,CAAC,CACzC,CAAC;IACN,CAAC;IACD,GAAG,EAAE,CAAC,KAAe,EAAW,EAAE;QAC9B,OAAO,CACH,KAAK,CAAC,IAAI,KAAK,OAAO;YACtB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAChD,CAAC;IACN,CAAC;CACJ,CAAC"}
1
+ {"version":3,"file":"status-401.js","sourceRoot":"","sources":["../../src/filters/status-401.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,eAAe,GAGxB;IACA,IAAI,EAAE,CAAC,GAAc,EAAW,EAAE;;QAC9B,OAAO;QACH,qDAAqD;QACrD,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;YACrC,gEAAgE;YAChE,4DAA4D;YAC5D,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;YAC9C,OAAO,CAAC,CAAA,MAAA,GAAG,CAAC,IAAI,0CAAE,WAAW,MAAK,GAAG,CAAC,CACzC,CAAC;IACN,CAAC;IACD,GAAG,EAAE,CAAC,KAAe,EAAW,EAAE;;QAC9B,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACzB,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO;QACH,qDAAqD;QACrD,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;YAC7C,2DAA2D;YAC3D,wBAAwB;YACxB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;YACtD,gEAAgE;YAChE,CAAA,MAAA,KAAK,CAAC,KAAK,CAAC,QAAQ,0CAAE,WAAW,MAAK,GAAG,CAC5C,CAAC;IACN,CAAC;CACJ,CAAC"}
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  },
60
60
  "type": "module",
61
61
  "types": "./dist/index.d.ts",
62
- "version": "6.1.0"
62
+ "version": "6.1.2"
63
63
  }