@ddd-ts-kit/sentry 0.83.4 → 0.84.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/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:4e0553c362a45a3d -->
2
+ <!-- translation-of: README.md sha256:d3b6725c2c4de0c8 -->
3
3
 
4
4
  # @ddd-ts-kit/sentry
5
5
 
@@ -26,7 +26,7 @@ confie à l'`ErrorReporter` du noyau, le seul port que ce *package* implémente.
26
26
  ## Racine de composition
27
27
 
28
28
  ```ts
29
- // platform/errors.ts : importé en second, juste après platform/tracing.ts
29
+ // platform/observability/errors.ts : importé en second, juste après platform/observability/tracing.ts
30
30
  import { reportProcessFailures } from '@ddd-ts-kit/kernel';
31
31
  import { initSentry } from '@ddd-ts-kit/sentry';
32
32
  import { loadConfig } from '@/platform/config/load-config';
@@ -40,8 +40,8 @@ reportProcessFailures(errors); // uncaughtException et unhandledRejection : remo
40
40
 
41
41
  ```ts
42
42
  // main.ts
43
- import { tracing } from '@/platform/tracing'; // en premier
44
- import { errors } from '@/platform/errors'; // en second
43
+ import { tracing } from '@/platform/observability/tracing'; // en premier
44
+ import { errors } from '@/platform/observability/errors'; // en second
45
45
  import { DeadLetterReports, ExecutionScope } from '@ddd-ts-kit/kernel';
46
46
  import { createApplication, kernelModule } from '@ddd-ts-kit/di';
47
47
  import { reportHttpErrors } from '@ddd-ts-kit/http';
@@ -71,15 +71,15 @@ Trois lignes portent l'ensemble : `initSentry`, `errorReporter: errors`,
71
71
  letters) tiennent chacun en une ligne, pour qui les veut.
72
72
 
73
73
  `init --errors sentry` écrit exactement ces pièces, chacune dans son fichier :
74
- `platform/errors.ts` comme ci-dessus, avec `SENTRY_DSN`, `SENTRY_ENVIRONMENT` (par défaut :
74
+ `platform/observability/errors.ts` comme ci-dessus, avec `SENTRY_DSN`, `SENTRY_ENVIRONMENT` (par défaut :
75
75
  `NODE_ENV`), `SENTRY_RELEASE` et `SENTRY_SCRUB_MESSAGES` lus par
76
76
  `platform/config/load-config.ts` ; `errors` passé par `main.ts` à `composeApplication`, qui le
77
77
  donne à `kernelModule({ errorReporter })` ; `reportHttpErrors` dans
78
- `platform/auth/http-boundary.ts` ; `DeadLetterReports` dans
78
+ `platform/auth/authentication/http-boundary.ts` ; `DeadLetterReports` dans
79
79
  `platform/events/create-event-provider.ts` (le *broker*) et dans
80
80
  `platform/events/start-outbox-relay.ts` (une publication déclarée morte).
81
81
 
82
- **Ordre de chargement.** `platform/tracing.ts` reste le premier import : OpenTelemetry modifie
82
+ **Ordre de chargement.** `platform/observability/tracing.ts` reste le premier import : OpenTelemetry modifie
83
83
  `http` et les pilotes lorsqu'ils sont chargés, il doit donc s'exécuter avant eux. `initSentry` ne
84
84
  modifie rien, sa place ne change donc rien pour le traçage, quel que soit celui des deux qui
85
85
  démarre en premier (les deux ordres sont testés). Il vient en second pour qu'un échec pendant le
package/README.md CHANGED
@@ -23,7 +23,7 @@ it to the kernel `ErrorReporter`, the one port this package implements.
23
23
  ## Composition root
24
24
 
25
25
  ```ts
26
- // platform/errors.ts: imported second, right after platform/tracing.ts
26
+ // platform/observability/errors.ts: imported second, right after platform/observability/tracing.ts
27
27
  import { reportProcessFailures } from '@ddd-ts-kit/kernel';
28
28
  import { initSentry } from '@ddd-ts-kit/sentry';
29
29
  import { loadConfig } from '@/platform/config/load-config';
@@ -37,8 +37,8 @@ reportProcessFailures(errors); // uncaughtException and unhandledRejection: repo
37
37
 
38
38
  ```ts
39
39
  // main.ts
40
- import { tracing } from '@/platform/tracing'; // first
41
- import { errors } from '@/platform/errors'; // second
40
+ import { tracing } from '@/platform/observability/tracing'; // first
41
+ import { errors } from '@/platform/observability/errors'; // second
42
42
  import { DeadLetterReports, ExecutionScope } from '@ddd-ts-kit/kernel';
43
43
  import { createApplication, kernelModule } from '@ddd-ts-kit/di';
44
44
  import { reportHttpErrors } from '@ddd-ts-kit/http';
@@ -66,15 +66,15 @@ process.on('SIGTERM', () => void app.stop().then(() => tracing.shutdown()));
66
66
  Three lines carry it: `initSentry`, `errorReporter: errors`, `onError: reportHttpErrors(errors)`.
67
67
  The process handlers and the dead letters are one line each, for who wants them.
68
68
 
69
- `init --errors sentry` writes exactly these pieces, each in its file: `platform/errors.ts` as
69
+ `init --errors sentry` writes exactly these pieces, each in its file: `platform/observability/errors.ts` as
70
70
  above, with `SENTRY_DSN`, `SENTRY_ENVIRONMENT` (default: `NODE_ENV`), `SENTRY_RELEASE` and
71
71
  `SENTRY_SCRUB_MESSAGES` read by `platform/config/load-config.ts`; `errors` handed by `main.ts`
72
72
  to `composeApplication`, which gives it to `kernelModule({ errorReporter })`;
73
- `reportHttpErrors` in `platform/auth/http-boundary.ts`; `DeadLetterReports` in
73
+ `reportHttpErrors` in `platform/auth/authentication/http-boundary.ts`; `DeadLetterReports` in
74
74
  `platform/events/create-event-provider.ts` (the broker) and in
75
75
  `platform/events/start-outbox-relay.ts` (a publication declared dead).
76
76
 
77
- **Load order.** `platform/tracing.ts` stays the first import: OpenTelemetry patches `http` and
77
+ **Load order.** `platform/observability/tracing.ts` stays the first import: OpenTelemetry patches `http` and
78
78
  the drivers when they are loaded, so it must run before them. `initSentry` patches nothing, so
79
79
  its place changes nothing for tracing, whichever of the two starts first (both orders are
80
80
  tested). It goes second so that a failure while the rest of the application loads is already
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/sentry",
3
- "version": "0.83.4",
3
+ "version": "0.84.0",
4
4
  "description": "Error reporting to Sentry or GlitchTip behind the kernel ErrorReporter port: unexpected failures only, correlated with traces, scrubbed before sending.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -37,12 +37,12 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@ddd-ts-kit/kernel": "0.83.4"
40
+ "@ddd-ts-kit/kernel": "0.84.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@ddd-ts-kit/di": "0.83.4",
44
- "@ddd-ts-kit/http": "0.83.4",
45
- "@ddd-ts-kit/tracing": "0.83.4",
43
+ "@ddd-ts-kit/di": "0.84.0",
44
+ "@ddd-ts-kit/http": "0.84.0",
45
+ "@ddd-ts-kit/tracing": "0.84.0",
46
46
  "@opentelemetry/api": "^1.9.1",
47
47
  "@opentelemetry/sdk-trace-base": "^2.0.0",
48
48
  "@sentry/node": "^11.8.0"