@ddd-ts-kit/tracing 0.113.1 → 0.114.1

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.
Files changed (3) hide show
  1. package/README.fr.md +4 -4
  2. package/README.md +3 -3
  3. package/package.json +10 -10
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:894394a51f0a6fd8 -->
2
+ <!-- translation-of: README.md sha256:4b58791f6366f83c -->
3
3
 
4
4
  # @ddd-ts-kit/tracing
5
5
 
@@ -16,7 +16,7 @@ npm i @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/auto-instr
16
16
  npm i -D @opentelemetry/sdk-trace @opentelemetry/context-async-hooks
17
17
  ```
18
18
 
19
- ![La place du package : la plateforme enveloppe chaque endroit où le travail entre dans un contexte délimité ou en sort, et chaque enveloppe ouvre une sorte de span. tracedRoutes autour du pipeline HTTP ouvre le span SERVER de la requête HTTP. traceApplication, donné une fois à kernelModule, réunit les enveloppes qui ouvrent des spans : traceUseCases sur les bus ouvre les spans command et query, traceBindings sur les repositories, les gateways et les gestionnaires ouvre leurs spans, tracedDomainEvents sur le répartiteur des événements du domaine ouvre les spans unit-of-work et domain-event, tracedPublisher sur le publisher du noyau ouvre outbox append, tracedConsumer ouvre process, et tracedJob et tracedBackgroundJob ouvrent job ; il confie aussi au traçage le rapporteur d'erreurs et la portée d'exécution. tracedPublisher autour du publisher du relais de l'outbox ouvre publish. initTracing démarre le SDK OpenTelemetry avec ses instrumentations et ses processeurs de spans, et exporte en OTLP vers Jaeger ou un collecteur. Le code des contextes n'en importe rien](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-place.fr.svg)
19
+ ![La place du package : la plateforme enveloppe chaque endroit où le travail entre dans un contexte délimité ou en sort, et chaque enveloppe ouvre une sorte de span. tracedRoutes autour du pipeline HTTP ouvre le span SERVER de la requête HTTP. traceApplication, donné une fois à kernelModule, réunit les enveloppes qui ouvrent des spans : traceUseCases sur les bus ouvre les spans command et query, traceBindings sur les repositories, les gateways et les gestionnaires ouvre leurs spans, tracedDomainEvents sur le répartiteur des événements du domaine ouvre les spans unit-of-work et domain-event, tracedPublisher sur le publisher du noyau ouvre outbox append, tracedConsumer ouvre process, et tracedJob et tracedBackgroundJob ouvrent job ; il confie aussi au traçage le rapporteur d'erreurs et la portée d'exécution. tracedPublisher autour du publisher du relais de l'outbox ouvre publish. initTracing démarre le SDK OpenTelemetry avec ses instrumentations et ses processeurs de spans, et exporte en OTLP vers Jaeger ou un collecteur. Le code des contextes n'en importe rien](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-place.fr.svg)
20
20
 
21
21
  Chaque *span* d'une trace est ouvert par l'un de ces quelques endroits, tous dans la plateforme.
22
22
  Le domaine, l'application et les adaptateurs d'un contexte restent de simples classes, ce que
@@ -260,7 +260,7 @@ l'enregistrement, jamais de la boucle du relais, et appose son propre *span* sur
260
260
  bien que les consommateurs sont ses enfants. Un tour qui ne trouve rien à publier ne crée aucun
261
261
  *span*, et il n'y a pas de *span* par tour.
262
262
 
263
- ![Une seule trace à travers deux chaînes d'appels. Dans la requête HTTP, le span POST /appointments contient la commande, qui contient, à travers les spans unit-of-work, domain-event et handler, outbox append ; outbox append appose son propre traceparent sur l'événement, et l'outbox le stocke avec l'enregistrement. Plus tard, le relais réclame l'enregistrement depuis un minuteur, sans span à lui ; tracedPublisher ouvre publish comme enfant du span que nomme l'enregistrement, et appose son propre traceparent sur le message, dans l'enveloppe et dans un en-tête. Chaque consommateur ouvre process comme enfant de publish. L'identifiant de trace est le même de la requête HTTP jusqu'aux consommateurs](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-across-the-outbox.fr.svg)
263
+ ![Une seule trace à travers deux chaînes d'appels. Dans la requête HTTP, le span POST /appointments contient la commande, qui contient, à travers les spans unit-of-work, domain-event et handler, outbox append ; outbox append appose son propre traceparent sur l'événement, et l'outbox le stocke avec l'enregistrement. Plus tard, le relais réclame l'enregistrement depuis un minuteur, sans span à lui ; tracedPublisher ouvre publish comme enfant du span que nomme l'enregistrement, et appose son propre traceparent sur le message, dans l'enveloppe et dans un en-tête. Chaque consommateur ouvre process comme enfant de publish. L'identifiant de trace est le même de la requête HTTP jusqu'aux consommateurs](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-across-the-outbox.fr.svg)
264
264
 
265
265
  Un événement sans `traceparent` (stocké avant que le traçage soit configuré) poursuit plutôt le
266
266
  *span* actif.
@@ -274,7 +274,7 @@ comme une référence à suivre d'un clic, un consommateur à la fois. Choisisse
274
274
  retenté si longtemps, qu'une trace ne finirait jamais : chaque livraison est alors la racine de
275
275
  sa propre trace, liée à la publication.
276
276
 
277
- ![Les deux façons dont un consommateur se rattache à la publication. Avec consumers: continue, le défaut, les spans process des deux consommateurs sont des enfants de publish, dans la trace de la requête HTTP : une action est une trace. Avec consumers: link, publish termine la trace de la requête HTTP, et chaque livraison démarre une trace à elle, dont le span racine process porte un lien vers publish](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-continue-or-link.fr.svg)
277
+ ![Les deux façons dont un consommateur se rattache à la publication. Avec consumers: continue, le défaut, les spans process des deux consommateurs sont des enfants de publish, dans la trace de la requête HTTP : une action est une trace. Avec consumers: link, publish termine la trace de la requête HTTP, et chaque livraison démarre une trace à elle, dont le span racine process porte un lien vers publish](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-continue-or-link.fr.svg)
278
278
 
279
279
  **Les livraisons.** Un fournisseur dit à chaque gestionnaire de quelle livraison il s'agit
280
280
  (`EventDelivery` du noyau : tentative, dernière tentative, transport, source, consommateur), et
package/README.md CHANGED
@@ -14,7 +14,7 @@ npm i @opentelemetry/sdk-node @opentelemetry/resources @opentelemetry/auto-instr
14
14
  npm i -D @opentelemetry/sdk-trace @opentelemetry/context-async-hooks
15
15
  ```
