@exodus/error-tracking 1.3.1 → 1.4.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 +6 -0
- package/README.md +2 -2
- package/module/remote-error-tracking.js +2 -4
- package/package.json +3 -2
- package/report/index.js +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
## [1.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/error-tracking@1.3.1...@exodus/error-tracking@1.4.0) (2025-02-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- move report.errorTracking to report.errors ([#11431](https://github.com/ExodusMovement/exodus-hydra/issues/11431)) ([d63b4e3](https://github.com/ExodusMovement/exodus-hydra/commit/d63b4e35660ce200da53cb8b035a20a24ce15508))
|
|
11
|
+
|
|
6
12
|
## [1.3.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/error-tracking@1.3.0...@exodus/error-tracking@1.3.1) (2025-01-09)
|
|
7
13
|
|
|
8
14
|
### License
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ yarn add @exodus/error-tracking
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/
|
|
13
|
+
This feature is designed to be used together with `@exodus/headless`. See [using the sdk](../../docs/development/using-the-sdk.md).
|
|
14
14
|
|
|
15
15
|
### Play with it
|
|
16
16
|
|
|
@@ -20,7 +20,7 @@ This feature is designed to be used together with `@exodus/headless`. See [using
|
|
|
20
20
|
|
|
21
21
|
### API Side
|
|
22
22
|
|
|
23
|
-
See [using the sdk](../../docs/
|
|
23
|
+
See [using the sdk](../../docs/development/using-the-sdk.md#setup-the-api-side) for more details on how features plug into the SDK and the API interface in the [type declaration](./api/index.d.ts).
|
|
24
24
|
|
|
25
25
|
```ts
|
|
26
26
|
await exodus.errors.track({ namespace, error, context: {} })
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import createSentryClient from '@exodus/sentry-client'
|
|
2
|
-
import stackTraceParser from '@exodus/sentry-client/src/stack-trace-parsers/default.js'
|
|
3
2
|
import createFetchival from '@exodus/fetch/create-fetchival'
|
|
4
3
|
|
|
5
4
|
export const remoteErrorTrackingDefinition = {
|
|
6
5
|
id: 'remoteErrorTracking',
|
|
7
6
|
type: 'module',
|
|
8
|
-
factory: ({ config, fetch
|
|
7
|
+
factory: ({ config, fetch }) => {
|
|
9
8
|
const fetchival = createFetchival({ fetch })
|
|
10
9
|
return createSentryClient({
|
|
11
10
|
config,
|
|
12
11
|
fetchival,
|
|
13
|
-
defaultStackTraceParser: defaultStackTraceParser || stackTraceParser,
|
|
14
12
|
})
|
|
15
13
|
},
|
|
16
|
-
dependencies: ['config', 'fetch'
|
|
14
|
+
dependencies: ['config', 'fetch'],
|
|
17
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/error-tracking",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple error tracking package to let any feature collect errors and create the report",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@exodus/atoms": "^9.0.0",
|
|
36
|
+
"@exodus/errors": "^1.2.0",
|
|
36
37
|
"@exodus/fetch": "^1.3.1",
|
|
37
38
|
"@exodus/sentry-client": "^3.2.0",
|
|
38
39
|
"@exodus/typeforce": "^1.19.0"
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"publishConfig": {
|
|
41
42
|
"access": "public"
|
|
42
43
|
},
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "754f0804c3f5bd785cf46e514d9cd6558f015ab7"
|
|
44
45
|
}
|
package/report/index.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
import { SafeError } from '@exodus/errors'
|
|
2
|
+
|
|
1
3
|
const errorTrackingReportDefinition = {
|
|
2
4
|
type: 'report',
|
|
3
5
|
id: 'errorTrackingReport',
|
|
4
6
|
factory: ({ errorsAtom }) => ({
|
|
5
|
-
namespace: '
|
|
7
|
+
namespace: 'errors',
|
|
6
8
|
export: async () => {
|
|
7
|
-
|
|
9
|
+
const { errors } = await errorsAtom.get()
|
|
10
|
+
return {
|
|
11
|
+
errors: errors.map(({ namespace, error, context, time }) => ({
|
|
12
|
+
namespace,
|
|
13
|
+
error: SafeError.from(error),
|
|
14
|
+
time,
|
|
15
|
+
})),
|
|
16
|
+
}
|
|
8
17
|
},
|
|
9
18
|
}),
|
|
10
19
|
dependencies: ['errorsAtom'],
|