@chidchanun/bcp 0.2.15 → 0.2.17

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/docs/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The `docs/` directory is the documentation source of truth for BCP Framework and is organized for **`bcp-docs-web`**.
4
4
 
5
- > **Documentation target:** BCP Framework `0.2.15Plugin & Module Platform`
5
+ > **Documentation target:** BCP Framework `0.2.17Observability Platform v3`
6
6
  >
7
7
  > **Release state:** unreleased development target until RC validation, tagging and npm publication complete.
8
8
 
@@ -41,55 +41,66 @@ Framework source and tests remain authoritative for runtime behavior.
41
41
  | `0.2.13` | Realtime Platform |
42
42
  | `0.2.14` | Testing Platform |
43
43
  | `0.2.15` | Plugin & Module Platform |
44
+ | `0.2.16` | Cache Platform v2 |
45
+ | `0.2.17` | Observability Platform v3 |
44
46
 
45
- ## 0.2.15Plugin & Module Platform
47
+ ## 0.2.17Observability Platform v3
46
48
 
47
- `0.2.15` adds the server-only `bcp/plugins` public entrypoint.
49
+ `0.2.17` extends the existing server-only `bcp/observability` public entrypoint while preserving Observability Platform v2 metrics and health APIs.
48
50
 
49
- Primary APIs:
51
+ Primary tracing APIs:
50
52
 
51
53
  ```ts
52
54
  import {
53
- createPluginHookBus,
54
- createPluginHost,
55
- createPluginServiceRegistry,
56
- defineModule,
57
- definePlugin,
58
- } from "bcp/plugins";
55
+ createCompositeTraceSpanExporter,
56
+ createMemoryTraceSpanExporter,
57
+ createRequestTracingMiddleware,
58
+ createTraceCarrier,
59
+ createTraceMetricsExporter,
60
+ createTracer,
61
+ getTraceLogFields,
62
+ runWithTraceCarrier,
63
+ } from "bcp/observability";
59
64
  ```
60
65
 
61
66
  Runtime model:
62
67
 
63
68
  ```text
64
- Plugin Host
65
- |
66
- +-- dependency graph
67
- | -> required / optional dependencies
68
- |
69
- +-- lifecycle
70
- | -> setup -> start -> stop -> dispose
71
- |
72
- +-- service registry
73
- | -> typed shared application services
74
- |
75
- +-- async hook bus
76
- -> in-process extension points
69
+ Incoming HTTP
70
+ |
71
+ v
72
+ request tracing middleware
73
+ |
74
+ +-- AsyncLocalStorage trace context
75
+ +-- W3C traceparent
76
+ +-- correlationId
77
+ |
78
+ +-- database/cache child spans
79
+ +-- trace carrier -> jobs/workflows/events/realtime
80
+ |
81
+ v
82
+ TraceSpanExporter
83
+ +-- memory exporter
84
+ +-- trace metrics exporter
85
+ +-- application/vendor exporter
77
86
  ```
78
87
 
79
- Startup follows topological dependency order. Stop/dispose runs in reverse order. A failed startup rolls back plugins that already started.
88
+ A root trace owns a stable `traceId` and `correlationId`. Nested spans inherit that identity and receive their own `spanId` / `parentSpanId` relationship.
80
89
 
81
- Modules are named bundles of plugins; they do not create a separate lifecycle graph.
90
+ `createTraceCarrier()` and `runWithTraceCarrier()` provide explicit provider-neutral propagation through non-HTTP transports without changing persisted job/workflow/outbox schemas.
91
+
92
+ Prepared npm packages compile `bcp/observability` to `observability.mjs` for standalone Node runtime use.
82
93
 
83
94
  New/updated sources:
84
95
 
85
96
  | Source | Purpose |
86
97
  | --- | --- |
87
- | `plugin-module-platform.md` | Plugin definitions, modules, dependency order, lifecycle, config, services and hooks |
88
- | `api-reference.md` | `bcp/plugins` public APIs |
89
- | `platform-manifest.json` | Plugin capability flags and public entrypoint |
90
- | `api-manifest.json` | `bcp/plugins` source/guide ownership |
91
- | `docs-web-manifest.json` | Plugin docs navigation and `0.2.15` release route |
92
- | `releases/0.2.15.md` | Plugin & Module Platform release notes |
98
+ | `observability-v3.md` | Tracing, propagation, W3C trace context, exporters, correlation and trace metrics |
99
+ | `api-reference.md` | `bcp/observability` tracing APIs |
100
+ | `platform-manifest.json` | Observability v3 capability flags |
101
+ | `api-manifest.json` | Updated observability source/guide ownership |
102
+ | `docs-web-manifest.json` | Observability v3 docs navigation and `0.2.17` release route |
103
+ | `releases/0.2.17.md` | Observability Platform v3 release notes |
93
104
 
94
105
  ## Update rule
95
106
 
@@ -110,6 +121,7 @@ When framework behavior or public surface changes:
110
121
  | --- | --- |