16
16
 
17
- ![Where the package sits: the platform wraps each place where work enters or leaves a bounded context, and each wrapper opens one kind of span. tracedRoutes around the HTTP pipeline opens the SERVER span of the request. traceApplication, given once to kernelModule, holds the wrappers that open spans: traceUseCases on the buses opens command and query spans, traceBindings on repositories, gateways and handlers opens their spans, tracedDomainEvents on the domain event dispatcher opens the unit-of-work and domain-event spans, tracedPublisher on the publisher of the kernel opens outbox append, tracedConsumer opens process, and tracedJob and tracedBackgroundJob open job; it also hands the error reporter and the execution scope to the tracing. tracedPublisher around the publisher of the outbox relay opens publish. initTracing starts the OpenTelemetry SDK with its instrumentations and span processors, and exports over OTLP to Jaeger or a collector. The code of the contexts imports none of it](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-place.svg)
17
+ ![Where the package sits: the platform wraps each place where work enters or leaves a bounded context, and each wrapper opens one kind of span. tracedRoutes around the HTTP pipeline opens the SERVER span of the request. traceApplication, given once to kernelModule, holds the wrappers that open spans: traceUseCases on the buses opens command and query spans, traceBindings on repositories, gateways and handlers opens their spans, tracedDomainEvents on the domain event dispatcher opens the unit-of-work and domain-event spans, tracedPublisher on the publisher of the kernel opens outbox append, tracedConsumer opens process, and tracedJob and tracedBackgroundJob open job; it also hands the error reporter and the execution scope to the tracing. tracedPublisher around the publisher of the outbox relay opens publish. initTracing starts the OpenTelemetry SDK with its instrumentations and span processors, and exports over OTLP to Jaeger or a collector. The code of the contexts imports none of it](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-place.svg)
18
18
 
19
19
  Every span of a trace is opened by one of these few places, all of them in the platform. The
20
20
  domain, the application and the adapters of a context stay plain classes, which the rule
@@ -248,7 +248,7 @@ makes `publish <type>` a child of what the record names, never of the loop of th
248
248
  stamps its own span on what goes out, so the consumers are its children. A tick that finds
