@chidchanun/bcp 0.2.16 → 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/README.md +152 -271
- package/docs/README.md +40 -34
- package/docs/api-manifest.json +13 -13
- package/docs/api-reference.md +225 -283
- package/docs/docs-web-manifest.json +4 -2
- package/docs/observability-v3.md +402 -0
- package/docs/platform-manifest.json +16 -4
- package/docs/releases/0.2.17.md +166 -0
- package/package.json +2 -2
- package/packages/client/src/observability.mjs +1251 -0
- package/packages/client/src/observability.ts +37 -0
- package/packages/server/src/observability-v3.ts +878 -0
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.
|
|
5
|
+
> **Documentation target:** BCP Framework `0.2.17 — Observability Platform v3`
|
|
6
6
|
>
|
|
7
7
|
> **Release state:** unreleased development target until RC validation, tagging and npm publication complete.
|
|
8
8
|
|
|
@@ -42,60 +42,65 @@ Framework source and tests remain authoritative for runtime behavior.
|
|
|
42
42
|
| `0.2.14` | Testing Platform |
|
|
43
43
|
| `0.2.15` | Plugin & Module Platform |
|
|
44
44
|
| `0.2.16` | Cache Platform v2 |
|
|
45
|
+
| `0.2.17` | Observability Platform v3 |
|
|
45
46
|
|
|
46
|
-
## 0.2.
|
|
47
|
+
## 0.2.17 — Observability Platform v3
|
|
47
48
|
|
|
48
|
-
`0.2.
|
|
49
|
+
`0.2.17` extends the existing server-only `bcp/observability` public entrypoint while preserving Observability Platform v2 metrics and health APIs.
|
|
49
50
|
|
|
50
|
-
Primary
|
|
51
|
+
Primary tracing APIs:
|
|
51
52
|
|
|
52
53
|
```ts
|
|
53
54
|
import {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
createCompositeTraceSpanExporter,
|
|
56
|
+
createMemoryTraceSpanExporter,
|
|
57
|
+
createRequestTracingMiddleware,
|
|
58
|
+
createTraceCarrier,
|
|
59
|
+
createTraceMetricsExporter,
|
|
60
|
+
createTracer,
|
|
61
|
+
getTraceLogFields,
|
|
62
|
+
runWithTraceCarrier,
|
|
63
|
+
} from "bcp/observability";
|
|
61
64
|
```
|
|
62
65
|
|
|
63
66
|
Runtime model:
|
|
64
67
|
|
|
65
68
|
```text
|
|
66
|
-
|
|
69
|
+
Incoming HTTP
|
|
67
70
|
|
|
|
68
71
|
v
|
|
69
|
-
|
|
72
|
+
request tracing middleware
|
|
70
73
|
|
|
|
71
|
-
+--
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
+-- AsyncLocalStorage trace context
|
|
75
|
+
+-- W3C traceparent
|
|
76
|
+
+-- correlationId
|
|
74
77
|
|
|
|
75
|
-
+--
|
|
76
|
-
|
|
77
|
-
| +-- Redis-compatible
|
|
78
|
+
+-- database/cache child spans
|
|
79
|
+
+-- trace carrier -> jobs/workflows/events/realtime
|
|
78
80
|
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
+--
|
|
82
|
-
+-- metrics
|
|
81
|
+
v
|
|
82
|
+
TraceSpanExporter
|
|
83
|
+
+-- memory exporter
|
|
84
|
+
+-- trace metrics exporter
|
|
85
|
+
+-- application/vendor exporter
|
|
83
86
|
```
|
|
84
87
|
|
|
85
|
-
|
|
88
|
+
A root trace owns a stable `traceId` and `correlationId`. Nested spans inherit that identity and receive their own `spanId` / `parentSpanId` relationship.
|
|
89
|
+
|
|
90
|
+
`createTraceCarrier()` and `runWithTraceCarrier()` provide explicit provider-neutral propagation through non-HTTP transports without changing persisted job/workflow/outbox schemas.
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
Prepared npm packages compile `bcp/observability` to `observability.mjs` for standalone Node runtime use.
|
|
88
93
|
|
|
89
94
|
New/updated sources:
|
|
90
95
|
|
|
91
96
|
| Source | Purpose |
|
|
92
97
|
| --- | --- |
|
|
93
|
-
| `
|
|
94
|
-
| `api-reference.md` | `bcp/
|
|
95
|
-
| `platform-manifest.json` |
|
|
96
|
-
| `api-manifest.json` | Updated
|
|
97
|
-
| `docs-web-manifest.json` |
|
|
98
|
-
| `releases/0.2.
|
|
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 |
|
|
99
104
|
|
|
100
105
|
## Update rule
|
|
101
106
|
|
|
@@ -116,6 +121,7 @@ When framework behavior or public surface changes:
|
|
|
116
121
|
| --- | --- |
|
|
117
122
|
| `/docs/authentication` | `authentication.md` |
|
|
118
123
|
| `/docs/observability` | `observability.md` |
|
|
124
|
+
| `/docs/observability-v3` | `observability-v3.md` |
|
|
119
125
|
| `/docs/background-jobs` | `background-jobs.md` |
|
|
120
126
|
| `/docs/durable-jobs` | `durable-jobs.md` |
|
|
121
127
|
| `/docs/workflow-orchestration` | `workflow-orchestration.md` |
|
|
@@ -125,7 +131,7 @@ When framework behavior or public surface changes:
|
|
|
125
131
|
| `/docs/plugin-module-platform` | `plugin-module-platform.md` |
|
|
126
132
|
| `/docs/cache-platform-v2` | `cache-platform-v2.md` |
|
|
127
133
|
| `/docs/api-reference` | `api-reference.md` |
|
|
128
|
-
| `/releases/0.2.
|
|
134
|
+
| `/releases/0.2.17` | `releases/0.2.17.md` |
|
|
129
135
|
|
|
130
136
|
Every route/source pair is validated by unit tests.
|
|
131
137
|
|
|
@@ -156,7 +162,7 @@ The API-manifest entrypoint set must match the platform public-entrypoint set ex
|
|
|
156
162
|
|
|
157
163
|
## Release validation
|
|
158
164
|
|
|
159
|
-
Before publishing `0.2.
|
|
165
|
+
Before publishing `0.2.17`:
|
|
160
166
|
|
|
161
167
|
```bash
|
|
162
168
|
npm run typecheck
|
|
@@ -167,6 +173,6 @@ npm run test:package
|
|
|
167
173
|
npm run rc:check
|
|
168
174
|
```
|
|
169
175
|
|
|
170
|
-
|
|
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.
|
|
171
177
|
|
|
172
178
|
The final release tag must point to the exact commit that passed the complete RC sequence.
|
package/docs/api-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"framework": "bcp",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.17",
|
|
5
5
|
"releaseState": "unreleased",
|
|
6
6
|
"coverage": "public-entrypoints",
|
|
7
7
|
"entrypoints": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"environment": "server-preferred",
|
|
28
28
|
"route": "/docs/api-reference#bcp-cache",
|
|
29
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"]
|
|
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": "
|
|
126
|
-
"guides": ["/docs/observability", "/docs/development-logging", "/docs/cache-platform-v2"]
|
|
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
|
}
|