@breadstone/archipel-platform-telemetry 0.0.23 → 0.0.24

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 (2) hide show
  1. package/README.md +35 -13
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,28 +1,50 @@
1
1
  # @breadstone/archipel-platform-telemetry
2
2
 
3
- Application monitoring, metrics, and telemetry infrastructure.
3
+ Application monitoring, metrics, and distributed tracing infrastructure for NestJS.
4
+
5
+ ## Features
6
+
7
+ - **Metrics collection** — Counter, histogram, and gauge recording via `TelemetryFacade`
8
+ - **Distributed tracing** — OpenTelemetry SDK integration with automatic span creation
9
+ - **Operation interceptor** — `OperationTelemetryInterceptor` wraps controller methods in telemetry operations
10
+ - **Graceful degradation** — Falls back to `NoopTelemetryFacade` when disabled — zero overhead
11
+ - **Health checks** — Integration with health module for observability readiness
12
+ - **Structured logging** — `TelemetryLoggerService` with request correlation IDs
13
+ - **Eager metric init** — `MetricsService` creates instruments at startup via `OnModuleInit`
14
+ - **Write-once SDK guard** — `OtelSdkHolder` prevents accidental double-initialization of the OpenTelemetry SDK
15
+ - **Shutdown timeout** — SDK shutdown is capped at 5 seconds to prevent hanging processes
4
16
 
5
17
  ## Quick Start
6
18
 
7
19
  ```typescript
8
20
  import { TelemetryModule } from '@breadstone/archipel-platform-telemetry';
21
+
22
+ @Module({
23
+ imports: [TelemetryModule],
24
+ })
25
+ export class AppModule {}
9
26
  ```
10
27
 
11
- ## Documentation
28
+ ## Lifecycle
12
29
 
13
- 📖 **Telemetry Guide:** [`.docs/guides/telemetry-and-observability.md`](../../.docs/guides/telemetry-and-observability.md)
30
+ - **Startup (`OnModuleInit`):** `MetricsService` creates metric instruments eagerly.
31
+ - **Shutdown:** SDK shutdown is capped at 5 seconds to prevent hanging processes.
14
32
 
15
- ## Features
33
+ ## Peer Dependencies
34
+
35
+ | Package | Required | Notes |
36
+ | ------------------------------------------- | -------- | ----------------- |
37
+ | `@nestjs/common` | Yes | NestJS core |
38
+ | `@nestjs/core` | Yes | NestJS core |
39
+ | `@opentelemetry/api` | Yes | OpenTelemetry API |
40
+ | `@opentelemetry/sdk-node` | Yes | OpenTelemetry SDK |
41
+ | `@opentelemetry/exporter-metrics-otlp-http` | Yes | Metrics exporter |
42
+ | `@opentelemetry/exporter-trace-otlp-http` | Yes | Trace exporter |
43
+ | `rxjs` | Yes | Reactive streams |
16
44
 
17
- - **Metrics collection**: Counter, histogram, and gauge recording via `TelemetryFacade`
18
- - **Distributed tracing**: OpenTelemetry SDK integration with automatic span creation
19
- - **Operation interceptor**: `OperationTelemetryInterceptor` wraps controller methods in telemetry operations (returns `Observable<unknown>`)
20
- - **Graceful degradation**: Falls back to `NoopTelemetryFacade` when disabled - zero overhead
21
- - **Health checks**: Integration with health module for observability readiness
22
- - **Structured logging**: `TelemetryLoggerService` with request correlation IDs
23
- - **Eager metric init**: `MetricsService` creates instruments at startup via `OnModuleInit`
24
- - **Write-once SDK guard**: `OtelSdkHolder` prevents accidental double-initialization of the OpenTelemetry SDK
25
- - **Shutdown timeout**: SDK shutdown is capped at 5 seconds to prevent hanging processes
45
+ ## Documentation
46
+
47
+ 📖 **Telemetry Guide:** [`.docs/guides/telemetry-and-observability.md`](../../.docs/guides/telemetry-and-observability.md)
26
48
 
27
49
  ## Development
28
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breadstone/archipel-platform-telemetry",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "OpenTelemetry integration with tracing, metrics, and graceful no-op fallback for NestJS.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -28,8 +28,8 @@
28
28
  "README.md"
29
29
  ],
30
30
  "dependencies": {
31
- "@breadstone/archipel-platform-caching": "0.0.23",
32
- "@breadstone/archipel-platform-core": "0.0.23",
31
+ "@breadstone/archipel-platform-caching": "0.0.24",
32
+ "@breadstone/archipel-platform-core": "0.0.24",
33
33
  "tslib": "2.8.1"
34
34
  },
35
35
  "peerDependencies": {