@ddd-ts-kit/tracing 0.4.1 → 0.6.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.md CHANGED
@@ -272,7 +272,7 @@ A trace tells the story of an action and nothing else. The defaults, and the opt
272
272
 
273
273
  | What | Default | Option |
274
274
  |---|---|---|
275
- | Probes, metrics, documentation | no span for `/health`, `/healthz`, `/live`, `/livez`, `/ready`, `/readyz`, `/startup`, `/metrics`, `/docs`, `/openapi.json`, `/favicon.ico` and what is below them; no span for the documentation routes of `@ddd-ts-kit/http` wherever they are mounted | `initTracing({ ignoredPaths })`, `tracedRoutes({ ignore })` |
275
+ | Probes, metrics, documentation | no span for `/health`, `/healthz`, `/live`, `/livez`, `/ready`, `/readyz`, `/startup`, `/metrics`, `/docs`, `/openapi.json`, `/openapi` (the documents of a split contract), `/favicon.ico` and what is below them; no span for the documentation routes of `@ddd-ts-kit/http` wherever they are mounted | `initTracing({ ignoredPaths })`, `tracedRoutes({ ignore })` |
276
276
  | Outbox relay | no span per tick, none when nothing is published; the queries of its polling make no span (see the drivers) | |
277
277
  | Instrumentations on | `http` and `undici` and `grpc` (the two sides of a request), `pg`, `mysql2`, `mysql`, `mongodb`, `ioredis`, `redis` | `initTracing({ autoInstrumentations })`, or `instrumentations` to replace them all |
278
278
  | Database drivers | the statement as written, with its placeholders, never the values bound to them; only inside a trace (`requireParentSpan`), so a poller or a pool makes no trace of its own; no connection or pool checkout span (`ignoreConnectSpans`) | `autoInstrumentations` |
@@ -1 +1 @@
1
- {"version":3,"file":"is-noise-route.d.ts","sourceRoot":"","sources":["../../src/http/is-noise-route.ts"],"names":[],"mappings":"AAIA,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEpG"}
1
+ {"version":3,"file":"is-noise-route.d.ts","sourceRoot":"","sources":["../../src/http/is-noise-route.ts"],"names":[],"mappings":"AAKA,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEpG"}
@@ -1,7 +1,8 @@
1
1
  import { isNoisePath } from './is-noise-path.js';
2
- const DOCUMENTATION_OPERATIONS = new Set(['getOpenApiDocument', 'getOpenApiUi']);
2
+ /** The operations of the documentation routes of `@ddd-ts-kit/http`, one per document of a split contract (`getOpenApiUi_backOffice`). */
3
+ const DOCUMENTATION_OPERATION = /^(?:getOpenApiDocument|getOpenApiUi)(?:_\w+)?$/;
3
4
  /** A route nobody follows in a trace: probes, metrics, and the documentation routes of the kit. */
4
5
  export function isNoiseRoute(route) {
5
- return DOCUMENTATION_OPERATIONS.has(route.operationId) || isNoisePath(route.path);
6
+ return DOCUMENTATION_OPERATION.test(route.operationId) || isNoisePath(route.path);
6
7
  }
7
8
  //# sourceMappingURL=is-noise-route.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-noise-route.js","sourceRoot":"","sources":["../../src/http/is-noise-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC,CAAC;AAEjF,mGAAmG;AACnG,MAAM,UAAU,YAAY,CAAC,KAA8D;IACzF,OAAO,wBAAwB,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACpF,CAAC"}
1
+ {"version":3,"file":"is-noise-route.js","sourceRoot":"","sources":["../../src/http/is-noise-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,0IAA0I;AAC1I,MAAM,uBAAuB,GAAG,gDAAgD,CAAC;AAEjF,mGAAmG;AACnG,MAAM,UAAU,YAAY,CAAC,KAA8D;IACzF,OAAO,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACpF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"noise-paths.d.ts","sourceRoot":"","sources":["../../src/http/noise-paths.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAYxC,CAAC"}
1
+ {"version":3,"file":"noise-paths.d.ts","sourceRoot":"","sources":["../../src/http/noise-paths.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAaxC,CAAC"}
@@ -10,6 +10,7 @@ export const NOISE_PATHS = [
10
10
  '/metrics',
11
11
  '/docs',
12
12
  '/openapi.json',
13
+ '/openapi',
13
14
  '/favicon.ico',
14
15
  ];
15
16
  //# sourceMappingURL=noise-paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"noise-paths.js","sourceRoot":"","sources":["../../src/http/noise-paths.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,SAAS;IACT,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,UAAU;IACV,OAAO;IACP,eAAe;IACf,cAAc;CACf,CAAC"}
1
+ {"version":3,"file":"noise-paths.js","sourceRoot":"","sources":["../../src/http/noise-paths.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,SAAS;IACT,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,UAAU;IACV,OAAO;IACP,eAAe;IACf,UAAU;IACV,cAAc;CACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/tracing",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "description": "Non-invasive OpenTelemetry tracing: adapters are wrapped at the composition root, the domain never knows.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@ddd-ts-kit/kernel": "0.4.1"
37
+ "@ddd-ts-kit/kernel": "0.6.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@opentelemetry/api": "^1.9.0",
@@ -62,11 +62,11 @@
62
62
  }
63
63
  },
64
64
  "devDependencies": {
65
- "@ddd-ts-kit/audit": "0.4.1",
66
- "@ddd-ts-kit/di": "0.4.1",
67
- "@ddd-ts-kit/events": "0.4.1",
68
- "@ddd-ts-kit/http": "0.4.1",
69
- "@ddd-ts-kit/scheduling": "0.4.1",
65
+ "@ddd-ts-kit/audit": "0.6.0",
66
+ "@ddd-ts-kit/di": "0.6.0",
67
+ "@ddd-ts-kit/events": "0.6.0",
68
+ "@ddd-ts-kit/http": "0.6.0",
69
+ "@ddd-ts-kit/scheduling": "0.6.0",
70
70
  "@opentelemetry/api": "^1.9.1",
71
71
  "@opentelemetry/auto-instrumentations-node": "latest",
72
72
  "@opentelemetry/context-async-hooks": "^2.0.0",