111
122
  | `/docs/authentication` | `authentication.md` |
112
123
  | `/docs/observability` | `observability.md` |
124
+ | `/docs/observability-v3` | `observability-v3.md` |
113
125
  | `/docs/background-jobs` | `background-jobs.md` |
114
126
  | `/docs/durable-jobs` | `durable-jobs.md` |
115
127
  | `/docs/workflow-orchestration` | `workflow-orchestration.md` |
@@ -117,8 +129,9 @@ When framework behavior or public surface changes:
117
129
  | `/docs/realtime-platform` | `realtime-platform.md` |
118
130
  | `/docs/testing-platform` | `testing-platform.md` |
119
131
  | `/docs/plugin-module-platform` | `plugin-module-platform.md` |
132
+ | `/docs/cache-platform-v2` | `cache-platform-v2.md` |
120
133
  | `/docs/api-reference` | `api-reference.md` |
121
- | `/releases/0.2.15` | `releases/0.2.15.md` |
134
+ | `/releases/0.2.17` | `releases/0.2.17.md` |
122
135
 
123
136
  Every route/source pair is validated by unit tests.
124
137
 
@@ -149,7 +162,7 @@ The API-manifest entrypoint set must match the platform public-entrypoint set ex
149
162
 
150
163
  ## Release validation
151
164
 
152
- Before publishing `0.2.15`:
165
+ Before publishing `0.2.17`:
153
166
 
154
167
  ```bash
155
168
  npm run typecheck
@@ -160,6 +173,6 @@ npm run test:package
160
173
  npm run rc:check
161
174
  ```
162
175
 
163
- Plugin Platform validation covers dependency ordering, missing/cyclic dependencies, module composition, typed config parsing, service sharing, async hooks, reverse shutdown, startup rollback, server-only boundaries, compiled `plugins.mjs` package execution and docs/platform/API parity.
176
+ Observability Platform v3 validation covers root/child spans, async trace context, W3C traceparent parsing/injection, correlation IDs, request middleware, trace carriers, error spans, metrics integration, compiled `observability.mjs` package execution and docs/platform/API parity.
164
177
 
165
178
  The final release tag must point to the exact commit that passed the complete RC sequence.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "framework": "bcp",
4
- "version": "0.2.15",
4
+ "version": "0.2.17",
5
5
  "releaseState": "unreleased",
6
6
  "coverage": "public-entrypoints",
7
7
  "entrypoints": [
@@ -26,8 +26,8 @@
26
26
  "source": "packages/client/src/cache.ts",
27
27
  "environment": "server-preferred",
28
28
  "route": "/docs/api-reference#bcp-cache",
29
- "summary": "Cache, deduplication, statistics and path/tag revalidation primitives.",
30
- "guides": ["/docs/caching"]
29
+ "summary": "Backward-compatible request/data caching plus Cache Platform v2 adapters, Redis-compatible distributed cache and locks, stampede protection, TTL/tag/path invalidation and metrics integration.",
30
+ "guides": ["/docs/caching", "/docs/cache-platform-v2", "/docs/observability-v3"]
31
31
  },
32
32
  {
33
33
  "package": "bcp/config",
@@ -59,7 +59,7 @@
59
59
  "environment": "server",
60
60
  "route": "/docs/api-reference#bcp-database",
61
61
  "summary": "Provider-neutral MySQL, PostgreSQL and SQLite query, transaction, lifecycle and migration primitives.",
62
- "guides": ["/docs/database", "/docs/database-migrations", "/docs/transactional-outbox-events", "/docs/testing-platform"]
62
+ "guides": ["/docs/database", "/docs/database-migrations", "/docs/transactional-outbox-events", "/docs/testing-platform", "/docs/observability-v3"]
63
63
  },
