brass-runtime 1.16.1 → 1.18.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 +40 -8
- package/dist/agent/cli/main.cjs +31 -32
- package/dist/agent/cli/main.js +3 -4
- package/dist/agent/cli/main.mjs +3 -4
- package/dist/agent/index.cjs +4 -5
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +3 -4
- package/dist/agent/index.mjs +3 -4
- package/dist/{chunk-GYM3LLGS.mjs → chunk-2QNREG6K.mjs} +188 -5
- package/dist/{chunk-4ROBZFL6.cjs → chunk-2SLT3X6G.cjs} +6 -8
- package/dist/{chunk-KZJQ723N.cjs → chunk-3PFZGP23.cjs} +13 -15
- package/dist/{chunk-AVNQLJ5V.js → chunk-3PHU7FWS.js} +528 -23
- package/dist/{chunk-CIZFIMK5.js → chunk-4YQHPIWJ.js} +60 -11
- package/dist/chunk-5XADBMSU.cjs +33 -0
- package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
- package/dist/chunk-7TKI527D.cjs +123 -0
- package/dist/{chunk-AGR5B2BC.cjs → chunk-7TXQJFZX.cjs} +564 -12
- package/dist/{chunk-RKGKFN2A.js → chunk-AADFFVYS.js} +1 -1
- package/dist/{chunk-52PPNNI4.cjs → chunk-AJMKZXRB.cjs} +2 -2
- package/dist/{chunk-3AYM6WPJ.js → chunk-BG5RNEA2.js} +20 -299
- package/dist/{chunk-2HQTDLHF.mjs → chunk-ELLF55ER.mjs} +555 -3
- package/dist/{chunk-EOC4UHBS.mjs → chunk-G5JTCFMI.mjs} +2 -2
- package/dist/chunk-H5GYX7RZ.js +6126 -0
- package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
- package/dist/{chunk-6IXXWIUM.js → chunk-IBRHSH5H.js} +555 -3
- package/dist/{chunk-Q2I37RP3.cjs → chunk-IFRBVMWJ.cjs} +44 -323
- package/dist/{chunk-52OB2ROS.js → chunk-ITG6I7ZS.js} +2 -4
- package/dist/chunk-ITZQ526U.mjs +33 -0
- package/dist/{chunk-7JIJOVCT.js → chunk-JH4GI3DW.js} +2 -4
- package/dist/{chunk-76YMRMH2.cjs → chunk-KHACHFBQ.cjs} +583 -78
- package/dist/{chunk-MT3OWDPC.mjs → chunk-KRYP6CAE.mjs} +60 -11
- package/dist/chunk-KTGDLBLD.mjs +123 -0
- package/dist/{chunk-ENKODRU3.cjs → chunk-LXBU5E77.cjs} +143 -94
- package/dist/{chunk-PD4EJTQC.cjs → chunk-N6QNSTWD.cjs} +5 -5
- package/dist/{chunk-HLWLMW2F.mjs → chunk-OI4ESUMC.mjs} +9 -11
- package/dist/{chunk-EJ6BPYVR.mjs → chunk-OT2TESZU.mjs} +1 -1
- package/dist/{chunk-BABBZK4Y.js → chunk-PSEU65ND.js} +9 -11
- package/dist/{chunk-DNFO2EIZ.mjs → chunk-QCOLAHU3.mjs} +528 -23
- package/dist/{chunk-KH4SYAOS.mjs → chunk-QZ6QFJNM.mjs} +20 -299
- package/dist/{chunk-MBEJI5HF.mjs → chunk-R6WDSZA6.mjs} +2 -4
- package/dist/{chunk-FHQGHPMO.mjs → chunk-RREBJX2S.mjs} +2 -4
- package/dist/{chunk-5QC7LRZ3.js → chunk-S4HHFUYP.js} +2 -2
- package/dist/{chunk-GLE2WY7Z.cjs → chunk-SSQJKDN3.cjs} +194 -11
- package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
- package/dist/chunk-VIFA4DPN.cjs +6126 -0
- package/dist/chunk-W6WR37HN.js +33 -0
- package/dist/{chunk-FH2X7BVP.js → chunk-XSAHV5HQ.js} +188 -5
- package/dist/chunk-YM3EDNYD.js +123 -0
- package/dist/{chunk-VN44DYYT.cjs → chunk-YTX2JYYP.cjs} +18 -20
- package/dist/chunk-Z3PSSXP3.mjs +6126 -0
- package/dist/core/index.cjs +31 -9
- package/dist/core/index.d.ts +19 -152
- package/dist/core/index.js +80 -58
- package/dist/core/index.mjs +80 -58
- package/dist/defaultClient-DhpCQW9m.d.ts +1623 -0
- package/dist/{effect-DIUHZ9IN.d.ts → effect-CtUDl5M5.d.ts} +1 -1
- package/dist/http/index.cjs +202 -59
- package/dist/http/index.d.ts +55 -819
- package/dist/http/index.js +216 -73
- package/dist/http/index.mjs +216 -73
- package/dist/http/testing.cjs +31 -10
- package/dist/http/testing.d.ts +16 -5
- package/dist/http/testing.js +29 -8
- package/dist/http/testing.mjs +29 -8
- package/dist/index.cjs +110 -88
- package/dist/index.d.ts +9 -8
- package/dist/index.js +81 -59
- package/dist/index.mjs +81 -59
- package/dist/{schedule-CK3Ml_7p.d.ts → layer-BalPI6cN.d.ts} +176 -2
- package/dist/observability/index.cjs +22 -7
- package/dist/observability/index.d.ts +32 -8
- package/dist/observability/index.js +21 -6
- package/dist/observability/index.mjs +21 -6
- package/dist/perf/cli.cjs +26 -28
- package/dist/perf/cli.js +11 -13
- package/dist/perf/cli.mjs +11 -13
- package/dist/perf/index.cjs +13 -15
- package/dist/perf/index.js +11 -13
- package/dist/perf/index.mjs +11 -13
- package/dist/schema/index.cjs +2 -2
- package/dist/schema/index.js +1 -1
- package/dist/schema/index.mjs +1 -1
- package/dist/{server-GJPg8ZSG.d.ts → server-C1zVmqE6.d.ts} +16 -5
- package/dist/{stream-B4oK9JFP.d.ts → stream-Bb4FTejt.d.ts} +1 -1
- package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DzfuE6um.d.ts} +2 -2
- package/dist/{tracing-DqbTKGcf.d.ts → tracing-BABA5arE.d.ts} +1 -1
- package/docs/README.md +4 -0
- package/docs/ai/PUBLIC_API.md +31 -7
- package/docs/articles/brass-runtime-http-observability.md +467 -0
- package/docs/framework-integrations.md +38 -0
- package/docs/frameworks/angular.md +204 -0
- package/docs/frameworks/express.md +183 -0
- package/docs/frameworks/fastify.md +173 -0
- package/docs/frameworks/nestjs.md +335 -0
- package/docs/frameworks/nextjs.md +202 -0
- package/docs/frameworks/react.md +183 -0
- package/docs/frameworks/vanilla.md +280 -0
- package/docs/guides/layers.md +130 -0
- package/docs/http-recipes.md +31 -1
- package/docs/http.md +50 -1
- package/docs/nestjs.md +6 -0
- package/docs/observability-framework-examples.md +12 -0
- package/docs/observability.md +239 -0
- package/docs/performance-profiler.md +6 -2
- package/docs/recipes/layers.md +46 -2
- package/docs/recipes/testing.md +25 -0
- package/package.json +4 -1
- package/dist/chunk-3LOYJFRR.cjs +0 -300
- package/dist/chunk-3Y2RIUMM.js +0 -300
- package/dist/chunk-5EC274J5.cjs +0 -2874
- package/dist/chunk-5VRJNBLZ.mjs +0 -2874
- package/dist/chunk-62AZW6UT.cjs +0 -313
- package/dist/chunk-74ZTY6CP.js +0 -2871
- package/dist/chunk-7CMJS3QE.mjs +0 -2871
- package/dist/chunk-A2OM6NEH.mjs +0 -194
- package/dist/chunk-B33ICAKP.js +0 -313
- package/dist/chunk-JF5WGYJJ.cjs +0 -194
- package/dist/chunk-KN32XNTH.mjs +0 -313
- package/dist/chunk-KQLYONSE.cjs +0 -2871
- package/dist/chunk-L2SYFEBS.js +0 -194
- package/dist/chunk-MIIYDLGM.js +0 -2874
- package/dist/chunk-PWC3RBQE.mjs +0 -300
- package/dist/client-CZHU674n.d.ts +0 -820
package/dist/perf/cli.mjs
CHANGED
|
@@ -15,22 +15,20 @@ import {
|
|
|
15
15
|
runBrassPerformanceProfile,
|
|
16
16
|
savePerfBaseline,
|
|
17
17
|
writePerfHistoryEntry
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-OI4ESUMC.mjs";
|
|
19
|
+
import "../chunk-G5JTCFMI.mjs";
|
|
20
|
+
import "../chunk-QCOLAHU3.mjs";
|
|
21
|
+
import "../chunk-ITZQ526U.mjs";
|
|
22
|
+
import "../chunk-KRYP6CAE.mjs";
|
|
23
|
+
import "../chunk-OT2TESZU.mjs";
|
|
24
|
+
import "../chunk-Z3PSSXP3.mjs";
|
|
22
25
|
import "../chunk-MOO4L7F4.mjs";
|
|
23
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-RREBJX2S.mjs";
|
|
24
27
|
import "../chunk-B5JD23U7.mjs";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-DNFO2EIZ.mjs";
|
|
28
|
-
import "../chunk-MT3OWDPC.mjs";
|
|
29
|
-
import "../chunk-EJ6BPYVR.mjs";
|
|
30
|
-
import "../chunk-PWC3RBQE.mjs";
|
|
31
|
-
import "../chunk-GYM3LLGS.mjs";
|
|
28
|
+
import "../chunk-ELLF55ER.mjs";
|
|
29
|
+
import "../chunk-2QNREG6K.mjs";
|
|
32
30
|
import "../chunk-36I3M4UC.mjs";
|
|
33
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-6MLAZPBL.mjs";
|
|
34
32
|
import "../chunk-Y6FXYEAI.mjs";
|
|
35
33
|
|
|
36
34
|
// src/perf/cli.ts
|
package/dist/perf/index.cjs
CHANGED
|
@@ -30,27 +30,25 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
34
|
-
require('../chunk-
|
|
35
|
-
require('../chunk-
|
|
36
|
-
require('../chunk-
|
|
33
|
+
var _chunkYTX2JYYPcjs = require('../chunk-YTX2JYYP.cjs');
|
|
34
|
+
require('../chunk-N6QNSTWD.cjs');
|
|
35
|
+
require('../chunk-KHACHFBQ.cjs');
|
|
36
|
+
require('../chunk-5XADBMSU.cjs');
|
|
37
|
+
require('../chunk-LXBU5E77.cjs');
|
|
38
|
+
require('../chunk-AJMKZXRB.cjs');
|
|
39
|
+
require('../chunk-VIFA4DPN.cjs');
|
|
37
40
|
require('../chunk-L6VB5N7Q.cjs');
|
|
38
|
-
require('../chunk-
|
|
41
|
+
require('../chunk-3PFZGP23.cjs');
|
|
39
42
|
require('../chunk-SA6HUJVI.cjs');
|
|
40
|
-
require('../chunk-
|
|
41
|
-
require('../chunk-
|
|
42
|
-
require('../chunk-76YMRMH2.cjs');
|
|
43
|
-
require('../chunk-ENKODRU3.cjs');
|
|
44
|
-
require('../chunk-52PPNNI4.cjs');
|
|
45
|
-
require('../chunk-3LOYJFRR.cjs');
|
|
46
|
-
require('../chunk-GLE2WY7Z.cjs');
|
|
43
|
+
require('../chunk-7TXQJFZX.cjs');
|
|
44
|
+
require('../chunk-SSQJKDN3.cjs');
|
|
47
45
|
require('../chunk-MVGUEJ5Z.cjs');
|
|
48
|
-
require('../chunk-
|
|
46
|
+
require('../chunk-UUMKZJRJ.cjs');
|
|
49
47
|
require('../chunk-OBGZSXTJ.cjs');
|
|
50
48
|
|
|
51
49
|
// src/perf/budget.ts
|
|
52
50
|
async function runRuntimePerfBudget(options = {}) {
|
|
53
|
-
const ab = await
|
|
51
|
+
const ab = await _chunkYTX2JYYPcjs.profileRuntimeAb.call(void 0, {
|
|
54
52
|
...options,
|
|
55
53
|
thresholds: {
|
|
56
54
|
maxRegressionPercent: _nullishCoalesce(_optionalChain([options, 'access', _ => _.thresholds, 'optionalAccess', _2 => _2.maxRegressionPercent]), () => ( 50)),
|
|
@@ -138,4 +136,4 @@ function positiveNumber(value, fallback) {
|
|
|
138
136
|
|
|
139
137
|
|
|
140
138
|
|
|
141
|
-
exports.HTTP_PROFILE_VARIANTS =
|
|
139
|
+
exports.HTTP_PROFILE_VARIANTS = _chunkYTX2JYYPcjs.HTTP_PROFILE_VARIANTS; exports.captureMemorySnapshot = _chunkYTX2JYYPcjs.captureMemorySnapshot; exports.comparePerfToBaseline = _chunkYTX2JYYPcjs.comparePerfToBaseline; exports.compareRuntimeProfiles = _chunkYTX2JYYPcjs.compareRuntimeProfiles; exports.createPerfHistoryEntry = _chunkYTX2JYYPcjs.createPerfHistoryEntry; exports.defaultPerfHistoryDirectory = _chunkYTX2JYYPcjs.defaultPerfHistoryDirectory; exports.diagnoseRuntimeProfile = _chunkYTX2JYYPcjs.diagnoseRuntimeProfile; exports.diffMemorySnapshots = _chunkYTX2JYYPcjs.diffMemorySnapshots; exports.extractPerfMetrics = _chunkYTX2JYYPcjs.extractPerfMetrics; exports.forceGc = _chunkYTX2JYYPcjs.forceGc; exports.formatHttpMemoryLabReport = _chunkYTX2JYYPcjs.formatHttpMemoryLabReport; exports.formatPerfBaselineComparison = _chunkYTX2JYYPcjs.formatPerfBaselineComparison; exports.formatPerformanceReport = _chunkYTX2JYYPcjs.formatPerformanceReport; exports.formatRuntimeAbReport = _chunkYTX2JYYPcjs.formatRuntimeAbReport; exports.formatRuntimePerfBudgetReport = formatRuntimePerfBudgetReport; exports.formatRuntimeSoakReport = _chunkYTX2JYYPcjs.formatRuntimeSoakReport; exports.hasGc = _chunkYTX2JYYPcjs.hasGc; exports.loadPerfBaseline = _chunkYTX2JYYPcjs.loadPerfBaseline; exports.makePerfRecorder = _chunkYTX2JYYPcjs.makePerfRecorder; exports.profileHttpLayers = _chunkYTX2JYYPcjs.profileHttpLayers; exports.profileHttpMemoryLab = _chunkYTX2JYYPcjs.profileHttpMemoryLab; exports.profileMemoryRetention = _chunkYTX2JYYPcjs.profileMemoryRetention; exports.profileRuntimeAb = _chunkYTX2JYYPcjs.profileRuntimeAb; exports.profileRuntimePrimitives = _chunkYTX2JYYPcjs.profileRuntimePrimitives; exports.profileRuntimeSoak = _chunkYTX2JYYPcjs.profileRuntimeSoak; exports.readPerfHistory = _chunkYTX2JYYPcjs.readPerfHistory; exports.recommendPerformance = _chunkYTX2JYYPcjs.recommendPerformance; exports.recordPerfHistoryRun = _chunkYTX2JYYPcjs.recordPerfHistoryRun; exports.runBrassPerformanceProfile = _chunkYTX2JYYPcjs.runBrassPerformanceProfile; exports.runRuntimePerfBudget = runRuntimePerfBudget; exports.savePerfBaseline = _chunkYTX2JYYPcjs.savePerfBaseline; exports.summarizePerfEvents = _chunkYTX2JYYPcjs.summarizePerfEvents; exports.writePerfHistoryEntry = _chunkYTX2JYYPcjs.writePerfHistoryEntry;
|
package/dist/perf/index.js
CHANGED
|
@@ -30,22 +30,20 @@ import {
|
|
|
30
30
|
savePerfBaseline,
|
|
31
31
|
summarizePerfEvents,
|
|
32
32
|
writePerfHistoryEntry
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-PSEU65ND.js";
|
|
34
|
+
import "../chunk-S4HHFUYP.js";
|
|
35
|
+
import "../chunk-3PHU7FWS.js";
|
|
36
|
+
import "../chunk-W6WR37HN.js";
|
|
37
|
+
import "../chunk-4YQHPIWJ.js";
|
|
38
|
+
import "../chunk-AADFFVYS.js";
|
|
39
|
+
import "../chunk-H5GYX7RZ.js";
|
|
37
40
|
import "../chunk-TRM4JUZQ.js";
|
|
38
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-JH4GI3DW.js";
|
|
39
42
|
import "../chunk-UCUBNWM2.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-AVNQLJ5V.js";
|
|
43
|
-
import "../chunk-CIZFIMK5.js";
|
|
44
|
-
import "../chunk-RKGKFN2A.js";
|
|
45
|
-
import "../chunk-3Y2RIUMM.js";
|
|
46
|
-
import "../chunk-FH2X7BVP.js";
|
|
43
|
+
import "../chunk-IBRHSH5H.js";
|
|
44
|
+
import "../chunk-XSAHV5HQ.js";
|
|
47
45
|
import "../chunk-UB4B6OFY.js";
|
|
48
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-HCJ4S3YB.js";
|
|
49
47
|
import "../chunk-3RG5ZIWI.js";
|
|
50
48
|
|
|
51
49
|
// src/perf/budget.ts
|
package/dist/perf/index.mjs
CHANGED
|
@@ -30,22 +30,20 @@ import {
|
|
|
30
30
|
savePerfBaseline,
|
|
31
31
|
summarizePerfEvents,
|
|
32
32
|
writePerfHistoryEntry
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-OI4ESUMC.mjs";
|
|
34
|
+
import "../chunk-G5JTCFMI.mjs";
|
|
35
|
+
import "../chunk-QCOLAHU3.mjs";
|
|
36
|
+
import "../chunk-ITZQ526U.mjs";
|
|
37
|
+
import "../chunk-KRYP6CAE.mjs";
|
|
38
|
+
import "../chunk-OT2TESZU.mjs";
|
|
39
|
+
import "../chunk-Z3PSSXP3.mjs";
|
|
37
40
|
import "../chunk-MOO4L7F4.mjs";
|
|
38
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-RREBJX2S.mjs";
|
|
39
42
|
import "../chunk-B5JD23U7.mjs";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-DNFO2EIZ.mjs";
|
|
43
|
-
import "../chunk-MT3OWDPC.mjs";
|
|
44
|
-
import "../chunk-EJ6BPYVR.mjs";
|
|
45
|
-
import "../chunk-PWC3RBQE.mjs";
|
|
46
|
-
import "../chunk-GYM3LLGS.mjs";
|
|
43
|
+
import "../chunk-ELLF55ER.mjs";
|
|
44
|
+
import "../chunk-2QNREG6K.mjs";
|
|
47
45
|
import "../chunk-36I3M4UC.mjs";
|
|
48
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-6MLAZPBL.mjs";
|
|
49
47
|
import "../chunk-Y6FXYEAI.mjs";
|
|
50
48
|
|
|
51
49
|
// src/perf/budget.ts
|
package/dist/schema/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkUUMKZJRJcjs = require('../chunk-UUMKZJRJ.cjs');
|
|
15
15
|
require('../chunk-OBGZSXTJ.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
@@ -26,4 +26,4 @@ require('../chunk-OBGZSXTJ.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.ConfigValidationError =
|
|
29
|
+
exports.ConfigValidationError = _chunkUUMKZJRJcjs.ConfigValidationError; exports.Schema = _chunkUUMKZJRJcjs.Schema; exports.SchemaValidationException = _chunkUUMKZJRJcjs.SchemaValidationException; exports.formatConfigError = _chunkUUMKZJRJcjs.formatConfigError; exports.formatIssues = _chunkUUMKZJRJcjs.formatIssues; exports.isConfigValidationError = _chunkUUMKZJRJcjs.isConfigValidationError; exports.isSchema = _chunkUUMKZJRJcjs.isSchema; exports.makeSchemaIssue = _chunkUUMKZJRJcjs.makeSchemaIssue; exports.parseConfig = _chunkUUMKZJRJcjs.parseConfig; exports.s = _chunkUUMKZJRJcjs.s; exports.schema = _chunkUUMKZJRJcjs.schema; exports.validateValue = _chunkUUMKZJRJcjs.validateValue;
|
package/dist/schema/index.js
CHANGED
package/dist/schema/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as MetricExemplar, b as MetricSnapshot, M as MetricsRegistry, T as TraceSampler, c as TraceSamplingInput, E as EventBus, B as BrassEnv, I as InMemoryTracer, d as Tracer, R as RuntimeSpan, e as InMemoryTracerOptions } from './tracer-
|
|
2
|
-
import { T as TraceContext, R as RuntimeHooks, A as Async, J as JSONValue, B as Baggage,
|
|
3
|
-
import {
|
|
4
|
-
import { A as AdaptiveLimiterStats } from './
|
|
1
|
+
import { a as MetricExemplar, b as MetricSnapshot, M as MetricsRegistry, T as TraceSampler, c as TraceSamplingInput, E as EventBus, B as BrassEnv, I as InMemoryTracer, d as Tracer, R as RuntimeSpan, e as InMemoryTracerOptions } from './tracer-DzfuE6um.js';
|
|
2
|
+
import { T as TraceContext, R as RuntimeHooks, A as Async, J as JSONValue, B as Baggage, b as Runtime, h as RuntimeRegistry, a as RuntimeOptions } from './effect-CtUDl5M5.js';
|
|
3
|
+
import { C as CircuitBreakerStats } from './layer-BalPI6cN.js';
|
|
4
|
+
import { A as AdaptiveLimiterStats } from './defaultClient-DhpCQW9m.js';
|
|
5
5
|
|
|
6
6
|
declare const PROMETHEUS_CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
|
|
7
7
|
declare const OTLP_JSON_CONTENT_TYPE = "application/json";
|
|
@@ -412,6 +412,17 @@ type ObservabilityOtlpOptions = {
|
|
|
412
412
|
readonly retry?: ExportRetryOptions;
|
|
413
413
|
readonly pipeline?: ExportPipelineTuning;
|
|
414
414
|
};
|
|
415
|
+
type ObservabilityOtlpSignal = "metrics" | "traces" | "logs";
|
|
416
|
+
type MakeOtlpOptionsInput = {
|
|
417
|
+
readonly endpoint: string;
|
|
418
|
+
readonly headers?: ObservabilityOtlpOptions["headers"];
|
|
419
|
+
readonly fetch?: ObservabilityOtlpOptions["fetch"];
|
|
420
|
+
readonly timeoutMs?: ObservabilityOtlpOptions["timeoutMs"];
|
|
421
|
+
readonly retry?: ObservabilityOtlpOptions["retry"];
|
|
422
|
+
readonly pipeline?: ObservabilityOtlpOptions["pipeline"];
|
|
423
|
+
readonly signals?: readonly ObservabilityOtlpSignal[];
|
|
424
|
+
};
|
|
425
|
+
declare function makeOtlpOptions(input: MakeOtlpOptionsInput): ObservabilityOtlpOptions;
|
|
415
426
|
type ObservabilityOptions = {
|
|
416
427
|
readonly serviceName?: string;
|
|
417
428
|
readonly serviceVersion?: string;
|
|
@@ -672,4 +683,4 @@ type ObservedHttpServerResult<A> = {
|
|
|
672
683
|
declare function runObservedHttpServerEffect<R extends object = {}, E = never, A = never>(observability: Observability, input: RequestObservabilityContextInput, effect: Async<R, E, A>, options?: HttpServerObservabilityOptions<A>, env?: R, runtimeOptions?: RequestObservabilityRuntimeOptions<R>): Promise<ObservedHttpServerResult<A>>;
|
|
673
684
|
declare function observeHttpServerRequest<A>(observability: Observability, input: RequestObservabilityContextInput, handler: (ctx: RequestObservabilityContext) => Promise<A>, options?: HttpServerObservabilityOptions<A>): Promise<ObservedHttpServerResult<A>>;
|
|
674
685
|
|
|
675
|
-
export { type
|
|
686
|
+
export { type RuntimeHealthOptions as $, type ObservabilityRedactor as A, type ObservabilityRequestEnvInput as B, type CardinalityConfig as C, type ObservabilityTraceExportResult as D, type ExportBatchResult as E, type ObservedHttpServerResult as F, type OtlpAttributeValue as G, type HealthCheck as H, type InjectTraceContextOptions as I, type OtlpExportOptions as J, type OtlpFetch as K, type LogLevel as L, type MakeOtlpOptionsInput as M, type OtlpHttpExportResult as N, type Observability as O, type OtlpHttpExporterOptions as P, type OtlpHttpResponse as Q, type RequestObservabilityContextInput as R, type SpanAttributes as S, type TraceContextCarrier as T, PROMETHEUS_CONTENT_TYPE as U, type PrometheusMetricsExporter as V, type PrometheusMetricsOptions as W, type RedactionConfig as X, type RedactionOptions as Y, type RequestObservabilityRuntimeOptions as Z, type ResolvedTraceSampling as _, type RequestObservabilityContext as a, spanLink as a$, type RuntimeHealthReport as a0, type RuntimeMetricsSinkOptions as a1, type SpanLink as a2, type SpanOptions as a3, type SpanSource as a4, type StructuredLogRecord as a5, type StructuredLogSinkOptions as a6, type StructuredLogSource as a7, type TraceContextHeaderValue as a8, type TraceSamplingConfig as a9, makeOtlpOptions as aA, makePrometheusMetricsExporter as aB, makeRequestObservabilityContext as aC, makeRuntimeHealth as aD, makeRuntimeMetricsSink as aE, makeStructuredLogSink as aF, makeTraceSampler as aG, metricsSnapshotToOtlp as aH, normalizeHttpRoute as aI, normalizeSpanId as aJ, normalizeTraceId as aK, observeHttpServerRequest as aL, otlpAnyValue as aM, parseBaggage as aN, parseTraceparent as aO, postOtlpJson as aP, ratioSampler as aQ, readiness as aR, resolveRequestBaggage as aS, resolveRequestTraceSeed as aT, resolveTraceSampling as aU, runObservedHttpServerEffect as aV, runtimeHealth as aW, sanitizeHttpTarget as aX, shouldSampleWith as aY, snapshotRuntimeHealth as aZ, spanEvent as a_, type TraceSamplingOptions as aa, type TraceSamplingRule as ab, alwaysOffSampler as ac, alwaysOnSampler as ad, currentBaggage as ae, currentSpanLink as af, defaultStructuredLogWriter as ag, exemplarFromTraceContext as ah, exportWithRetry as ai, extractBaggage as aj, extractTraceContext as ak, formatBaggage as al, formatPrometheusMetrics as am, formatStructuredLog as an, formatTraceparent as ao, healthToHttpResponse as ap, injectBaggage as aq, injectTraceContext as ar, logEffect as as, makeCardinalityLimitedMetrics as at, makeExportPipeline as au, makeObservability as av, makeObservabilityRedactor as aw, makeOtlpHttpLogExporter as ax, makeOtlpHttpMetricsExporter as ay, makeOtlpHttpSpanExporter as az, type ObservabilityOptions as b, spansToOtlp as b0, structuredLogsToOtlp as b1, toOtlpAttributes as b2, unixNanoFromMs as b3, withBaggage as b4, withLogContext as b5, withSpan as b6, withTimeout as b7, type ObservabilityRuntimeEnv as c, type CardinalityLimiterOptions as d, type ExportPipeline as e, type ExportPipelineFlushOptions as f, type ExportPipelineFlushResult as g, type ExportPipelineOptions as h, type ExportPipelineStats as i, type ExportPipelineTuning as j, type ExportRetryOptions as k, type ExportSignal as l, type HealthCheckResult as m, type HealthHttpResponse as n, type HealthStatus as o, type HttpServerObservabilityLogOptions as p, type HttpServerObservabilityOptions as q, type HttpServerObservabilitySpanOptions as r, type HttpServerOutcome as s, OTLP_JSON_CONTENT_TYPE as t, type ObservabilityExporters as u, type ObservabilityFlushError as v, type ObservabilityFlushResult as w, type ObservabilityLogExportResult as x, type ObservabilityOtlpOptions as y, type ObservabilityOtlpSignal as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RuntimeHooks,
|
|
2
|
-
import { R as RuntimeClock } from './
|
|
1
|
+
import { R as RuntimeHooks, c as RingBufferOptions, d as RuntimeEvent, e as RuntimeEmitContext, f as RuntimeEventRecord, g as RuntimeSpanLink, T as TraceContext, B as Baggage } from './effect-CtUDl5M5.js';
|
|
2
|
+
import { R as RuntimeClock } from './layer-BalPI6cN.js';
|
|
3
3
|
|
|
4
4
|
type MetricType = "counter" | "gauge" | "histogram";
|
|
5
5
|
type MetricValue = {
|
package/docs/README.md
CHANGED
|
@@ -6,6 +6,10 @@ Start here:
|
|
|
6
6
|
- **[Architecture](./ARCHITECTURE.md)** — how the runtime is structured
|
|
7
7
|
- **[Cancellation & interruption](./cancellation.md)** — interruption semantics, scopes, and cancellable `Async`
|
|
8
8
|
- **[Observability](./observability.md)** — hooks, events, sinks, tracing, and HTTP policy context
|
|
9
|
+
- **[Framework integrations](./framework-integrations.md)** — Vanilla, React, Next.js, Angular, Express, Fastify, and Nest patterns
|
|
10
|
+
- **[Runnable examples](https://github.com/BaldrVivaldelli/brass-runtime/tree/main/examples)** — Vanilla, Express, NestJS, Next.js, React, Angular, and shared helper apps
|
|
11
|
+
- **[NestJS integration](./frameworks/nestjs.md)** — Brass module, Grafana/OTLP observability, HTTP client DI, and inbound spans
|
|
12
|
+
- **[Article: HTTP and observability in Brass](./articles/brass-runtime-http-observability.md)** — narrative summary of the HTTP, policy, transport, and observability work
|
|
9
13
|
- **[HTTP client](./http.md)** — ZIO-style HTTP built on brass-runtime
|
|
10
14
|
- **[HTTP recipes](./http-recipes.md)** — typed clients, custom transports, production adoption, observability, and config validation
|
|
11
15
|
- **[Recipes](./recipes/README.md)** — copyable runtime, layer, HTTP server, testing, and performance paths
|
package/docs/ai/PUBLIC_API.md
CHANGED
|
@@ -49,8 +49,11 @@ Primary categories:
|
|
|
49
49
|
`TestRuntime`, `TestScheduler`, `TestClock`, and testing helpers
|
|
50
50
|
- Layer 2.0 dependency graph helpers: `Layer`, `LayerContext`,
|
|
51
51
|
`ServiceTag`, `makeServiceTag`, `layerValue`, `layerEffect`,
|
|
52
|
-
`defineService`, `getService`, `
|
|
53
|
-
`
|
|
52
|
+
`defineService`, `getService`, `getServices`, `useService`,
|
|
53
|
+
`useServices`, `composeAll`, `mergeAll`, `makeConfigLayer`,
|
|
54
|
+
`makeRuntimeLayer`, `RuntimeService`, `makeTestLayer`, `makeTestLayers`,
|
|
55
|
+
`formatLayerError`, `buildLayer`, `makeLayerScope`, `provide`, and
|
|
56
|
+
`provideLayerContext`
|
|
54
57
|
- worker pool, tracing, metrics, runtime observability hooks/events
|
|
55
58
|
- typed errors
|
|
56
59
|
- runtime engines and capabilities
|
|
@@ -81,7 +84,11 @@ Observability helpers include `RuntimeHooks`, `RuntimeEvent`,
|
|
|
81
84
|
`Schedule.driver` / `makeScheduleDriver`, runtime-clock-aware schedule runners,
|
|
82
85
|
supervisor APIs, `makeRuntime` / `runPromise` / `runExit`, and Layer 2.0
|
|
83
86
|
primitives for typed service tags, immutable contexts, scoped memoized builds,
|
|
84
|
-
|
|
87
|
+
multi-layer `Layer.all(...)` composition for independent layers,
|
|
88
|
+
`Layer.composeAll(...)` for ordered context graphs, typed `Layer.use(...)` /
|
|
89
|
+
`Layer.useAll(...)` accessors, schema-backed config layers, runtime service
|
|
90
|
+
layers, test-service replacement layers, missing-service formatting, and
|
|
91
|
+
idempotent release.
|
|
85
92
|
|
|
86
93
|
## HTTP export: `brass-runtime/http`
|
|
87
94
|
|
|
@@ -90,8 +97,11 @@ Source: `src/http/index.ts`
|
|
|
90
97
|
Recommended API order:
|
|
91
98
|
|
|
92
99
|
- `makeDefaultHttpClient` for the one-stop default client with JSON/text
|
|
93
|
-
helpers, lifecycle presets (`production`, `default`, `balanced`,
|
|
100
|
+
helpers, lifecycle presets (`production`, `default`, `balanced`,
|
|
101
|
+
`highThroughputProxy`, `proxy`, `minimal`),
|
|
94
102
|
compression, stats, cache controls, `cancelAll`, and middleware integration.
|
|
103
|
+
- `HttpClientService` and `makeDefaultHttpClientLayer` for optional Layer/DI
|
|
104
|
+
application graphs with owned default-client lifecycle.
|
|
95
105
|
- `makeHttpRouter`, `route` / `httpRoute`, and `makeNodeHttpServerResource`
|
|
96
106
|
for the first-party HTTP server MVP: Node adapter, simple router,
|
|
97
107
|
effect-based middleware, schema validation, observability, runtime
|
|
@@ -114,6 +124,10 @@ Recommended API order:
|
|
|
114
124
|
- `HttpTransport`, `HttpStreamTransport`, `makeFetchTransport`, and
|
|
115
125
|
`makeFetchStreamTransport` for replacing the default fetch-backed transport
|
|
116
126
|
with an effect-based backend such as Axios, undici, or test doubles.
|
|
127
|
+
- `makeNodeHttpProxyClient`, `makeNodeHttpTransport`, `NodeHttpTransport`, and
|
|
128
|
+
`NodeHttpTransportConfig` for Node-only BFF/proxy workloads that should use
|
|
129
|
+
`node:http` / `node:https` keep-alive agents instead of the default fetch
|
|
130
|
+
backend.
|
|
117
131
|
- `makePromiseHttpTransport`, `promiseHttpTransport`, and
|
|
118
132
|
`normalizeHttpHeaders` for adapting Promise-based clients without writing
|
|
119
133
|
`Async.async` / `Cause.fail` plumbing in consuming projects; the fluent
|
|
@@ -144,7 +158,7 @@ Primary categories:
|
|
|
144
158
|
- HTTP server router, Node adapter, response helpers, and server resources
|
|
145
159
|
- HTTP runtime probe helpers: `makeRuntimeHealthRoute` and
|
|
146
160
|
`makeRuntimeReadinessRoute`
|
|
147
|
-
- production HTTP client presets (`minimal`, `balanced`, `default`)
|
|
161
|
+
- production HTTP client presets (`minimal`, `proxy`, `highThroughputProxy`, `balanced`, `default`, `production`)
|
|
148
162
|
- dependency-free schema validation for JSON responses
|
|
149
163
|
- builder API for default HTTP client configuration
|
|
150
164
|
- adaptive limiter presets, diagnostics, and public config helper
|
|
@@ -164,7 +178,8 @@ Source: `src/http/testing.ts`
|
|
|
164
178
|
|
|
165
179
|
Dependency-free helpers for users' test suites:
|
|
166
180
|
|
|
167
|
-
- `makeMockHttpClient`, `makeSequenceHttpClient
|
|
181
|
+
- `makeMockHttpClient`, `makeSequenceHttpClient`,
|
|
182
|
+
`makeMockDefaultHttpClient`, and `makeMockDefaultHttpClientLayer`
|
|
168
183
|
- `makeHttpResponse`, `makeTextHttpResponse`, `makeJsonHttpResponse`
|
|
169
184
|
- `runHttpEffect`
|
|
170
185
|
- `installMockFetch`, `withMockFetch`
|
|
@@ -221,9 +236,15 @@ Primary categories:
|
|
|
221
236
|
- structured log sink plus effect-level logging helpers
|
|
222
237
|
- `withSpan` and `spanEvent` for trace spans across effect composition
|
|
223
238
|
- `makeObservability` production preset with `flush()` and `shutdown()`
|
|
239
|
+
- `ObservabilityService`, `makeObservabilityLayer`,
|
|
240
|
+
`makeObservedRuntimeLayer`, and `makeObservedHttpClientLayer` for optional
|
|
241
|
+
Layer/DI wiring across observability, runtime, and HTTP without making any
|
|
242
|
+
factory mandatory.
|
|
224
243
|
- `withHttpObservability` middleware for HTTP client metrics, logs, spans, and
|
|
225
244
|
W3C `traceparent` injection, including request-policy context in logs/spans
|
|
226
|
-
and opt-in policy metric labels
|
|
245
|
+
and opt-in policy metric labels. Hot proxy paths can use
|
|
246
|
+
`spans: { events: false, sampleRate }` plus `spanSink` to emit sampled HTTP
|
|
247
|
+
spans without enabling global runtime hooks.
|
|
227
248
|
- `HTTP_OBSERVABILITY_CONTRACT` for stable dashboard metric names, label names,
|
|
228
249
|
span attribute names, and structured log message names
|
|
229
250
|
- adaptive limiter gauges and HTTP span attributes when the wrapped client
|
|
@@ -234,6 +255,9 @@ Primary categories:
|
|
|
234
255
|
- production hardening helpers for exporter pipelines, sampling, redaction,
|
|
235
256
|
metric-cardinality limiting, environment presets, no-op setup, and inbound
|
|
236
257
|
adapters for Fetch/Node/Express/Fastify-style request objects
|
|
258
|
+
- `makeOtlpOptions` for turning a backend-neutral OTLP HTTP collector endpoint
|
|
259
|
+
into metrics/traces/logs URLs while forwarding headers, custom `fetch`,
|
|
260
|
+
timeout, retry, pipeline tuning, and optional signal selection
|
|
237
261
|
- OTLP log export, server-side HTTP request metrics/spans, span retention
|
|
238
262
|
pruning, single-flight flush behavior, collector smoke script, and
|
|
239
263
|
observability benchmark budgets
|