249
249
  nothing to publish makes no span, and there is no span per tick.
250
250
 
251
- ![One trace across two call chains. In the request, the span POST /appointments contains the command, which contains, through the unit-of-work, domain-event and handler spans, outbox append; outbox append stamps its own traceparent on the event, and the outbox stores it with the record. Later, the relay claims the record from a timer, with no span of its own; tracedPublisher opens publish as a child of the span the record names, and stamps its own traceparent on the message, in the envelope and in a header. Each consumer opens process as a child of publish. The trace id is the same from the request to the consumers](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-across-the-outbox.svg)
251
+ ![One trace across two call chains. In the request, the span POST /appointments contains the command, which contains, through the unit-of-work, domain-event and handler spans, outbox append; outbox append stamps its own traceparent on the event, and the outbox stores it with the record. Later, the relay claims the record from a timer, with no span of its own; tracedPublisher opens publish as a child of the span the record names, and stamps its own traceparent on the message, in the envelope and in a header. Each consumer opens process as a child of publish. The trace id is the same from the request to the consumers](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-across-the-outbox.svg)
252
252
 
253
253
  An event without `traceparent` (stored before tracing was configured) continues the active
254
254
  span instead.
@@ -261,7 +261,7 @@ time. Choose `consumers: 'link'` for a system where one event fans out to so man
261
261
  or is retried for so long, that a trace would never end: each delivery is then the root of its
262
262
  own trace, linked to the publication.
263
263
 
264
- ![The two ways a consumer relates to the publication. With consumers: continue, the default, the process spans of the two consumers are children of publish, in the trace of the request: one action is one trace. With consumers: link, publish ends the trace of the request, and each delivery starts a trace of its own, whose root process span carries a link to publish](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-continue-or-link.svg)
264
+ ![The two ways a consumer relates to the publication. With consumers: continue, the default, the process spans of the two consumers are children of publish, in the trace of the request: one action is one trace. With consumers: link, publish ends the trace of the request, and each delivery starts a trace of its own, whose root process span carries a link to publish](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/tracing-package-continue-or-link.svg)
265
265
 
266
266
  **Deliveries.** A provider tells each handler which delivery this is (`EventDelivery` of the
267
267
  kernel: attempt, last attempt, transport, source, consumer), and each attempt is a span of its
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/tracing",
3
- "version": "0.113.1",
3
+ "version": "0.114.1",
4
4
  "description": "Non-invasive OpenTelemetry tracing: adapters are wrapped at the composition root, the domain never knows.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -16,11 +16,11 @@
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/gbourgeat/ddd-ts-kit.git",
19
+ "url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
20
20
  "directory": "packages/tracing"
21
21
  },
22
- "homepage": "https://gbourgeat.github.io/ddd-ts-kit/packages/tracing/",
23
- "bugs": "https://github.com/gbourgeat/ddd-ts-kit/issues",
22
+ "homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/tracing/",
23
+ "bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
24
24
  "publishConfig": {
25
25
  "access": "public",
26
26
  "provenance": true
@@ -48,7 +48,7 @@
48
48
  "dist"
49
49
  ],
50
50
  "dependencies": {
51
- "@ddd-ts-kit/kernel": "0.113.1"
51
+ "@ddd-ts-kit/kernel": "0.114.1"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@opentelemetry/api": "^1.10.0",
@@ -88,11 +88,11 @@
88
88
  }
89
89
  },
90
90
  "devDependencies": {
91
- "@ddd-ts-kit/audit": "0.113.1",
92
- "@ddd-ts-kit/di": "0.113.1",
93
- "@ddd-ts-kit/events": "0.113.1",
94
- "@ddd-ts-kit/http": "0.113.1",
95
- "@ddd-ts-kit/scheduling": "0.113.1",
91
+ "@ddd-ts-kit/audit": "0.114.1",
92
+ "@ddd-ts-kit/di": "0.114.1",
93
+ "@ddd-ts-kit/events": "0.114.1",
94
+ "@ddd-ts-kit/http": "0.114.1",
95
+ "@ddd-ts-kit/scheduling": "0.114.1",
96
96
  "@opentelemetry/api": "^1.10.0",
97
97
  "@opentelemetry/auto-instrumentations-node": "^0.83.0",
98
98
  "@opentelemetry/context-async-hooks": "^3.1.0",