64
64
  {
65
65
  "package": "bcp/auth",
@@ -75,7 +75,7 @@
75
75
  "environment": "server",
76
76
  "route": "/docs/api-reference#bcp-jobs",
77
77
  "summary": "Background queues and schedules with visibility leases, heartbeats, stale recovery, DLQ maintenance and Redis-compatible durable adapters.",
78
- "guides": ["/docs/background-jobs", "/docs/job-scheduling", "/docs/durable-jobs", "/docs/transactional-outbox-events", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability"]
78
+ "guides": ["/docs/background-jobs", "/docs/job-scheduling", "/docs/durable-jobs", "/docs/transactional-outbox-events", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3"]
79
79
  },
80
80
  {
81
81
  "package": "bcp/workflow",
@@ -83,7 +83,7 @@
83
83
  "environment": "server",
84
84
  "route": "/docs/api-reference#bcp-workflow",
85
85
  "summary": "Persistent workflow orchestration with sequential and parallel steps, retries, delays, compensation, run leases and optional durable queue execution.",
86
- "guides": ["/docs/workflow-orchestration", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability"]
86
+ "guides": ["/docs/workflow-orchestration", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3"]
87
87
  },
88
88
  {
89
89
  "package": "bcp/events",
@@ -91,7 +91,7 @@
91
91
  "environment": "server",
92
92
  "route": "/docs/api-reference#bcp-events",
93
93
  "summary": "Transactional outbox and event delivery APIs with SQL persistence, dispatcher leases, retries, stale recovery, queue handoff and in-process event bus delivery.",
94
- "guides": ["/docs/transactional-outbox-events", "/docs/database", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability"]
94
+ "guides": ["/docs/transactional-outbox-events", "/docs/database", "/docs/durable-jobs", "/docs/realtime-platform", "/docs/testing-platform", "/docs/observability-v3"]
95
95
  },
96
96
  {
97
97
  "package": "bcp/realtime",
@@ -99,7 +99,7 @@
99
99
  "environment": "server",
100
100
  "route": "/docs/api-reference#bcp-realtime",
101
101
  "summary": "Realtime channels, cross-hub broker delivery, presence, channel authorization, WebSocket adapter integration, heartbeat handling and built-in Server-Sent Events responses.",
102
- "guides": ["/docs/realtime-platform", "/docs/authentication", "/docs/testing-platform", "/docs/observability"]
102
+ "guides": ["/docs/realtime-platform", "/docs/authentication", "/docs/testing-platform", "/docs/observability-v3"]
103
103
  },
104
104
  {
105
105
  "package": "bcp/testing",
@@ -107,7 +107,7 @@
107
107
  "environment": "server",
108
108
  "route": "/docs/api-reference#bcp-testing",
109
109
  "summary": "Framework-native testing utilities for Request/Response handlers, signed auth sessions, rollback transactions, page/server execution, middleware, jobs, workflows, outbox delivery, realtime sockets and SSE.",
110
- "guides": ["/docs/testing-platform", "/docs/authentication", "/docs/database", "/docs/durable-jobs", "/docs/workflow-orchestration", "/docs/transactional-outbox-events", "/docs/realtime-platform"]
110
+ "guides": ["/docs/testing-platform", "/docs/authentication", "/docs/database", "/docs/durable-jobs", "/docs/workflow-orchestration", "/docs/transactional-outbox-events", "/docs/realtime-platform", "/docs/observability-v3"]
111
111
  },
112
112
  {
113
113
  "package": "bcp/plugins",
@@ -115,15 +115,15 @@
115
115
  "environment": "server",
116
116
  "route": "/docs/api-reference#bcp-plugins",
117
117
  "summary": "Plugin and module composition with dependency ordering, lifecycle hooks, typed config parsing, shared services and asynchronous extension hooks.",
118
- "guides": ["/docs/plugin-module-platform", "/docs/configuration", "/docs/testing-platform", "/docs/observability"]
118
+ "guides": ["/docs/plugin-module-platform", "/docs/configuration", "/docs/testing-platform", "/docs/observability-v3"]
119
119
  },
120
120
  {
121
121
  "package": "bcp/observability",
122
122
  "source": "packages/client/src/observability.ts",
123
123
  "environment": "server",
124
124
  "route": "/docs/api-reference#bcp-observability",
125
- "summary": "In-process metrics, Prometheus exposition, request metrics middleware and health/readiness checks.",
126
- "guides": ["/docs/observability", "/docs/development-logging"]
125
+ "summary": "Metrics, Prometheus output, health checks and Observability Platform v3 distributed tracing with W3C trace context, correlation IDs, request tracing, span exporters and trace-to-metrics integration.",
126
+ "guides": ["/docs/observability", "/docs/observability-v3", "/docs/development-logging", "/docs/cache-platform-v2"]
127
127
  },
128
128
  {
129
129
  "package": "bcp/server",
@@ -131,7 +131,7 @@
131
131
  "environment": "server",
132
132
  "route": "/docs/api-reference#bcp-server",
133
133
  "summary": "Request context, cookies, CSRF/same-origin protection, logging, production hardening, upload, storage, response and session APIs.",
134
- "guides": ["/docs/server-request-apis", "/docs/authorization-security", "/docs/file-upload", "/docs/storage", "/docs/storage-ecosystem", "/docs/production-hardening", "/docs/testing-platform"]
134
+ "guides": ["/docs/server-request-apis", "/docs/authorization-security", "/docs/file-upload", "/docs/storage", "/docs/storage-ecosystem", "/docs/production-hardening", "/docs/testing-platform", "/docs/observability-v3"]
135
135
  },
136
136
  {
137
137
  "package": "bcp/server-only",
@@ -147,7 +147,7 @@
147
147
  "environment": "server",
148
148
  "route": "/docs/api-reference#bcp-middleware",
149
149
  "summary": "Middleware System v2 request/response pipeline types and helpers.",
150
- "guides": ["/docs/middleware", "/docs/testing-platform"]
150
+ "guides": ["/docs/middleware", "/docs/testing-platform", "/docs/observability-v3"]
151
151
  }
152
152
  ]
153
153
  }