brass-runtime 1.17.0 → 1.18.1
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 +36 -3
- 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-7X3K5RMS.js → chunk-22HZQG5F.js} +9 -11
- package/dist/{chunk-GLE2WY7Z.cjs → chunk-2JHJ4YHS.cjs} +417 -124
- package/dist/{chunk-Q2I37RP3.cjs → chunk-2OW6IFY2.cjs} +44 -323
- package/dist/{chunk-7ZPEZ57L.cjs → chunk-5LC7V2OZ.cjs} +18 -20
- package/dist/{chunk-AGR5B2BC.cjs → chunk-5RZ7YITF.cjs} +564 -12
- package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
- package/dist/{chunk-EJ6BPYVR.mjs → chunk-6V2AWT4R.mjs} +1 -1
- package/dist/{chunk-3AYM6WPJ.js → chunk-7DU7IQHK.js} +20 -299
- package/dist/{chunk-SK7UZRNI.mjs → chunk-7GBJYOX7.mjs} +528 -23
- package/dist/chunk-7TKI527D.cjs +123 -0
- package/dist/{chunk-52OB2ROS.js → chunk-7VQLEN37.js} +2 -4
- package/dist/{chunk-KH4SYAOS.mjs → chunk-B5FKOLTB.mjs} +20 -299
- package/dist/{chunk-FHQGHPMO.mjs → chunk-BC6Q6BCO.mjs} +2 -4
- package/dist/{chunk-4P2HHGAX.mjs → chunk-COOW7BJX.mjs} +32 -11
- package/dist/{chunk-2HQTDLHF.mjs → chunk-EEN5OTCR.mjs} +555 -3
- package/dist/{chunk-KZJQ723N.cjs → chunk-EICAJDNX.cjs} +13 -15
- package/dist/chunk-ELIECDYN.cjs +33 -0
- package/dist/{chunk-GYM3LLGS.mjs → chunk-H626ZTDZ.mjs} +399 -106
- package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
- package/dist/{chunk-7JIJOVCT.js → chunk-IPSMXUWA.js} +2 -4
- package/dist/{chunk-4ROBZFL6.cjs → chunk-J6DUHITE.cjs} +6 -8
- package/dist/{chunk-6RY2FFN4.mjs → chunk-JWIEMBE6.mjs} +9 -11
- package/dist/{chunk-PD4EJTQC.cjs → chunk-KNTJ7FQB.cjs} +5 -5
- package/dist/chunk-KTGDLBLD.mjs +123 -0
- package/dist/chunk-LSYQ3C2M.js +33 -0
- package/dist/{chunk-RKGKFN2A.js → chunk-OW5VHAOE.js} +1 -1
- package/dist/{chunk-EOC4UHBS.mjs → chunk-RBHNOKH4.mjs} +2 -2
- package/dist/{chunk-6IXXWIUM.js → chunk-S4HXADU4.js} +555 -3
- package/dist/{chunk-FH2X7BVP.js → chunk-TTSPIU3U.js} +399 -106
- package/dist/{chunk-5QC7LRZ3.js → chunk-UAKAF32U.js} +2 -2
- package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
- package/dist/{chunk-MBEJI5HF.mjs → chunk-WCBNXPN6.mjs} +2 -4
- package/dist/{chunk-52PPNNI4.cjs → chunk-WGE2FEZE.cjs} +2 -2
- package/dist/{chunk-WBGRHGBP.cjs → chunk-WI7GZF3B.cjs} +114 -93
- package/dist/chunk-WUDHOZIH.js +6234 -0
- package/dist/{chunk-F6XWZQY4.cjs → chunk-WVSZOPGQ.cjs} +583 -78
- package/dist/chunk-XPIMJQYS.cjs +6234 -0
- package/dist/{chunk-VWIPB6I5.js → chunk-YGR2IN4R.js} +528 -23
- package/dist/chunk-YM3EDNYD.js +123 -0
- package/dist/chunk-YWLLH27R.mjs +33 -0
- package/dist/{chunk-BKK77SBA.js → chunk-YZ5LQ32F.js} +32 -11
- package/dist/chunk-Z3ZZMQUZ.mjs +6234 -0
- package/dist/core/index.cjs +37 -9
- package/dist/core/index.d.ts +19 -152
- package/dist/core/index.js +86 -58
- package/dist/core/index.mjs +86 -58
- package/dist/defaultClient-Cid0JoUR.d.ts +1648 -0
- package/dist/{effect-DIUHZ9IN.d.ts → effect-DnGUuhw6.d.ts} +22 -1
- package/dist/http/index.cjs +206 -59
- package/dist/http/index.d.ts +55 -819
- package/dist/http/index.js +220 -73
- package/dist/http/index.mjs +220 -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 +116 -88
- package/dist/index.d.ts +9 -8
- package/dist/index.js +87 -59
- package/dist/index.mjs +87 -59
- package/dist/{schedule-CK3Ml_7p.d.ts → layer-D2LFcBVx.d.ts} +176 -2
- package/dist/observability/index.cjs +20 -7
- package/dist/observability/index.d.ts +32 -8
- package/dist/observability/index.js +19 -6
- package/dist/observability/index.mjs +19 -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-D6JZ15_e.d.ts → server-Bf1zNYZk.d.ts} +5 -5
- package/dist/{stream-B4oK9JFP.d.ts → stream-I7bkvF7a.d.ts} +1 -1
- package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DF83nLn6.d.ts} +2 -2
- package/dist/{tracing-DqbTKGcf.d.ts → tracing-CWV4gT0u.d.ts} +1 -1
- package/docs/README.md +2 -0
- package/docs/ai/PUBLIC_API.md +28 -7
- package/docs/articles/brass-runtime-http-observability.md +467 -0
- package/docs/frameworks/angular.md +51 -0
- package/docs/frameworks/express.md +58 -0
- package/docs/frameworks/fastify.md +49 -0
- package/docs/frameworks/nestjs.md +53 -0
- package/docs/frameworks/nextjs.md +55 -0
- package/docs/frameworks/react.md +44 -0
- package/docs/frameworks/vanilla.md +56 -0
- package/docs/guides/layers.md +130 -0
- package/docs/http-recipes.md +31 -1
- package/docs/http.md +50 -1
- package/docs/observability.md +132 -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 +6 -2
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { L as LogLevel, S as SpanAttributes, O as Observability, T as TraceContextCarrier, R as RequestObservabilityContextInput, a as RequestObservabilityContext, b as ObservabilityOptions } from '../server-
|
|
2
|
-
export { C as CardinalityConfig,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import '../
|
|
6
|
-
import '../
|
|
7
|
-
import '../stream-
|
|
1
|
+
import { L as LogLevel, S as SpanAttributes, O as Observability, T as TraceContextCarrier, R as RequestObservabilityContextInput, a as RequestObservabilityContext, b as ObservabilityOptions, c as ObservabilityRuntimeEnv } from '../server-Bf1zNYZk.js';
|
|
2
|
+
export { C as CardinalityConfig, d as CardinalityLimiterOptions, E as ExportBatchResult, e as ExportPipeline, f as ExportPipelineFlushOptions, g as ExportPipelineFlushResult, h as ExportPipelineOptions, i as ExportPipelineStats, j as ExportPipelineTuning, k as ExportRetryOptions, l as ExportSignal, H as HealthCheck, m as HealthCheckResult, n as HealthHttpResponse, o as HealthStatus, p as HttpServerObservabilityLogOptions, q as HttpServerObservabilityOptions, r as HttpServerObservabilitySpanOptions, s as HttpServerOutcome, I as InjectTraceContextOptions, M as MakeOtlpOptionsInput, t as OTLP_JSON_CONTENT_TYPE, u as ObservabilityExporters, v as ObservabilityFlushError, w as ObservabilityFlushResult, x as ObservabilityLogExportResult, y as ObservabilityOtlpOptions, z as ObservabilityOtlpSignal, A as ObservabilityRedactor, B as ObservabilityRequestEnvInput, D as ObservabilityTraceExportResult, F as ObservedHttpServerResult, G as OtlpAttributeValue, J as OtlpExportOptions, K as OtlpFetch, N as OtlpHttpExportResult, P as OtlpHttpExporterOptions, Q as OtlpHttpResponse, U as PROMETHEUS_CONTENT_TYPE, V as PrometheusMetricsExporter, W as PrometheusMetricsOptions, X as RedactionConfig, Y as RedactionOptions, Z as RequestObservabilityRuntimeOptions, _ as ResolvedTraceSampling, $ as RuntimeHealthOptions, a0 as RuntimeHealthReport, a1 as RuntimeMetricsSinkOptions, a2 as SpanLink, a3 as SpanOptions, a4 as SpanSource, a5 as StructuredLogRecord, a6 as StructuredLogSinkOptions, a7 as StructuredLogSource, a8 as TraceContextHeaderValue, a9 as TraceSamplingConfig, aa as TraceSamplingOptions, ab as TraceSamplingRule, ac as alwaysOffSampler, ad as alwaysOnSampler, ae as currentBaggage, af as currentSpanLink, ag as defaultStructuredLogWriter, ah as exemplarFromTraceContext, ai as exportWithRetry, aj as extractBaggage, ak as extractTraceContext, al as formatBaggage, am as formatPrometheusMetrics, an as formatStructuredLog, ao as formatTraceparent, ap as healthToHttpResponse, aq as injectBaggage, ar as injectTraceContext, as as logEffect, at as makeCardinalityLimitedMetrics, au as makeExportPipeline, av as makeObservability, aw as makeObservabilityRedactor, ax as makeOtlpHttpLogExporter, ay as makeOtlpHttpMetricsExporter, az as makeOtlpHttpSpanExporter, aA as makeOtlpOptions, aB as makePrometheusMetricsExporter, aC as makeRequestObservabilityContext, aD as makeRuntimeHealth, aE as makeRuntimeMetricsSink, aF as makeStructuredLogSink, aG as makeTraceSampler, aH as metricsSnapshotToOtlp, aI as normalizeHttpRoute, aJ as normalizeSpanId, aK as normalizeTraceId, aL as observeHttpServerRequest, aM as otlpAnyValue, aN as parseBaggage, aO as parseTraceparent, aP as postOtlpJson, aQ as ratioSampler, aR as readiness, aS as resolveRequestBaggage, aT as resolveRequestTraceSeed, aU as resolveTraceSampling, aV as runObservedHttpServerEffect, aW as runtimeHealth, aX as sanitizeHttpTarget, aY as shouldSampleWith, aZ as snapshotRuntimeHealth, a_ as spanEvent, a$ as spanLink, b0 as spansToOtlp, b1 as structuredLogsToOtlp, b2 as toOtlpAttributes, b3 as unixNanoFromMs, b4 as withBaggage, b5 as withLogContext, b6 as withSpan, b7 as withTimeout } from '../server-Bf1zNYZk.js';
|
|
3
|
+
import { R as RuntimeHooks, a as RuntimeOptions, b as Runtime } from '../effect-DnGUuhw6.js';
|
|
4
|
+
import { M as MetricsRegistry } from '../tracer-DF83nLn6.js';
|
|
5
|
+
import { H as HttpRequest, d as HttpMiddleware, e as DefaultHttpClientConfig, D as DefaultHttpClient } from '../defaultClient-Cid0JoUR.js';
|
|
6
|
+
import { a as LayerContext, S as ServiceTag, L as Layer } from '../layer-D2LFcBVx.js';
|
|
7
|
+
import '../stream-I7bkvF7a.js';
|
|
8
8
|
import '../schema/index.js';
|
|
9
9
|
|
|
10
10
|
type HttpOutcome = "success" | "error" | "abort" | "bad_url" | "fetch_error" | "timeout" | "pool_rejected" | "pool_timeout" | "pool_closed" | "batch_split_error";
|
|
@@ -16,6 +16,8 @@ type HttpObservabilityLogOptions = {
|
|
|
16
16
|
type HttpObservabilitySpanOptions = {
|
|
17
17
|
readonly name?: string | ((req: HttpRequest) => string);
|
|
18
18
|
readonly attributes?: SpanAttributes | ((req: HttpRequest) => SpanAttributes);
|
|
19
|
+
readonly events?: boolean;
|
|
20
|
+
readonly sampleRate?: number;
|
|
19
21
|
};
|
|
20
22
|
type HttpAdaptiveLimiterObservabilityOptions = {
|
|
21
23
|
readonly enabled?: boolean;
|
|
@@ -38,6 +40,7 @@ type HttpObservabilityOptions = {
|
|
|
38
40
|
readonly metrics?: MetricsRegistry | false;
|
|
39
41
|
readonly logs?: false | HttpObservabilityLogOptions;
|
|
40
42
|
readonly spans?: false | HttpObservabilitySpanOptions;
|
|
43
|
+
readonly spanSink?: RuntimeHooks | false;
|
|
41
44
|
readonly adaptiveLimiter?: boolean | HttpAdaptiveLimiterObservabilityOptions;
|
|
42
45
|
readonly policy?: boolean | HttpPolicyObservabilityOptions;
|
|
43
46
|
readonly injectTraceHeaders?: boolean;
|
|
@@ -149,4 +152,25 @@ declare function makeObservabilityFromEnv(env?: ObservabilityEnv, overrides?: Ob
|
|
|
149
152
|
declare function observabilityOptionsForPreset(preset: Exclude<ObservabilityPreset, "disabled">): ObservabilityOptions;
|
|
150
153
|
declare function observabilityOptionsFromEnv(env?: ObservabilityEnv, preset?: Exclude<ObservabilityPreset, "disabled">): ObservabilityOptions;
|
|
151
154
|
|
|
152
|
-
|
|
155
|
+
declare const ObservabilityService: ServiceTag<Observability>;
|
|
156
|
+
type ObservabilityLayerConfig = ObservabilityOptions | ((context: LayerContext) => ObservabilityOptions);
|
|
157
|
+
type ObservabilityLayerOptions = {
|
|
158
|
+
readonly tag?: ServiceTag<Observability>;
|
|
159
|
+
};
|
|
160
|
+
type ObservedHttpClientLayerConfig = DefaultHttpClientConfig | ((context: LayerContext, observability: Observability) => DefaultHttpClientConfig);
|
|
161
|
+
type ObservedHttpClientLayerOptions = {
|
|
162
|
+
readonly observabilityTag?: ServiceTag<Observability>;
|
|
163
|
+
readonly httpTag?: ServiceTag<DefaultHttpClient>;
|
|
164
|
+
readonly httpObservability?: HttpObservabilityOptions | ((context: LayerContext, observability: Observability) => HttpObservabilityOptions);
|
|
165
|
+
};
|
|
166
|
+
type ObservedRuntimeLayerEnv<R extends object> = R | ((context: LayerContext, observability: Observability) => R);
|
|
167
|
+
type ObservedRuntimeLayerOptions<R extends object> = Omit<RuntimeOptions<R & ObservabilityRuntimeEnv>, "env" | "hooks"> & {
|
|
168
|
+
readonly observabilityTag?: ServiceTag<Observability>;
|
|
169
|
+
readonly runtimeTag?: ServiceTag<Runtime<R & ObservabilityRuntimeEnv>>;
|
|
170
|
+
readonly env?: ObservedRuntimeLayerEnv<R>;
|
|
171
|
+
};
|
|
172
|
+
declare function makeObservabilityLayer(config?: ObservabilityLayerConfig, options?: ObservabilityLayerOptions): Layer<LayerContext, unknown, LayerContext>;
|
|
173
|
+
declare function makeObservedRuntimeLayer<R extends object = {}>(options?: ObservedRuntimeLayerOptions<R>): Layer<LayerContext, unknown, LayerContext>;
|
|
174
|
+
declare function makeObservedHttpClientLayer(config?: ObservedHttpClientLayerConfig, options?: ObservedHttpClientLayerOptions): Layer<LayerContext, unknown, LayerContext>;
|
|
175
|
+
|
|
176
|
+
export { type ExpressLikeRequest, type FastifyLikeRequest, type FetchLikeRequest, HTTP_OBSERVABILITY_CONTRACT, type HttpAdaptiveLimiterObservabilityOptions, type HttpObservabilityLogOptions, type HttpObservabilityOptions, type HttpObservabilitySpanOptions, type HttpOutcome, type HttpPolicyLabelKey, type HttpPolicyObservabilityOptions, LogLevel, type NodeLikeIncomingMessage, Observability, type ObservabilityEnv, type ObservabilityLayerConfig, type ObservabilityLayerOptions, ObservabilityOptions, type ObservabilityPreset, ObservabilityRuntimeEnv, ObservabilityService, type ObservedHttpClientLayerConfig, type ObservedHttpClientLayerOptions, type ObservedRuntimeLayerEnv, type ObservedRuntimeLayerOptions, RequestObservabilityContext, RequestObservabilityContextInput, SpanAttributes, TraceContextCarrier, makeExpressRequestObservabilityContext, makeFastifyRequestObservabilityContext, makeFetchRequestObservabilityContext, makeHttpObservabilityMiddleware, makeNodeRequestObservabilityContext, makeNoopObservability, makeObservabilityFromEnv, makeObservabilityLayer, makeObservabilityPreset, makeObservedHttpClientLayer, makeObservedRuntimeLayer, observabilityOptionsForPreset, observabilityOptionsFromEnv, withFetchRequestObservability, withHttpObservability, withNodeRequestObservability };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HTTP_OBSERVABILITY_CONTRACT,
|
|
3
|
+
ObservabilityService,
|
|
3
4
|
makeExpressRequestObservabilityContext,
|
|
4
5
|
makeFastifyRequestObservabilityContext,
|
|
5
6
|
makeFetchRequestObservabilityContext,
|
|
@@ -7,13 +8,17 @@ import {
|
|
|
7
8
|
makeNodeRequestObservabilityContext,
|
|
8
9
|
makeNoopObservability,
|
|
9
10
|
makeObservabilityFromEnv,
|
|
11
|
+
makeObservabilityLayer,
|
|
10
12
|
makeObservabilityPreset,
|
|
13
|
+
makeObservedHttpClientLayer,
|
|
14
|
+
makeObservedRuntimeLayer,
|
|
11
15
|
observabilityOptionsForPreset,
|
|
12
16
|
observabilityOptionsFromEnv,
|
|
13
17
|
withFetchRequestObservability,
|
|
14
18
|
withHttpObservability,
|
|
15
19
|
withNodeRequestObservability
|
|
16
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-YGR2IN4R.js";
|
|
21
|
+
import "../chunk-LSYQ3C2M.js";
|
|
17
22
|
import {
|
|
18
23
|
OTLP_JSON_CONTENT_TYPE,
|
|
19
24
|
PROMETHEUS_CONTENT_TYPE,
|
|
@@ -77,16 +82,21 @@ import {
|
|
|
77
82
|
withLogContext,
|
|
78
83
|
withSpan,
|
|
79
84
|
withTimeout
|
|
80
|
-
} from "../chunk-
|
|
81
|
-
import "../chunk-
|
|
82
|
-
import "../chunk-
|
|
83
|
-
import "../chunk-
|
|
85
|
+
} from "../chunk-YZ5LQ32F.js";
|
|
86
|
+
import "../chunk-OW5VHAOE.js";
|
|
87
|
+
import "../chunk-WUDHOZIH.js";
|
|
88
|
+
import "../chunk-TRM4JUZQ.js";
|
|
89
|
+
import "../chunk-IPSMXUWA.js";
|
|
90
|
+
import "../chunk-UCUBNWM2.js";
|
|
91
|
+
import "../chunk-S4HXADU4.js";
|
|
92
|
+
import "../chunk-TTSPIU3U.js";
|
|
84
93
|
import "../chunk-UB4B6OFY.js";
|
|
85
|
-
import "../chunk-
|
|
94
|
+
import "../chunk-HCJ4S3YB.js";
|
|
86
95
|
import "../chunk-3RG5ZIWI.js";
|
|
87
96
|
export {
|
|
88
97
|
HTTP_OBSERVABILITY_CONTRACT,
|
|
89
98
|
OTLP_JSON_CONTENT_TYPE,
|
|
99
|
+
ObservabilityService,
|
|
90
100
|
PROMETHEUS_CONTENT_TYPE,
|
|
91
101
|
alwaysOffSampler,
|
|
92
102
|
alwaysOnSampler,
|
|
@@ -115,8 +125,11 @@ export {
|
|
|
115
125
|
makeNoopObservability,
|
|
116
126
|
makeObservability,
|
|
117
127
|
makeObservabilityFromEnv,
|
|
128
|
+
makeObservabilityLayer,
|
|
118
129
|
makeObservabilityPreset,
|
|
119
130
|
makeObservabilityRedactor,
|
|
131
|
+
makeObservedHttpClientLayer,
|
|
132
|
+
makeObservedRuntimeLayer,
|
|
120
133
|
makeOtlpHttpLogExporter,
|
|
121
134
|
makeOtlpHttpMetricsExporter,
|
|
122
135
|
makeOtlpHttpSpanExporter,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HTTP_OBSERVABILITY_CONTRACT,
|
|
3
|
+
ObservabilityService,
|
|
3
4
|
makeExpressRequestObservabilityContext,
|
|
4
5
|
makeFastifyRequestObservabilityContext,
|
|
5
6
|
makeFetchRequestObservabilityContext,
|
|
@@ -7,13 +8,17 @@ import {
|
|
|
7
8
|
makeNodeRequestObservabilityContext,
|
|
8
9
|
makeNoopObservability,
|
|
9
10
|
makeObservabilityFromEnv,
|
|
11
|
+
makeObservabilityLayer,
|
|
10
12
|
makeObservabilityPreset,
|
|
13
|
+
makeObservedHttpClientLayer,
|
|
14
|
+
makeObservedRuntimeLayer,
|
|
11
15
|
observabilityOptionsForPreset,
|
|
12
16
|
observabilityOptionsFromEnv,
|
|
13
17
|
withFetchRequestObservability,
|
|
14
18
|
withHttpObservability,
|
|
15
19
|
withNodeRequestObservability
|
|
16
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-7GBJYOX7.mjs";
|
|
21
|
+
import "../chunk-YWLLH27R.mjs";
|
|
17
22
|
import {
|
|
18
23
|
OTLP_JSON_CONTENT_TYPE,
|
|
19
24
|
PROMETHEUS_CONTENT_TYPE,
|
|
@@ -77,16 +82,21 @@ import {
|
|
|
77
82
|
withLogContext,
|
|
78
83
|
withSpan,
|
|
79
84
|
withTimeout
|
|
80
|
-
} from "../chunk-
|
|
81
|
-
import "../chunk-
|
|
82
|
-
import "../chunk-
|
|
83
|
-
import "../chunk-
|
|
85
|
+
} from "../chunk-COOW7BJX.mjs";
|
|
86
|
+
import "../chunk-6V2AWT4R.mjs";
|
|
87
|
+
import "../chunk-Z3ZZMQUZ.mjs";
|
|
88
|
+
import "../chunk-MOO4L7F4.mjs";
|
|
89
|
+
import "../chunk-BC6Q6BCO.mjs";
|
|
90
|
+
import "../chunk-B5JD23U7.mjs";
|
|
91
|
+
import "../chunk-EEN5OTCR.mjs";
|
|
92
|
+
import "../chunk-H626ZTDZ.mjs";
|
|
84
93
|
import "../chunk-36I3M4UC.mjs";
|
|
85
|
-
import "../chunk-
|
|
94
|
+
import "../chunk-6MLAZPBL.mjs";
|
|
86
95
|
import "../chunk-Y6FXYEAI.mjs";
|
|
87
96
|
export {
|
|
88
97
|
HTTP_OBSERVABILITY_CONTRACT,
|
|
89
98
|
OTLP_JSON_CONTENT_TYPE,
|
|
99
|
+
ObservabilityService,
|
|
90
100
|
PROMETHEUS_CONTENT_TYPE,
|
|
91
101
|
alwaysOffSampler,
|
|
92
102
|
alwaysOnSampler,
|
|
@@ -115,8 +125,11 @@ export {
|
|
|
115
125
|
makeNoopObservability,
|
|
116
126
|
makeObservability,
|
|
117
127
|
makeObservabilityFromEnv,
|
|
128
|
+
makeObservabilityLayer,
|
|
118
129
|
makeObservabilityPreset,
|
|
119
130
|
makeObservabilityRedactor,
|
|
131
|
+
makeObservedHttpClientLayer,
|
|
132
|
+
makeObservedRuntimeLayer,
|
|
120
133
|
makeOtlpHttpLogExporter,
|
|
121
134
|
makeOtlpHttpMetricsExporter,
|
|
122
135
|
makeOtlpHttpSpanExporter,
|
package/dist/perf/cli.cjs
CHANGED
|
@@ -15,44 +15,42 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
require('../chunk-
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
18
|
+
var _chunk5LC7V2OZcjs = require('../chunk-5LC7V2OZ.cjs');
|
|
19
|
+
require('../chunk-KNTJ7FQB.cjs');
|
|
20
|
+
require('../chunk-WVSZOPGQ.cjs');
|
|
21
|
+
require('../chunk-ELIECDYN.cjs');
|
|
22
|
+
require('../chunk-WI7GZF3B.cjs');
|
|
23
|
+
require('../chunk-WGE2FEZE.cjs');
|
|
24
|
+
require('../chunk-XPIMJQYS.cjs');
|
|
22
25
|
require('../chunk-L6VB5N7Q.cjs');
|
|
23
|
-
require('../chunk-
|
|
26
|
+
require('../chunk-EICAJDNX.cjs');
|
|
24
27
|
require('../chunk-SA6HUJVI.cjs');
|
|
25
|
-
require('../chunk-
|
|
26
|
-
require('../chunk-
|
|
27
|
-
require('../chunk-F6XWZQY4.cjs');
|
|
28
|
-
require('../chunk-WBGRHGBP.cjs');
|
|
29
|
-
require('../chunk-52PPNNI4.cjs');
|
|
30
|
-
require('../chunk-3LOYJFRR.cjs');
|
|
31
|
-
require('../chunk-GLE2WY7Z.cjs');
|
|
28
|
+
require('../chunk-5RZ7YITF.cjs');
|
|
29
|
+
require('../chunk-2JHJ4YHS.cjs');
|
|
32
30
|
require('../chunk-MVGUEJ5Z.cjs');
|
|
33
|
-
require('../chunk-
|
|
31
|
+
require('../chunk-UUMKZJRJ.cjs');
|
|
34
32
|
require('../chunk-OBGZSXTJ.cjs');
|
|
35
33
|
|
|
36
34
|
// src/perf/cli.ts
|
|
37
35
|
async function main(argv) {
|
|
38
36
|
const cli = parseArgs(argv);
|
|
39
37
|
if (cli.profile === "runtime-ab") {
|
|
40
|
-
const report2 = await
|
|
41
|
-
await printReport(cli, report2,
|
|
38
|
+
const report2 = await _chunk5LC7V2OZcjs.profileRuntimeAb.call(void 0, cli.runtimeAb);
|
|
39
|
+
await printReport(cli, report2, _chunk5LC7V2OZcjs.formatRuntimeAbReport.call(void 0, report2));
|
|
42
40
|
return;
|
|
43
41
|
}
|
|
44
42
|
if (cli.profile === "runtime-soak") {
|
|
45
|
-
const report2 = await
|
|
46
|
-
await printReport(cli, report2,
|
|
43
|
+
const report2 = await _chunk5LC7V2OZcjs.profileRuntimeSoak.call(void 0, cli.runtimeSoak);
|
|
44
|
+
await printReport(cli, report2, _chunk5LC7V2OZcjs.formatRuntimeSoakReport.call(void 0, report2));
|
|
47
45
|
return;
|
|
48
46
|
}
|
|
49
47
|
if (cli.profile === "http-memory") {
|
|
50
|
-
const report2 = await
|
|
51
|
-
await printReport(cli, report2,
|
|
48
|
+
const report2 = await _chunk5LC7V2OZcjs.profileHttpMemoryLab.call(void 0, cli.httpMemory);
|
|
49
|
+
await printReport(cli, report2, _chunk5LC7V2OZcjs.formatHttpMemoryLabReport.call(void 0, report2));
|
|
52
50
|
return;
|
|
53
51
|
}
|
|
54
|
-
const report = await
|
|
55
|
-
await printReport(cli, report,
|
|
52
|
+
const report = await _chunk5LC7V2OZcjs.runBrassPerformanceProfile.call(void 0, cli.options);
|
|
53
|
+
await printReport(cli, report, _chunk5LC7V2OZcjs.formatPerformanceReport.call(void 0, report));
|
|
56
54
|
}
|
|
57
55
|
function parseArgs(argv) {
|
|
58
56
|
let json = envBool("BRASS_PERF_JSON", false);
|
|
@@ -295,14 +293,14 @@ async function maybeHandleHistory(cli, report) {
|
|
|
295
293
|
cliProfile: cli.profile
|
|
296
294
|
}
|
|
297
295
|
};
|
|
298
|
-
const entry =
|
|
299
|
-
const historyPath = config.recordHistory ? await
|
|
300
|
-
const savedBaseline = config.saveBaseline ? await
|
|
301
|
-
const loadedBaseline = config.compareBaseline ? await
|
|
296
|
+
const entry = _chunk5LC7V2OZcjs.createPerfHistoryEntry.call(void 0, cli.profile, report, storeOptions);
|
|
297
|
+
const historyPath = config.recordHistory ? await _chunk5LC7V2OZcjs.writePerfHistoryEntry.call(void 0, entry, storeOptions) : void 0;
|
|
298
|
+
const savedBaseline = config.saveBaseline ? await _chunk5LC7V2OZcjs.savePerfBaseline.call(void 0, config.saveBaseline, entry, storeOptions) : void 0;
|
|
299
|
+
const loadedBaseline = config.compareBaseline ? await _chunk5LC7V2OZcjs.loadPerfBaseline.call(void 0, config.compareBaseline, storeOptions) : void 0;
|
|
302
300
|
if (config.compareBaseline && !loadedBaseline) {
|
|
303
301
|
throw new Error(`Perf baseline '${config.compareBaseline}' was not found`);
|
|
304
302
|
}
|
|
305
|
-
const comparison = loadedBaseline ?
|
|
303
|
+
const comparison = loadedBaseline ? _chunk5LC7V2OZcjs.comparePerfToBaseline.call(void 0, entry, loadedBaseline, config.thresholds) : void 0;
|
|
306
304
|
return Object.freeze({
|
|
307
305
|
entry,
|
|
308
306
|
...historyPath !== void 0 ? { historyPath } : {},
|
|
@@ -317,7 +315,7 @@ function formatCliHistory(history) {
|
|
|
317
315
|
if (history.savedBaselinePath) lines.push(`- baseline saved: ${history.savedBaselinePath}`);
|
|
318
316
|
if (history.comparison) {
|
|
319
317
|
lines.push("");
|
|
320
|
-
lines.push(
|
|
318
|
+
lines.push(_chunk5LC7V2OZcjs.formatPerfBaselineComparison.call(void 0, history.comparison));
|
|
321
319
|
}
|
|
322
320
|
return lines.join("\n");
|
|
323
321
|
}
|
|
@@ -335,7 +333,7 @@ function parseRuntimeVariant(value) {
|
|
|
335
333
|
throw new Error(`Invalid runtime variant: ${value}`);
|
|
336
334
|
}
|
|
337
335
|
function parseVariants(value) {
|
|
338
|
-
const allowed = new Set(
|
|
336
|
+
const allowed = new Set(_chunk5LC7V2OZcjs.HTTP_PROFILE_VARIANTS);
|
|
339
337
|
return Object.freeze(value.split(",").map((item) => item.trim()).filter(Boolean).map((item) => {
|
|
340
338
|
if (!allowed.has(item)) {
|
|
341
339
|
throw new Error(`Invalid HTTP profile variant: ${item}`);
|
package/dist/perf/cli.js
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-22HZQG5F.js";
|
|
19
|
+
import "../chunk-UAKAF32U.js";
|
|
20
|
+
import "../chunk-YGR2IN4R.js";
|
|
21
|
+
import "../chunk-LSYQ3C2M.js";
|
|
22
|
+
import "../chunk-YZ5LQ32F.js";
|
|
23
|
+
import "../chunk-OW5VHAOE.js";
|
|
24
|
+
import "../chunk-WUDHOZIH.js";
|
|
22
25
|
import "../chunk-TRM4JUZQ.js";
|
|
23
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-IPSMXUWA.js";
|
|
24
27
|
import "../chunk-UCUBNWM2.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-VWIPB6I5.js";
|
|
28
|
-
import "../chunk-BKK77SBA.js";
|
|
29
|
-
import "../chunk-RKGKFN2A.js";
|
|
30
|
-
import "../chunk-3Y2RIUMM.js";
|
|
31
|
-
import "../chunk-FH2X7BVP.js";
|
|
28
|
+
import "../chunk-S4HXADU4.js";
|
|
29
|
+
import "../chunk-TTSPIU3U.js";
|
|
32
30
|
import "../chunk-UB4B6OFY.js";
|
|
33
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-HCJ4S3YB.js";
|
|
34
32
|
import "../chunk-3RG5ZIWI.js";
|
|
35
33
|
|
|
36
34
|
// src/perf/cli.ts
|
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-JWIEMBE6.mjs";
|
|
19
|
+
import "../chunk-RBHNOKH4.mjs";
|
|
20
|
+
import "../chunk-7GBJYOX7.mjs";
|
|
21
|
+
import "../chunk-YWLLH27R.mjs";
|
|
22
|
+
import "../chunk-COOW7BJX.mjs";
|
|
23
|
+
import "../chunk-6V2AWT4R.mjs";
|
|
24
|
+
import "../chunk-Z3ZZMQUZ.mjs";
|
|
22
25
|
import "../chunk-MOO4L7F4.mjs";
|
|
23
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-BC6Q6BCO.mjs";
|
|
24
27
|
import "../chunk-B5JD23U7.mjs";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-SK7UZRNI.mjs";
|
|
28
|
-
import "../chunk-4P2HHGAX.mjs";
|
|
29
|
-
import "../chunk-EJ6BPYVR.mjs";
|
|
30
|
-
import "../chunk-PWC3RBQE.mjs";
|
|
31
|
-
import "../chunk-GYM3LLGS.mjs";
|
|
28
|
+
import "../chunk-EEN5OTCR.mjs";
|
|
29
|
+
import "../chunk-H626ZTDZ.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 _chunk5LC7V2OZcjs = require('../chunk-5LC7V2OZ.cjs');
|
|
34
|
+
require('../chunk-KNTJ7FQB.cjs');
|
|
35
|
+
require('../chunk-WVSZOPGQ.cjs');
|
|
36
|
+
require('../chunk-ELIECDYN.cjs');
|
|
37
|
+
require('../chunk-WI7GZF3B.cjs');
|
|
38
|
+
require('../chunk-WGE2FEZE.cjs');
|
|
39
|
+
require('../chunk-XPIMJQYS.cjs');
|
|
37
40
|
require('../chunk-L6VB5N7Q.cjs');
|
|
38
|
-
require('../chunk-
|
|
41
|
+
require('../chunk-EICAJDNX.cjs');
|
|
39
42
|
require('../chunk-SA6HUJVI.cjs');
|
|
40
|
-
require('../chunk-
|
|
41
|
-
require('../chunk-
|
|
42
|
-
require('../chunk-F6XWZQY4.cjs');
|
|
43
|
-
require('../chunk-WBGRHGBP.cjs');
|
|
44
|
-
require('../chunk-52PPNNI4.cjs');
|
|
45
|
-
require('../chunk-3LOYJFRR.cjs');
|
|
46
|
-
require('../chunk-GLE2WY7Z.cjs');
|
|
43
|
+
require('../chunk-5RZ7YITF.cjs');
|
|
44
|
+
require('../chunk-2JHJ4YHS.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 _chunk5LC7V2OZcjs.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 = _chunk5LC7V2OZcjs.HTTP_PROFILE_VARIANTS; exports.captureMemorySnapshot = _chunk5LC7V2OZcjs.captureMemorySnapshot; exports.comparePerfToBaseline = _chunk5LC7V2OZcjs.comparePerfToBaseline; exports.compareRuntimeProfiles = _chunk5LC7V2OZcjs.compareRuntimeProfiles; exports.createPerfHistoryEntry = _chunk5LC7V2OZcjs.createPerfHistoryEntry; exports.defaultPerfHistoryDirectory = _chunk5LC7V2OZcjs.defaultPerfHistoryDirectory; exports.diagnoseRuntimeProfile = _chunk5LC7V2OZcjs.diagnoseRuntimeProfile; exports.diffMemorySnapshots = _chunk5LC7V2OZcjs.diffMemorySnapshots; exports.extractPerfMetrics = _chunk5LC7V2OZcjs.extractPerfMetrics; exports.forceGc = _chunk5LC7V2OZcjs.forceGc; exports.formatHttpMemoryLabReport = _chunk5LC7V2OZcjs.formatHttpMemoryLabReport; exports.formatPerfBaselineComparison = _chunk5LC7V2OZcjs.formatPerfBaselineComparison; exports.formatPerformanceReport = _chunk5LC7V2OZcjs.formatPerformanceReport; exports.formatRuntimeAbReport = _chunk5LC7V2OZcjs.formatRuntimeAbReport; exports.formatRuntimePerfBudgetReport = formatRuntimePerfBudgetReport; exports.formatRuntimeSoakReport = _chunk5LC7V2OZcjs.formatRuntimeSoakReport; exports.hasGc = _chunk5LC7V2OZcjs.hasGc; exports.loadPerfBaseline = _chunk5LC7V2OZcjs.loadPerfBaseline; exports.makePerfRecorder = _chunk5LC7V2OZcjs.makePerfRecorder; exports.profileHttpLayers = _chunk5LC7V2OZcjs.profileHttpLayers; exports.profileHttpMemoryLab = _chunk5LC7V2OZcjs.profileHttpMemoryLab; exports.profileMemoryRetention = _chunk5LC7V2OZcjs.profileMemoryRetention; exports.profileRuntimeAb = _chunk5LC7V2OZcjs.profileRuntimeAb; exports.profileRuntimePrimitives = _chunk5LC7V2OZcjs.profileRuntimePrimitives; exports.profileRuntimeSoak = _chunk5LC7V2OZcjs.profileRuntimeSoak; exports.readPerfHistory = _chunk5LC7V2OZcjs.readPerfHistory; exports.recommendPerformance = _chunk5LC7V2OZcjs.recommendPerformance; exports.recordPerfHistoryRun = _chunk5LC7V2OZcjs.recordPerfHistoryRun; exports.runBrassPerformanceProfile = _chunk5LC7V2OZcjs.runBrassPerformanceProfile; exports.runRuntimePerfBudget = runRuntimePerfBudget; exports.savePerfBaseline = _chunk5LC7V2OZcjs.savePerfBaseline; exports.summarizePerfEvents = _chunk5LC7V2OZcjs.summarizePerfEvents; exports.writePerfHistoryEntry = _chunk5LC7V2OZcjs.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-22HZQG5F.js";
|
|
34
|
+
import "../chunk-UAKAF32U.js";
|
|
35
|
+
import "../chunk-YGR2IN4R.js";
|
|
36
|
+
import "../chunk-LSYQ3C2M.js";
|
|
37
|
+
import "../chunk-YZ5LQ32F.js";
|
|
38
|
+
import "../chunk-OW5VHAOE.js";
|
|
39
|
+
import "../chunk-WUDHOZIH.js";
|
|
37
40
|
import "../chunk-TRM4JUZQ.js";
|
|
38
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-IPSMXUWA.js";
|
|
39
42
|
import "../chunk-UCUBNWM2.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-VWIPB6I5.js";
|
|
43
|
-
import "../chunk-BKK77SBA.js";
|
|
44
|
-
import "../chunk-RKGKFN2A.js";
|
|
45
|
-
import "../chunk-3Y2RIUMM.js";
|
|
46
|
-
import "../chunk-FH2X7BVP.js";
|
|
43
|
+
import "../chunk-S4HXADU4.js";
|
|
44
|
+
import "../chunk-TTSPIU3U.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-JWIEMBE6.mjs";
|
|
34
|
+
import "../chunk-RBHNOKH4.mjs";
|
|
35
|
+
import "../chunk-7GBJYOX7.mjs";
|
|
36
|
+
import "../chunk-YWLLH27R.mjs";
|
|
37
|
+
import "../chunk-COOW7BJX.mjs";
|
|
38
|
+
import "../chunk-6V2AWT4R.mjs";
|
|
39
|
+
import "../chunk-Z3ZZMQUZ.mjs";
|
|
37
40
|
import "../chunk-MOO4L7F4.mjs";
|
|
38
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-BC6Q6BCO.mjs";
|
|
39
42
|
import "../chunk-B5JD23U7.mjs";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-SK7UZRNI.mjs";
|
|
43
|
-
import "../chunk-4P2HHGAX.mjs";
|
|
44
|
-
import "../chunk-EJ6BPYVR.mjs";
|
|
45
|
-
import "../chunk-PWC3RBQE.mjs";
|
|
46
|
-
import "../chunk-GYM3LLGS.mjs";
|
|
43
|
+
import "../chunk-EEN5OTCR.mjs";
|
|
44
|
+
import "../chunk-H626ZTDZ.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-DF83nLn6.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-DnGUuhw6.js';
|
|
3
|
+
import { C as CircuitBreakerStats } from './layer-D2LFcBVx.js';
|
|
4
|
+
import { A as AdaptiveLimiterStats } from './defaultClient-Cid0JoUR.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";
|
|
@@ -683,4 +683,4 @@ type ObservedHttpServerResult<A> = {
|
|
|
683
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>>;
|
|
684
684
|
declare function observeHttpServerRequest<A>(observability: Observability, input: RequestObservabilityContextInput, handler: (ctx: RequestObservabilityContext) => Promise<A>, options?: HttpServerObservabilityOptions<A>): Promise<ObservedHttpServerResult<A>>;
|
|
685
685
|
|
|
686
|
-
export { type RuntimeHealthOptions as $, 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-DnGUuhw6.js';
|
|
2
|
+
import { R as RuntimeClock } from './layer-D2LFcBVx.js';
|
|
3
3
|
|
|
4
4
|
type MetricType = "counter" | "gauge" | "histogram";
|
|
5
5
|
type MetricValue = {
|
package/docs/README.md
CHANGED
|
@@ -7,7 +7,9 @@ Start here:
|
|
|
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
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
|
|
10
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
|
|
11
13
|
- **[HTTP client](./http.md)** — ZIO-style HTTP built on brass-runtime
|
|
12
14
|
- **[HTTP recipes](./http-recipes.md)** — typed clients, custom transports, production adoption, observability, and config validation
|
|
13
15
|
- **[Recipes](./recipes/README.md)** — copyable runtime, layer, HTTP server, testing, and performance paths
|