@application-kit/observability 0.8.0 → 0.8.2

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @application-kit/observability
2
2
 
3
+ ## 0.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 7698ce1: Peer-зависимость `graphql` принимает 17. E2e-конфиг `@application-kit/testing` направляет алиас `graphql` на файл, который отдаёт `require` из корня приложения, а не на CJS-вход: с graphql 17 нативный `require` во внешнем `mercurius` получает ESM-сборку, и прежний алиас давал второй экземпляр — правило запрета introspection молча пропускало `__schema`. Приложению без `graphql` алиас не ставится.
8
+
9
+ ## 0.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - fd54b47: Peer-зависимости принимают `@nestjs/typeorm` 12, у `@application-kit/observability` ещё и `@nestjs/terminus` 12. С `@nestjs/typeorm` 12 readiness-проверке observability нужен `@nestjs/terminus` 12: 11.x импортирует `@nestjs/typeorm/dist/*`, а карта `exports` typeorm 12 этот путь закрывает, и `/health/ready` отвечает 500.
14
+ - Updated dependencies [fd54b47]
15
+ - @application-kit/typeorm@0.5.1
16
+
3
17
  ## 0.8.0
4
18
 
5
19
  ### Minor Changes
package/README.md CHANGED
@@ -156,8 +156,14 @@ const clientIp = resolveClientIp(request, { trustedHeaders: ['cf-connecting-ip']
156
156
 
157
157
  Вызов — в отдельном файле, который бандлер собирает в свой выход и который процесс грузит флагом рантайма
158
158
  `node --import ./tracing.mjs`: инструментации патчат модули в момент загрузки, а ESM выполняет все `import` бандла до
159
- его первой строки, поэтому импорт из кода приложения опоздал бы. Вход только ESM — `module.register` есть лишь у
160
- ESM-загрузчика.
159
+ его первой строки, поэтому импорт из кода приложения опоздал бы. Вход только ESM: его грузит `--import`, и хук
160
+ `import-in-the-middle/register-hooks.mjs` — тоже ESM.
161
+
162
+ ESM-хук ставится синхронным `module.registerHooks()` в потоке приложения. Такие хуки есть в Node с 24.11.1 и 25.1.0,
163
+ отсюда `engines` пакета. `import-in-the-middle` — peer: загрузчик и `Hook()` инструментаций делят состояние модуля, поэтому
164
+ у приложения он должен быть одной копией с `@opentelemetry/instrumentation`. Со второй копией модули из `esmHookedModules`
165
+ молча остаются без спанов. Проверка — `grep -c '^"import-in-the-middle@' yarn.lock` → `1`; иначе
166
+ `yarn dedupe import-in-the-middle`.
161
167
 
162
168
  - `esmHookedModules` — пакеты, которые бандл импортирует как ESM (например `kafkajs`): до них не дотягивается
163
169
  require-in-the-middle. Хук без списка обернул бы и чанки самого бандла и порвал бы им live-binding.
@@ -179,4 +185,4 @@ startTracing({
179
185
  ```
180
186
 
181
187
  Версии `@opentelemetry/*` с номером `0.x` выходят одним релизом и между собой совместимы только в пределах одного минора:
182
- `sdk-node`, `instrumentation`, `instrumentation-http` и `exporter-trace-otlp-grpc` ставятся одной версией `0.221.x`.
188
+ `sdk-node`, `instrumentation`, `instrumentation-http` и `exporter-trace-otlp-grpc` ставятся одной версией `0.300.x`.
@@ -1,4 +1,5 @@
1
- import { DiskHealthIndicator, HealthIndicatorFunction, MemoryHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
1
+ import type { HealthIndicatorResult } from '@nestjs/terminus';
2
+ import { DiskHealthIndicator, MemoryHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
2
3
  import { HealthConfig } from './health.config.js';
3
4
  export declare class HealthChecks {
4
5
  private readonly database;
@@ -6,5 +7,5 @@ export declare class HealthChecks {
6
7
  private readonly disk;
7
8
  private readonly config;
8
9
  constructor(database: TypeOrmHealthIndicator, memory: MemoryHealthIndicator, disk: DiskHealthIndicator, config: HealthConfig);
9
- build(): HealthIndicatorFunction[];
10
+ build(): (() => Promise<HealthIndicatorResult>)[];
10
11
  }
@@ -1,4 +1,5 @@
1
- import { DiskHealthIndicator, HealthIndicatorFunction, MemoryHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
1
+ import type { HealthIndicatorResult } from '@nestjs/terminus';
2
+ import { DiskHealthIndicator, MemoryHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
2
3
  import { HealthConfig } from './health.config.js';
3
4
  export declare class HealthChecks {
4
5
  private readonly database;
@@ -6,5 +7,5 @@ export declare class HealthChecks {
6
7
  private readonly disk;
7
8
  private readonly config;
8
9
  constructor(database: TypeOrmHealthIndicator, memory: MemoryHealthIndicator, disk: DiskHealthIndicator, config: HealthConfig);
9
- build(): HealthIndicatorFunction[];
10
+ build(): (() => Promise<HealthIndicatorResult>)[];
10
11
  }
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { Inject, Injectable } from '@nestjs/common';
14
- import { DiskHealthIndicator, MemoryHealthIndicator, TypeOrmHealthIndicator, } from '@nestjs/terminus';
14
+ import { DiskHealthIndicator, MemoryHealthIndicator, TypeOrmHealthIndicator } from '@nestjs/terminus';
15
15
  import { HealthConfig } from './health.config.js';
16
16
  let HealthChecks = class HealthChecks {
17
17
  database;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@application-kit/observability",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Наблюдаемость NestJS-процесса: метрики Prometheus и RED-гистограммы, health-чеки и пробы, опции pino с request-id и trace-контекстом, логирование CQRS-шин, реальный IP клиента за прокси, трейсинг OpenTelemetry",
5
5
  "keywords": [
6
6
  "cqrs",
@@ -122,7 +122,7 @@
122
122
  "test:unit": "vitest run"
123
123
  },
124
124
  "dependencies": {
125
- "@application-kit/typeorm": "^0.5.0"
125
+ "@application-kit/typeorm": "^0.5.1"
126
126
  },
127
127
  "devDependencies": {
128
128
  "@nestjs/common": "^11.2.7",
@@ -130,9 +130,9 @@
130
130
  "@nestjs/cqrs": "^11.0.3",
131
131
  "@nestjs/graphql": "^13.4.5",
132
132
  "@nestjs/platform-fastify": "^11.2.7",
133
- "@nestjs/terminus": "^11.1.1",
133
+ "@nestjs/terminus": "^12.1.0",
134
134
  "@nestjs/testing": "^11.2.7",
135
- "@nestjs/typeorm": "^11.0.3",
135
+ "@nestjs/typeorm": "^12.0.2",
136
136
  "@opentelemetry/api": "^1.10.0",
137
137
  "@opentelemetry/exporter-trace-otlp-grpc": "^0.300.0",
138
138
  "@opentelemetry/instrumentation": "^0.300.0",
@@ -146,7 +146,7 @@
146
146
  "class-transformer": "^0.5.1",
147
147
  "class-validator": "^0.15.1",
148
148
  "fastify": "^5.12.5",
149
- "graphql": "^16.14.2",
149
+ "graphql": "^17.0.2",
150
150
  "import-in-the-middle": "^3.5.2",
151
151
  "nestjs-console": "^10.0.0",
152
152
  "nestjs-pino": "^4.6.1",
@@ -162,8 +162,8 @@
162
162
  "@nestjs/cqrs": "^11.0.0",
163
163
  "@nestjs/graphql": "^13.0.0",
164
164
  "@nestjs/platform-fastify": "^11.0.0",
165
- "@nestjs/terminus": "^11.0.0",
166
- "@nestjs/typeorm": "^11.0.0",
165
+ "@nestjs/terminus": "^11.0.0 || ^12.0.0",
166
+ "@nestjs/typeorm": "^11.0.0 || ^12.0.0",
167
167
  "@opentelemetry/api": "^1.10.0",
168
168
  "@opentelemetry/exporter-trace-otlp-grpc": "^0.300.0",
169
169
  "@opentelemetry/instrumentation": "^0.300.0",
@@ -174,7 +174,7 @@
174
174
  "class-transformer": "^0.5.1",
175
175
  "class-validator": "^0.15.1",
176
176
  "fastify": "^5.0.0",
177
- "graphql": "^16.0.0",
177
+ "graphql": "^16.0.0 || ^17.0.0",
178
178
  "import-in-the-middle": "^3.3.3",
179
179
  "nestjs-console": "^10.0.0",
180
180
  "nestjs-pino": "^4.6.1",