nightingale-sentry 15.0.0 → 17.0.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/CHANGELOG.md +25 -0
- package/README.md +18 -18
- package/dist/definitions/index.d.ts +4 -4
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-browser.es.js +20 -29
- package/dist/index-browser.es.js.map +1 -1
- package/dist/{index-node18.mjs → index-node20.mjs} +20 -26
- package/dist/index-node20.mjs.map +1 -0
- package/package.json +33 -30
- package/src/index.ts +16 -16
- package/dist/index-node18.mjs.map +0 -1
- package/src/.eslintrc.json +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [17.0.0](https://github.com/christophehurpeau/nightingale/compare/v16.2.0...v17.0.0) (2025-10-20)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add export for react-native ([4098304](https://github.com/christophehurpeau/nightingale/commit/4098304ff9b6665930b7316fe05e0baf0b2e3fe5))
|
|
11
|
+
|
|
12
|
+
Version bump for dependency: nightingale-levels
|
|
13
|
+
Version bump for dependency: nightingale-types
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [16.0.0](https://github.com/christophehurpeau/nightingale/compare/v15.0.0...v16.0.0) (2025-03-30)
|
|
17
|
+
|
|
18
|
+
### ⚠ BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* drop node 18
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **deps:** update sentry ([dbbf42f](https://github.com/christophehurpeau/nightingale/commit/dbbf42fe7d52b4cb8de378bf284924cee33e68d6))
|
|
25
|
+
* drop node 18 ([1b11a55](https://github.com/christophehurpeau/nightingale/commit/1b11a55dd24c9435be50519a748316079f554414))
|
|
26
|
+
|
|
27
|
+
Version bump for dependency: nightingale-levels
|
|
28
|
+
Version bump for dependency: nightingale-types
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
## [15.0.0](https://github.com/christophehurpeau/nightingale/compare/v14.2.1...v15.0.0) (2023-12-25)
|
|
7
32
|
|
|
8
33
|
|
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<
|
|
1
|
+
<h1 align="center">
|
|
2
2
|
nightingale-sentry
|
|
3
|
-
</
|
|
3
|
+
</h1>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
Sentry handler for nightingale
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/npm/v/nightingale-sentry.svg?style=flat-square"></a>
|
|
11
|
-
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/npm/dw/nightingale-sentry.svg?style=flat-square"></a>
|
|
12
|
-
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/node/v/nightingale-sentry.svg?style=flat-square"></a>
|
|
13
|
-
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/npm/types/nightingale-sentry.svg?style=flat-square"></a>
|
|
10
|
+
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/npm/v/nightingale-sentry.svg?style=flat-square" alt="npm version"></a>
|
|
11
|
+
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/npm/dw/nightingale-sentry.svg?style=flat-square" alt="npm downloads"></a>
|
|
12
|
+
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/node/v/nightingale-sentry.svg?style=flat-square" alt="node version"></a>
|
|
13
|
+
<a href="https://npmjs.org/package/nightingale-sentry"><img src="https://img.shields.io/npm/types/nightingale-sentry.svg?style=flat-square" alt="types"></a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
16
|
## Install
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
addBreadcrumb,
|
|
28
28
|
captureException,
|
|
29
29
|
captureMessage,
|
|
30
|
-
} from
|
|
31
|
-
import { configure, Level, listenUnhandledErrors } from
|
|
32
|
-
import { SentryHandler } from
|
|
30
|
+
} from "@sentry/node";
|
|
31
|
+
import { configure, Level, listenUnhandledErrors } from "nightingale";
|
|
32
|
+
import { SentryHandler } from "nightingale-sentry";
|
|
33
33
|
|
|
34
34
|
listenUnhandledErrors();
|
|
35
35
|
|
|
36
36
|
sentryInit({
|
|
37
|
-
dsn: process.env.NODE_ENV ===
|
|
37
|
+
dsn: process.env.NODE_ENV === "production" ? "__DSN__" : undefined,
|
|
38
38
|
// ...
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -64,12 +64,12 @@ import {
|
|
|
64
64
|
addBreadcrumb,
|
|
65
65
|
captureException,
|
|
66
66
|
captureMessage,
|
|
67
|
-
} from
|
|
68
|
-
import { addConfig, Level } from
|
|
69
|
-
import SentryHandler from
|
|
67
|
+
} from "@sentry/browser";
|
|
68
|
+
import { addConfig, Level } from "nightingale-app";
|
|
69
|
+
import SentryHandler from "nightingale-sentry";
|
|
70
70
|
|
|
71
71
|
sentryInit({
|
|
72
|
-
dsn: process.env.NODE_ENV ===
|
|
72
|
+
dsn: process.env.NODE_ENV === "production" ? "__DSN__" : undefined,
|
|
73
73
|
// ...
|
|
74
74
|
});
|
|
75
75
|
|
|
@@ -94,12 +94,12 @@ import {
|
|
|
94
94
|
addBreadcrumb,
|
|
95
95
|
captureException,
|
|
96
96
|
captureMessage,
|
|
97
|
-
} from
|
|
98
|
-
import { configure, Level } from
|
|
99
|
-
import { SentryHandler } from
|
|
97
|
+
} from "@sentry/browser";
|
|
98
|
+
import { configure, Level } from "nightingale";
|
|
99
|
+
import { SentryHandler } from "nightingale-sentry";
|
|
100
100
|
|
|
101
101
|
sentryInit({
|
|
102
|
-
dsn: process.env.NODE_ENV ===
|
|
102
|
+
dsn: process.env.NODE_ENV === "production" ? "__DSN__" : undefined,
|
|
103
103
|
// ...
|
|
104
104
|
});
|
|
105
105
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { addBreadcrumb, captureException, captureMessage } from
|
|
2
|
-
import type { User } from
|
|
3
|
-
import { Level } from
|
|
4
|
-
import type {
|
|
1
|
+
import type { addBreadcrumb, captureException, captureMessage } from "@sentry/core";
|
|
2
|
+
import type { User } from "@sentry/types";
|
|
3
|
+
import { Level } from "nightingale-levels";
|
|
4
|
+
import type { Handle, Handler, LogRecord, Metadata } from "nightingale-types";
|
|
5
5
|
export interface MetadataWithError extends Metadata {
|
|
6
6
|
error?: Error;
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAiB,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAgB9E,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,OAAO,CAAC,EAAE,CAAC,CAAC,SAAS,iBAAiB,EACpC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,KACjB,IAAI,GAAG,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,CA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
|
|
10
|
-
[Level.CRITICAL]:
|
|
11
|
-
[Level.FATAL]:
|
|
12
|
-
[Level.EMERGENCY]:
|
|
4
|
+
[Level.TRACE]: "debug",
|
|
5
|
+
[Level.DEBUG]: "debug",
|
|
6
|
+
[Level.INFO]: "info",
|
|
7
|
+
[Level.NOTICE]: "log",
|
|
8
|
+
[Level.WARNING]: "warning",
|
|
9
|
+
[Level.ERROR]: "error",
|
|
10
|
+
[Level.CRITICAL]: "fatal",
|
|
11
|
+
[Level.FATAL]: "fatal",
|
|
12
|
+
[Level.EMERGENCY]: "fatal",
|
|
13
13
|
// not a level
|
|
14
|
-
[Level.ALL]:
|
|
14
|
+
[Level.ALL]: "error"
|
|
15
15
|
};
|
|
16
16
|
const createHandler = (Sentry, {
|
|
17
|
-
getUser = () =>
|
|
17
|
+
getUser = () => void 0,
|
|
18
18
|
getTags = () => ({}),
|
|
19
|
-
getBreadcrumbCategory = () =>
|
|
20
|
-
getBreadcrumbType = () =>
|
|
21
|
-
shouldSendAsException = record =>
|
|
22
|
-
|
|
23
|
-
return ((_record$metadata = record.metadata) == null ? void 0 : _record$metadata.error) !== undefined && record.metadata.unhandled !== true;
|
|
24
|
-
},
|
|
25
|
-
shouldSendAsBreadcrumb = () => false
|
|
19
|
+
getBreadcrumbCategory = () => void 0,
|
|
20
|
+
getBreadcrumbType = () => void 0,
|
|
21
|
+
shouldSendAsException = (record) => record.metadata?.error !== void 0 && record.metadata.unhandled !== true,
|
|
22
|
+
shouldSendAsBreadcrumb = (record) => false
|
|
26
23
|
} = {}) => {
|
|
27
|
-
return record => {
|
|
28
|
-
const {
|
|
29
|
-
key,
|
|
30
|
-
level,
|
|
31
|
-
metadata,
|
|
32
|
-
extra,
|
|
33
|
-
message
|
|
34
|
-
} = record;
|
|
24
|
+
return (record) => {
|
|
25
|
+
const { key, level, metadata, extra, message } = record;
|
|
35
26
|
if (shouldSendAsException(record)) {
|
|
36
|
-
const error =
|
|
27
|
+
const error = metadata?.error || record.message;
|
|
37
28
|
const extraData = {
|
|
38
29
|
nightingaleErrorMessage: message,
|
|
39
30
|
...metadata,
|
|
@@ -41,7 +32,7 @@ const createHandler = (Sentry, {
|
|
|
41
32
|
};
|
|
42
33
|
delete extraData.error;
|
|
43
34
|
Sentry.captureException(error, {
|
|
44
|
-
level: mapToSentryLevel[level] ||
|
|
35
|
+
level: mapToSentryLevel[level] || "error",
|
|
45
36
|
user: getUser(record),
|
|
46
37
|
tags: {
|
|
47
38
|
loggerKey: key,
|
|
@@ -51,7 +42,7 @@ const createHandler = (Sentry, {
|
|
|
51
42
|
});
|
|
52
43
|
} else if (shouldSendAsBreadcrumb(record)) {
|
|
53
44
|
Sentry.addBreadcrumb({
|
|
54
|
-
level: mapToSentryLevel[level] ||
|
|
45
|
+
level: mapToSentryLevel[level] || "error",
|
|
55
46
|
category: getBreadcrumbCategory(record),
|
|
56
47
|
type: getBreadcrumbType(record),
|
|
57
48
|
message: record.message,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import type {\n addBreadcrumb,\n captureException,\n captureMessage,\n} from
|
|
1
|
+
{"version":3,"file":"index-browser.es.js","sources":["../src/index.ts"],"sourcesContent":["import type {\n addBreadcrumb,\n captureException,\n captureMessage,\n} from \"@sentry/core\";\nimport type { SeverityLevel, User } from \"@sentry/types\";\nimport { Level } from \"nightingale-levels\";\nimport type { Handle, Handler, LogRecord, Metadata } from \"nightingale-types\";\n\nconst mapToSentryLevel: Record<Level, SeverityLevel> = {\n [Level.TRACE]: \"debug\",\n [Level.DEBUG]: \"debug\",\n [Level.INFO]: \"info\",\n [Level.NOTICE]: \"log\",\n [Level.WARNING]: \"warning\",\n [Level.ERROR]: \"error\",\n [Level.CRITICAL]: \"fatal\",\n [Level.FATAL]: \"fatal\",\n [Level.EMERGENCY]: \"fatal\",\n // not a level\n [Level.ALL]: \"error\",\n};\n\nexport interface MetadataWithError extends Metadata {\n error?: Error;\n}\n\nexport interface Options {\n getUser?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => User | undefined;\n getTags?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => Record<string, string>;\n getBreadcrumbCategory?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => string | undefined;\n getBreadcrumbType?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => string | undefined;\n shouldSendAsException?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => boolean;\n shouldSendAsBreadcrumb?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => boolean;\n}\n\nexport interface SentryRequiredMethods {\n addBreadcrumb: typeof addBreadcrumb;\n captureException: typeof captureException;\n captureMessage: typeof captureMessage;\n}\n\nconst createHandler = <S extends SentryRequiredMethods>(\n Sentry: S,\n {\n getUser = () => undefined,\n getTags = () => ({}),\n getBreadcrumbCategory = () => undefined,\n getBreadcrumbType = () => undefined,\n shouldSendAsException = <T extends Metadata>(record: LogRecord<T>) =>\n record.metadata?.error !== undefined &&\n record.metadata.unhandled !== true,\n shouldSendAsBreadcrumb = <T extends Metadata>(record: LogRecord<T>) =>\n false,\n }: Options = {},\n): Handle => {\n return <T extends MetadataWithError>(record: LogRecord<T>) => {\n const { key, level, metadata, extra, message } = record;\n\n if (shouldSendAsException(record)) {\n const error = metadata?.error || record.message;\n\n const extraData: Record<string, unknown> = {\n nightingaleErrorMessage: message,\n ...metadata,\n ...extra,\n };\n delete extraData.error;\n\n Sentry.captureException(error, {\n level: mapToSentryLevel[level] || \"error\",\n user: getUser(record),\n tags: {\n loggerKey: key,\n ...getTags(record),\n },\n extra: extraData,\n });\n } else if (shouldSendAsBreadcrumb(record)) {\n Sentry.addBreadcrumb({\n level: mapToSentryLevel[level] || \"error\",\n category: getBreadcrumbCategory(record),\n type: getBreadcrumbType(record),\n message: record.message,\n data: record.metadata,\n timestamp: record.datetime.getTime(),\n });\n }\n };\n};\n\nexport class SentryHandler<S extends SentryRequiredMethods> implements Handler {\n minLevel: Level;\n\n handle: Handle;\n\n constructor(Sentry: S, minLevel: Level, options?: Options) {\n this.minLevel = minLevel;\n this.handle = createHandler<S>(Sentry, options);\n }\n}\n"],"names":[],"mappings":";;AASA,MAAM,gBAAA,GAAiD;AAAA,EACrD,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,IAAI,GAAG,MAAA;AAAA,EACd,CAAC,KAAA,CAAM,MAAM,GAAG,KAAA;AAAA,EAChB,CAAC,KAAA,CAAM,OAAO,GAAG,SAAA;AAAA,EACjB,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,QAAQ,GAAG,OAAA;AAAA,EAClB,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,SAAS,GAAG,OAAA;AAAA;AAAA,EAEnB,CAAC,KAAA,CAAM,GAAG,GAAG;AACf,CAAA;AAiCA,MAAM,aAAA,GAAgB,CACpB,MAAA,EACA;AAAA,EACE,UAAU,MAAM,MAAA;AAAA,EAChB,OAAA,GAAU,OAAO,EAAC,CAAA;AAAA,EAClB,wBAAwB,MAAM,MAAA;AAAA,EAC9B,oBAAoB,MAAM,MAAA;AAAA,EAC1B,qBAAA,GAAwB,CAAqB,MAAA,KAC3C,MAAA,CAAO,UAAU,KAAA,KAAU,MAAA,IAC3B,MAAA,CAAO,QAAA,CAAS,SAAA,KAAc,IAAA;AAAA,EAChC,sBAAA,GAAyB,CAAqB,MAAA,KAC5C;AACJ,CAAA,GAAa,EAAC,KACH;AACX,EAAA,OAAO,CAA8B,MAAA,KAAyB;AAC5D,IAAA,MAAM,EAAE,GAAA,EAAK,KAAA,EAAO,QAAA,EAAU,KAAA,EAAO,SAAQ,GAAI,MAAA;AAEjD,IAAA,IAAI,qBAAA,CAAsB,MAAM,CAAA,EAAG;AACjC,MAAA,MAAM,KAAA,G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
|
-
[Level.TRACE]:
|
|
5
|
-
[Level.DEBUG]:
|
|
6
|
-
[Level.INFO]:
|
|
7
|
-
[Level.NOTICE]:
|
|
8
|
-
[Level.WARNING]:
|
|
9
|
-
[Level.ERROR]:
|
|
10
|
-
[Level.CRITICAL]:
|
|
11
|
-
[Level.FATAL]:
|
|
12
|
-
[Level.EMERGENCY]:
|
|
4
|
+
[Level.TRACE]: "debug",
|
|
5
|
+
[Level.DEBUG]: "debug",
|
|
6
|
+
[Level.INFO]: "info",
|
|
7
|
+
[Level.NOTICE]: "log",
|
|
8
|
+
[Level.WARNING]: "warning",
|
|
9
|
+
[Level.ERROR]: "error",
|
|
10
|
+
[Level.CRITICAL]: "fatal",
|
|
11
|
+
[Level.FATAL]: "fatal",
|
|
12
|
+
[Level.EMERGENCY]: "fatal",
|
|
13
13
|
// not a level
|
|
14
|
-
[Level.ALL]:
|
|
14
|
+
[Level.ALL]: "error"
|
|
15
15
|
};
|
|
16
16
|
const createHandler = (Sentry, {
|
|
17
|
-
getUser = () =>
|
|
17
|
+
getUser = () => void 0,
|
|
18
18
|
getTags = () => ({}),
|
|
19
|
-
getBreadcrumbCategory = () =>
|
|
20
|
-
getBreadcrumbType = () =>
|
|
21
|
-
shouldSendAsException = record => record.metadata?.error !==
|
|
22
|
-
shouldSendAsBreadcrumb = () => false
|
|
19
|
+
getBreadcrumbCategory = () => void 0,
|
|
20
|
+
getBreadcrumbType = () => void 0,
|
|
21
|
+
shouldSendAsException = (record) => record.metadata?.error !== void 0 && record.metadata.unhandled !== true,
|
|
22
|
+
shouldSendAsBreadcrumb = (record) => false
|
|
23
23
|
} = {}) => {
|
|
24
|
-
return record => {
|
|
25
|
-
const {
|
|
26
|
-
key,
|
|
27
|
-
level,
|
|
28
|
-
metadata,
|
|
29
|
-
extra,
|
|
30
|
-
message
|
|
31
|
-
} = record;
|
|
24
|
+
return (record) => {
|
|
25
|
+
const { key, level, metadata, extra, message } = record;
|
|
32
26
|
if (shouldSendAsException(record)) {
|
|
33
27
|
const error = metadata?.error || record.message;
|
|
34
28
|
const extraData = {
|
|
@@ -38,7 +32,7 @@ const createHandler = (Sentry, {
|
|
|
38
32
|
};
|
|
39
33
|
delete extraData.error;
|
|
40
34
|
Sentry.captureException(error, {
|
|
41
|
-
level: mapToSentryLevel[level] ||
|
|
35
|
+
level: mapToSentryLevel[level] || "error",
|
|
42
36
|
user: getUser(record),
|
|
43
37
|
tags: {
|
|
44
38
|
loggerKey: key,
|
|
@@ -48,7 +42,7 @@ const createHandler = (Sentry, {
|
|
|
48
42
|
});
|
|
49
43
|
} else if (shouldSendAsBreadcrumb(record)) {
|
|
50
44
|
Sentry.addBreadcrumb({
|
|
51
|
-
level: mapToSentryLevel[level] ||
|
|
45
|
+
level: mapToSentryLevel[level] || "error",
|
|
52
46
|
category: getBreadcrumbCategory(record),
|
|
53
47
|
type: getBreadcrumbType(record),
|
|
54
48
|
message: record.message,
|
|
@@ -66,4 +60,4 @@ class SentryHandler {
|
|
|
66
60
|
}
|
|
67
61
|
|
|
68
62
|
export { SentryHandler };
|
|
69
|
-
//# sourceMappingURL=index-
|
|
63
|
+
//# sourceMappingURL=index-node20.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-node20.mjs","sources":["../src/index.ts"],"sourcesContent":["import type {\n addBreadcrumb,\n captureException,\n captureMessage,\n} from \"@sentry/core\";\nimport type { SeverityLevel, User } from \"@sentry/types\";\nimport { Level } from \"nightingale-levels\";\nimport type { Handle, Handler, LogRecord, Metadata } from \"nightingale-types\";\n\nconst mapToSentryLevel: Record<Level, SeverityLevel> = {\n [Level.TRACE]: \"debug\",\n [Level.DEBUG]: \"debug\",\n [Level.INFO]: \"info\",\n [Level.NOTICE]: \"log\",\n [Level.WARNING]: \"warning\",\n [Level.ERROR]: \"error\",\n [Level.CRITICAL]: \"fatal\",\n [Level.FATAL]: \"fatal\",\n [Level.EMERGENCY]: \"fatal\",\n // not a level\n [Level.ALL]: \"error\",\n};\n\nexport interface MetadataWithError extends Metadata {\n error?: Error;\n}\n\nexport interface Options {\n getUser?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => User | undefined;\n getTags?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => Record<string, string>;\n getBreadcrumbCategory?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => string | undefined;\n getBreadcrumbType?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => string | undefined;\n shouldSendAsException?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => boolean;\n shouldSendAsBreadcrumb?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => boolean;\n}\n\nexport interface SentryRequiredMethods {\n addBreadcrumb: typeof addBreadcrumb;\n captureException: typeof captureException;\n captureMessage: typeof captureMessage;\n}\n\nconst createHandler = <S extends SentryRequiredMethods>(\n Sentry: S,\n {\n getUser = () => undefined,\n getTags = () => ({}),\n getBreadcrumbCategory = () => undefined,\n getBreadcrumbType = () => undefined,\n shouldSendAsException = <T extends Metadata>(record: LogRecord<T>) =>\n record.metadata?.error !== undefined &&\n record.metadata.unhandled !== true,\n shouldSendAsBreadcrumb = <T extends Metadata>(record: LogRecord<T>) =>\n false,\n }: Options = {},\n): Handle => {\n return <T extends MetadataWithError>(record: LogRecord<T>) => {\n const { key, level, metadata, extra, message } = record;\n\n if (shouldSendAsException(record)) {\n const error = metadata?.error || record.message;\n\n const extraData: Record<string, unknown> = {\n nightingaleErrorMessage: message,\n ...metadata,\n ...extra,\n };\n delete extraData.error;\n\n Sentry.captureException(error, {\n level: mapToSentryLevel[level] || \"error\",\n user: getUser(record),\n tags: {\n loggerKey: key,\n ...getTags(record),\n },\n extra: extraData,\n });\n } else if (shouldSendAsBreadcrumb(record)) {\n Sentry.addBreadcrumb({\n level: mapToSentryLevel[level] || \"error\",\n category: getBreadcrumbCategory(record),\n type: getBreadcrumbType(record),\n message: record.message,\n data: record.metadata,\n timestamp: record.datetime.getTime(),\n });\n }\n };\n};\n\nexport class SentryHandler<S extends SentryRequiredMethods> implements Handler {\n minLevel: Level;\n\n handle: Handle;\n\n constructor(Sentry: S, minLevel: Level, options?: Options) {\n this.minLevel = minLevel;\n this.handle = createHandler<S>(Sentry, options);\n }\n}\n"],"names":[],"mappings":";;AASA,MAAM,gBAAA,GAAiD;AAAA,EACrD,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,IAAI,GAAG,MAAA;AAAA,EACd,CAAC,KAAA,CAAM,MAAM,GAAG,KAAA;AAAA,EAChB,CAAC,KAAA,CAAM,OAAO,GAAG,SAAA;AAAA,EACjB,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,QAAQ,GAAG,OAAA;AAAA,EAClB,CAAC,KAAA,CAAM,KAAK,GAAG,OAAA;AAAA,EACf,CAAC,KAAA,CAAM,SAAS,GAAG,OAAA;AAAA;AAAA,EAEnB,CAAC,KAAA,CAAM,GAAG,GAAG;AACf,CAAA;AAiCA,MAAM,aAAA,GAAgB,CACpB,MAAA,EACA;AAAA,EACE,UAAU,MAAM,MAAA;AAAA,EAChB,OAAA,GAAU,OAAO,EAAC,CAAA;AAAA,EAClB,wBAAwB,MAAM,MAAA;AAAA,EAC9B,oBAAoB,MAAM,MAAA;AAAA,EAC1B,qBAAA,GAAwB,CAAqB,MAAA,KAC3C,MAAA,CAAO,UAAU,KAAA,KAAU,MAAA,IAC3B,MAAA,CAAO,QAAA,CAAS,SAAA,KAAc,IAAA;AAAA,EAChC,sBAAA,GAAyB,CAAqB,MAAA,KAC5C;AACJ,CAAA,GAAa,EAAC,KACH;AACX,EAAA,OAAO,CAA8B,MAAA,KAAyB;AAC5D,IAAA,MAAM,EAAE,GAAA,EAAK,KAAA,EAAO,QAAA,EAAU,KAAA,EAAO,SAAQ,GAAI,MAAA;AAEjD,IAAA,IAAI,qBAAA,CAAsB,M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2
|
"name": "nightingale-sentry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Sentry handler for nightingale",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nightingale",
|
|
@@ -16,18 +16,10 @@
|
|
|
16
16
|
"homepage": "https://github.com/christophehurpeau/nightingale",
|
|
17
17
|
"type": "module",
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=20.11.0"
|
|
20
20
|
},
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"defaults",
|
|
24
|
-
"> 0.2%",
|
|
25
|
-
"not ie < 12",
|
|
26
|
-
"not safari < 10",
|
|
27
|
-
"not ios_saf < 10"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"main": "./dist/index-node18.mjs",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"main": "./dist/index-node20.mjs",
|
|
31
23
|
"types": "./dist/definitions/index.d.ts",
|
|
32
24
|
"module": "./dist/index-browser.es.js",
|
|
33
25
|
"browser": "./dist/index-browser.es.js",
|
|
@@ -36,14 +28,16 @@
|
|
|
36
28
|
".": {
|
|
37
29
|
"types": "./dist/definitions/index.d.ts",
|
|
38
30
|
"node": {
|
|
39
|
-
"import": "./dist/index-
|
|
31
|
+
"import": "./dist/index-node20.mjs"
|
|
32
|
+
},
|
|
33
|
+
"react-native": {
|
|
34
|
+
"import": "./dist/index-browser.es.js"
|
|
40
35
|
},
|
|
41
36
|
"browser": {
|
|
42
37
|
"import": "./dist/index-browser.es.js"
|
|
43
38
|
}
|
|
44
39
|
}
|
|
45
40
|
},
|
|
46
|
-
"sideEffects": false,
|
|
47
41
|
"files": [
|
|
48
42
|
"src",
|
|
49
43
|
"dist"
|
|
@@ -52,36 +46,45 @@
|
|
|
52
46
|
"build": "yarn clean:build && rollup --config rollup.config.mjs && yarn run build:definitions",
|
|
53
47
|
"build:definitions": "tsc -p tsconfig.json",
|
|
54
48
|
"clean": "yarn clean:build",
|
|
55
|
-
"clean:build": "pob-
|
|
49
|
+
"clean:build": "pob-esbuild-clean-out dist",
|
|
56
50
|
"lint": "yarn run lint:eslint",
|
|
57
|
-
"lint:eslint": "yarn ../.. run eslint --
|
|
51
|
+
"lint:eslint": "yarn ../.. run eslint --quiet packages/nightingale-sentry",
|
|
58
52
|
"watch": "yarn clean:build && rollup --config rollup.config.mjs --watch"
|
|
59
53
|
},
|
|
60
|
-
"
|
|
54
|
+
"browserslist": {
|
|
55
|
+
"production": [
|
|
56
|
+
"defaults",
|
|
57
|
+
"> 0.2%",
|
|
58
|
+
"not ie < 12",
|
|
59
|
+
"not safari < 10",
|
|
60
|
+
"not ios_saf < 10"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
61
63
|
"pob": {
|
|
62
|
-
"
|
|
64
|
+
"bundler": "rollup-esbuild",
|
|
65
|
+
"entries": [
|
|
66
|
+
"index"
|
|
67
|
+
],
|
|
68
|
+
"envs": [
|
|
63
69
|
{
|
|
64
70
|
"target": "node",
|
|
65
|
-
"version": "
|
|
71
|
+
"version": "20"
|
|
66
72
|
},
|
|
67
73
|
{
|
|
68
74
|
"target": "browser"
|
|
69
75
|
}
|
|
70
76
|
],
|
|
71
|
-
"
|
|
72
|
-
"index"
|
|
73
|
-
]
|
|
77
|
+
"typescript": true
|
|
74
78
|
},
|
|
79
|
+
"prettier": "@pob/root/prettier-config",
|
|
75
80
|
"dependencies": {
|
|
76
|
-
"@sentry/core": "^7.
|
|
77
|
-
"@sentry/types": "^7.
|
|
78
|
-
"nightingale-levels": "
|
|
79
|
-
"nightingale-types": "
|
|
81
|
+
"@sentry/core": "^7.120.3",
|
|
82
|
+
"@sentry/types": "^7.120.3",
|
|
83
|
+
"nightingale-levels": "17.0.0",
|
|
84
|
+
"nightingale-types": "17.0.0"
|
|
80
85
|
},
|
|
81
86
|
"devDependencies": {
|
|
82
|
-
"@
|
|
83
|
-
"
|
|
84
|
-
"pob-babel": "38.0.0",
|
|
85
|
-
"typescript": "5.3.3"
|
|
87
|
+
"@pob/rollup-esbuild": "6.7.0",
|
|
88
|
+
"typescript": "5.9.2"
|
|
86
89
|
}
|
|
87
90
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,23 +2,23 @@ import type {
|
|
|
2
2
|
addBreadcrumb,
|
|
3
3
|
captureException,
|
|
4
4
|
captureMessage,
|
|
5
|
-
} from
|
|
6
|
-
import type {
|
|
7
|
-
import { Level } from
|
|
8
|
-
import type {
|
|
5
|
+
} from "@sentry/core";
|
|
6
|
+
import type { SeverityLevel, User } from "@sentry/types";
|
|
7
|
+
import { Level } from "nightingale-levels";
|
|
8
|
+
import type { Handle, Handler, LogRecord, Metadata } from "nightingale-types";
|
|
9
9
|
|
|
10
10
|
const mapToSentryLevel: Record<Level, SeverityLevel> = {
|
|
11
|
-
[Level.TRACE]:
|
|
12
|
-
[Level.DEBUG]:
|
|
13
|
-
[Level.INFO]:
|
|
14
|
-
[Level.NOTICE]:
|
|
15
|
-
[Level.WARNING]:
|
|
16
|
-
[Level.ERROR]:
|
|
17
|
-
[Level.CRITICAL]:
|
|
18
|
-
[Level.FATAL]:
|
|
19
|
-
[Level.EMERGENCY]:
|
|
11
|
+
[Level.TRACE]: "debug",
|
|
12
|
+
[Level.DEBUG]: "debug",
|
|
13
|
+
[Level.INFO]: "info",
|
|
14
|
+
[Level.NOTICE]: "log",
|
|
15
|
+
[Level.WARNING]: "warning",
|
|
16
|
+
[Level.ERROR]: "error",
|
|
17
|
+
[Level.CRITICAL]: "fatal",
|
|
18
|
+
[Level.FATAL]: "fatal",
|
|
19
|
+
[Level.EMERGENCY]: "fatal",
|
|
20
20
|
// not a level
|
|
21
|
-
[Level.ALL]:
|
|
21
|
+
[Level.ALL]: "error",
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export interface MetadataWithError extends Metadata {
|
|
@@ -80,7 +80,7 @@ const createHandler = <S extends SentryRequiredMethods>(
|
|
|
80
80
|
delete extraData.error;
|
|
81
81
|
|
|
82
82
|
Sentry.captureException(error, {
|
|
83
|
-
level: mapToSentryLevel[level] ||
|
|
83
|
+
level: mapToSentryLevel[level] || "error",
|
|
84
84
|
user: getUser(record),
|
|
85
85
|
tags: {
|
|
86
86
|
loggerKey: key,
|
|
@@ -90,7 +90,7 @@ const createHandler = <S extends SentryRequiredMethods>(
|
|
|
90
90
|
});
|
|
91
91
|
} else if (shouldSendAsBreadcrumb(record)) {
|
|
92
92
|
Sentry.addBreadcrumb({
|
|
93
|
-
level: mapToSentryLevel[level] ||
|
|
93
|
+
level: mapToSentryLevel[level] || "error",
|
|
94
94
|
category: getBreadcrumbCategory(record),
|
|
95
95
|
type: getBreadcrumbType(record),
|
|
96
96
|
message: record.message,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-node18.mjs","sources":["../src/index.ts"],"sourcesContent":["import type {\n addBreadcrumb,\n captureException,\n captureMessage,\n} from '@sentry/core';\nimport type { User, SeverityLevel } from '@sentry/types';\nimport { Level } from 'nightingale-levels';\nimport type { LogRecord, Handle, Metadata, Handler } from 'nightingale-types';\n\nconst mapToSentryLevel: Record<Level, SeverityLevel> = {\n [Level.TRACE]: 'debug',\n [Level.DEBUG]: 'debug',\n [Level.INFO]: 'info',\n [Level.NOTICE]: 'log',\n [Level.WARNING]: 'warning',\n [Level.ERROR]: 'error',\n [Level.CRITICAL]: 'fatal',\n [Level.FATAL]: 'fatal',\n [Level.EMERGENCY]: 'fatal',\n // not a level\n [Level.ALL]: 'error',\n};\n\nexport interface MetadataWithError extends Metadata {\n error?: Error;\n}\n\nexport interface Options {\n getUser?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => User | undefined;\n getTags?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => Record<string, string>;\n getBreadcrumbCategory?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => string | undefined;\n getBreadcrumbType?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => string | undefined;\n shouldSendAsException?: <T extends MetadataWithError>(\n record: LogRecord<T>,\n ) => boolean;\n shouldSendAsBreadcrumb?: <T extends Metadata>(\n record: LogRecord<T>,\n ) => boolean;\n}\n\nexport interface SentryRequiredMethods {\n addBreadcrumb: typeof addBreadcrumb;\n captureException: typeof captureException;\n captureMessage: typeof captureMessage;\n}\n\nconst createHandler = <S extends SentryRequiredMethods>(\n Sentry: S,\n {\n getUser = () => undefined,\n getTags = () => ({}),\n getBreadcrumbCategory = () => undefined,\n getBreadcrumbType = () => undefined,\n shouldSendAsException = <T extends Metadata>(record: LogRecord<T>) =>\n record.metadata?.error !== undefined &&\n record.metadata.unhandled !== true,\n shouldSendAsBreadcrumb = <T extends Metadata>(record: LogRecord<T>) =>\n false,\n }: Options = {},\n): Handle => {\n return <T extends MetadataWithError>(record: LogRecord<T>) => {\n const { key, level, metadata, extra, message } = record;\n\n if (shouldSendAsException(record)) {\n const error = metadata?.error || record.message;\n\n const extraData: Record<string, unknown> = {\n nightingaleErrorMessage: message,\n ...metadata,\n ...extra,\n };\n delete extraData.error;\n\n Sentry.captureException(error, {\n level: mapToSentryLevel[level] || 'error',\n user: getUser(record),\n tags: {\n loggerKey: key,\n ...getTags(record),\n },\n extra: extraData,\n });\n } else if (shouldSendAsBreadcrumb(record)) {\n Sentry.addBreadcrumb({\n level: mapToSentryLevel[level] || 'error',\n category: getBreadcrumbCategory(record),\n type: getBreadcrumbType(record),\n message: record.message,\n data: record.metadata,\n timestamp: record.datetime.getTime(),\n });\n }\n };\n};\n\nexport class SentryHandler<S extends SentryRequiredMethods> implements Handler {\n minLevel: Level;\n\n handle: Handle;\n\n constructor(Sentry: S, minLevel: Level, options?: Options) {\n this.minLevel = minLevel;\n this.handle = createHandler<S>(Sentry, options);\n }\n}\n"],"names":["mapToSentryLevel","Level","TRACE","DEBUG","INFO","NOTICE","WARNING","ERROR","CRITICAL","FATAL","EMERGENCY","ALL","createHandler","Sentry","getUser","undefined","getTags","getBreadcrumbCategory","getBreadcrumbType","shouldSendAsException","record","metadata","error","unhandled","shouldSendAsBreadcrumb","key","level","extra","message","extraData","nightingaleErrorMessage","captureException","user","tags","loggerKey","addBreadcrumb","category","type","data","timestamp","datetime","getTime","SentryHandler","constructor","minLevel","options","handle"],"mappings":";;AASA,MAAMA,gBAA8C,GAAG;AACrD,EAAA,CAACC,KAAK,CAACC,KAAK,GAAG,OAAO;AACtB,EAAA,CAACD,KAAK,CAACE,KAAK,GAAG,OAAO;AACtB,EAAA,CAACF,KAAK,CAACG,IAAI,GAAG,MAAM;AACpB,EAAA,CAACH,KAAK,CAACI,MAAM,GAAG,KAAK;AACrB,EAAA,CAACJ,KAAK,CAACK,OAAO,GAAG,SAAS;AAC1B,EAAA,CAACL,KAAK,CAACM,KAAK,GAAG,OAAO;AACtB,EAAA,CAACN,KAAK,CAACO,QAAQ,GAAG,OAAO;AACzB,EAAA,CAACP,KAAK,CAACQ,KAAK,GAAG,OAAO;AACtB,EAAA,CAACR,KAAK,CAACS,SAAS,GAAG,OAAO;AAC1B;EACA,CAACT,KAAK,CAACU,GAAG,GAAG,OAAA;AACf,CAAC,CAAA;AAiCD,MAAMC,aAAa,GAAGA,CACpBC,MAAS,EACT;EACEC,OAAO,GAAGA,MAAMC,SAAS;AACzBC,EAAAA,OAAO,GAAGA,OAAO,EAAE,CAAC;EACpBC,qBAAqB,GAAGA,MAAMF,SAAS;EACvCG,iBAAiB,GAAGA,MAAMH,SAAS;AACnCI,EAAAA,qBAAqB,GAAwBC,MAAoB,IAC/DA,MAAM,CAACC,QAAQ,EAAEC,KAAK,KAAKP,SAAS,IACpCK,MAAM,CAACC,QAAQ,CAACE,SAAS,KAAK,IAAI;EACpCC,sBAAsB,GAAGA,MACvB,KAAA;AACK,CAAC,GAAG,EAAE,KACJ;AACX,EAAA,OAAqCJ,MAAoB,IAAK;IAC5D,MAAM;MAAEK,GAAG;MAAEC,KAAK;MAAEL,QAAQ;MAAEM,KAAK;AAAEC,MAAAA,OAAAA;AAAQ,KAAC,GAAGR,MAAM,CAAA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,QAAQ,GAAGA,QAAQ,CAAA;IACxB,IAAI,CAACE,MAAM,GAAGlC,aAAa,CAAIC,MAAM,EAAEgC,OAAO,CAAC,CAAA;AACjD,GAAA;AACF;;;;"}
|
package/src/.eslintrc.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"parser": "@typescript-eslint/parser",
|
|
4
|
-
"parserOptions": {
|
|
5
|
-
"project": "packages/nightingale-sentry/tsconfig.json"
|
|
6
|
-
},
|
|
7
|
-
"plugins": ["@typescript-eslint"],
|
|
8
|
-
"extends": ["@pob/eslint-config-typescript"],
|
|
9
|
-
"ignorePatterns": ["*.d.ts"],
|
|
10
|
-
"overrides": [
|
|
11
|
-
{
|
|
12
|
-
"files": ["**/*.test.ts", "__tests__/**/*.ts"],
|
|
13
|
-
"extends": ["@pob/eslint-config-typescript/test"],
|
|
14
|
-
"env": {
|
|
15
|
-
"jest": true
|
|
16
|
-
},
|
|
17
|
-
"rules": {
|
|
18
|
-
"import/no-extraneous-dependencies": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
"devDependencies": true
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
}
|