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.
Files changed (123) hide show
  1. package/README.md +40 -8
  2. package/dist/agent/cli/main.cjs +31 -32
  3. package/dist/agent/cli/main.js +3 -4
  4. package/dist/agent/cli/main.mjs +3 -4
  5. package/dist/agent/index.cjs +4 -5
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/index.js +3 -4
  8. package/dist/agent/index.mjs +3 -4
  9. package/dist/{chunk-GYM3LLGS.mjs → chunk-2QNREG6K.mjs} +188 -5
  10. package/dist/{chunk-4ROBZFL6.cjs → chunk-2SLT3X6G.cjs} +6 -8
  11. package/dist/{chunk-KZJQ723N.cjs → chunk-3PFZGP23.cjs} +13 -15
  12. package/dist/{chunk-AVNQLJ5V.js → chunk-3PHU7FWS.js} +528 -23
  13. package/dist/{chunk-CIZFIMK5.js → chunk-4YQHPIWJ.js} +60 -11
  14. package/dist/chunk-5XADBMSU.cjs +33 -0
  15. package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
  16. package/dist/chunk-7TKI527D.cjs +123 -0
  17. package/dist/{chunk-AGR5B2BC.cjs → chunk-7TXQJFZX.cjs} +564 -12
  18. package/dist/{chunk-RKGKFN2A.js → chunk-AADFFVYS.js} +1 -1
  19. package/dist/{chunk-52PPNNI4.cjs → chunk-AJMKZXRB.cjs} +2 -2
  20. package/dist/{chunk-3AYM6WPJ.js → chunk-BG5RNEA2.js} +20 -299
  21. package/dist/{chunk-2HQTDLHF.mjs → chunk-ELLF55ER.mjs} +555 -3
  22. package/dist/{chunk-EOC4UHBS.mjs → chunk-G5JTCFMI.mjs} +2 -2
  23. package/dist/chunk-H5GYX7RZ.js +6126 -0
  24. package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
  25. package/dist/{chunk-6IXXWIUM.js → chunk-IBRHSH5H.js} +555 -3
  26. package/dist/{chunk-Q2I37RP3.cjs → chunk-IFRBVMWJ.cjs} +44 -323
  27. package/dist/{chunk-52OB2ROS.js → chunk-ITG6I7ZS.js} +2 -4
  28. package/dist/chunk-ITZQ526U.mjs +33 -0
  29. package/dist/{chunk-7JIJOVCT.js → chunk-JH4GI3DW.js} +2 -4
  30. package/dist/{chunk-76YMRMH2.cjs → chunk-KHACHFBQ.cjs} +583 -78
  31. package/dist/{chunk-MT3OWDPC.mjs → chunk-KRYP6CAE.mjs} +60 -11
  32. package/dist/chunk-KTGDLBLD.mjs +123 -0
  33. package/dist/{chunk-ENKODRU3.cjs → chunk-LXBU5E77.cjs} +143 -94
  34. package/dist/{chunk-PD4EJTQC.cjs → chunk-N6QNSTWD.cjs} +5 -5
  35. package/dist/{chunk-HLWLMW2F.mjs → chunk-OI4ESUMC.mjs} +9 -11
  36. package/dist/{chunk-EJ6BPYVR.mjs → chunk-OT2TESZU.mjs} +1 -1
  37. package/dist/{chunk-BABBZK4Y.js → chunk-PSEU65ND.js} +9 -11
  38. package/dist/{chunk-DNFO2EIZ.mjs → chunk-QCOLAHU3.mjs} +528 -23
  39. package/dist/{chunk-KH4SYAOS.mjs → chunk-QZ6QFJNM.mjs} +20 -299
  40. package/dist/{chunk-MBEJI5HF.mjs → chunk-R6WDSZA6.mjs} +2 -4
  41. package/dist/{chunk-FHQGHPMO.mjs → chunk-RREBJX2S.mjs} +2 -4
  42. package/dist/{chunk-5QC7LRZ3.js → chunk-S4HHFUYP.js} +2 -2
  43. package/dist/{chunk-GLE2WY7Z.cjs → chunk-SSQJKDN3.cjs} +194 -11
  44. package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
  45. package/dist/chunk-VIFA4DPN.cjs +6126 -0
  46. package/dist/chunk-W6WR37HN.js +33 -0
  47. package/dist/{chunk-FH2X7BVP.js → chunk-XSAHV5HQ.js} +188 -5
  48. package/dist/chunk-YM3EDNYD.js +123 -0
  49. package/dist/{chunk-VN44DYYT.cjs → chunk-YTX2JYYP.cjs} +18 -20
  50. package/dist/chunk-Z3PSSXP3.mjs +6126 -0
  51. package/dist/core/index.cjs +31 -9
  52. package/dist/core/index.d.ts +19 -152
  53. package/dist/core/index.js +80 -58
  54. package/dist/core/index.mjs +80 -58
  55. package/dist/defaultClient-DhpCQW9m.d.ts +1623 -0
  56. package/dist/{effect-DIUHZ9IN.d.ts → effect-CtUDl5M5.d.ts} +1 -1
  57. package/dist/http/index.cjs +202 -59
  58. package/dist/http/index.d.ts +55 -819
  59. package/dist/http/index.js +216 -73
  60. package/dist/http/index.mjs +216 -73
  61. package/dist/http/testing.cjs +31 -10
  62. package/dist/http/testing.d.ts +16 -5
  63. package/dist/http/testing.js +29 -8
  64. package/dist/http/testing.mjs +29 -8
  65. package/dist/index.cjs +110 -88
  66. package/dist/index.d.ts +9 -8
  67. package/dist/index.js +81 -59
  68. package/dist/index.mjs +81 -59
  69. package/dist/{schedule-CK3Ml_7p.d.ts → layer-BalPI6cN.d.ts} +176 -2
  70. package/dist/observability/index.cjs +22 -7
  71. package/dist/observability/index.d.ts +32 -8
  72. package/dist/observability/index.js +21 -6
  73. package/dist/observability/index.mjs +21 -6
  74. package/dist/perf/cli.cjs +26 -28
  75. package/dist/perf/cli.js +11 -13
  76. package/dist/perf/cli.mjs +11 -13
  77. package/dist/perf/index.cjs +13 -15
  78. package/dist/perf/index.js +11 -13
  79. package/dist/perf/index.mjs +11 -13
  80. package/dist/schema/index.cjs +2 -2
  81. package/dist/schema/index.js +1 -1
  82. package/dist/schema/index.mjs +1 -1
  83. package/dist/{server-GJPg8ZSG.d.ts → server-C1zVmqE6.d.ts} +16 -5
  84. package/dist/{stream-B4oK9JFP.d.ts → stream-Bb4FTejt.d.ts} +1 -1
  85. package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DzfuE6um.d.ts} +2 -2
  86. package/dist/{tracing-DqbTKGcf.d.ts → tracing-BABA5arE.d.ts} +1 -1
  87. package/docs/README.md +4 -0
  88. package/docs/ai/PUBLIC_API.md +31 -7
  89. package/docs/articles/brass-runtime-http-observability.md +467 -0
  90. package/docs/framework-integrations.md +38 -0
  91. package/docs/frameworks/angular.md +204 -0
  92. package/docs/frameworks/express.md +183 -0
  93. package/docs/frameworks/fastify.md +173 -0
  94. package/docs/frameworks/nestjs.md +335 -0
  95. package/docs/frameworks/nextjs.md +202 -0
  96. package/docs/frameworks/react.md +183 -0
  97. package/docs/frameworks/vanilla.md +280 -0
  98. package/docs/guides/layers.md +130 -0
  99. package/docs/http-recipes.md +31 -1
  100. package/docs/http.md +50 -1
  101. package/docs/nestjs.md +6 -0
  102. package/docs/observability-framework-examples.md +12 -0
  103. package/docs/observability.md +239 -0
  104. package/docs/performance-profiler.md +6 -2
  105. package/docs/recipes/layers.md +46 -2
  106. package/docs/recipes/testing.md +25 -0
  107. package/package.json +4 -1
  108. package/dist/chunk-3LOYJFRR.cjs +0 -300
  109. package/dist/chunk-3Y2RIUMM.js +0 -300
  110. package/dist/chunk-5EC274J5.cjs +0 -2874
  111. package/dist/chunk-5VRJNBLZ.mjs +0 -2874
  112. package/dist/chunk-62AZW6UT.cjs +0 -313
  113. package/dist/chunk-74ZTY6CP.js +0 -2871
  114. package/dist/chunk-7CMJS3QE.mjs +0 -2871
  115. package/dist/chunk-A2OM6NEH.mjs +0 -194
  116. package/dist/chunk-B33ICAKP.js +0 -313
  117. package/dist/chunk-JF5WGYJJ.cjs +0 -194
  118. package/dist/chunk-KN32XNTH.mjs +0 -313
  119. package/dist/chunk-KQLYONSE.cjs +0 -2871
  120. package/dist/chunk-L2SYFEBS.js +0 -194
  121. package/dist/chunk-MIIYDLGM.js +0 -2874
  122. package/dist/chunk-PWC3RBQE.mjs +0 -300
  123. package/dist/client-CZHU674n.d.ts +0 -820
@@ -1,4 +1,4 @@
1
- import { A as Async, R as RuntimeHooks, a as RuntimeEmitContext } from './effect-DIUHZ9IN.js';
1
+ import { A as Async, R as RuntimeHooks, e as RuntimeEmitContext } from './effect-CtUDl5M5.js';
2
2
 
3
3
  type CircuitBreakerState = "closed" | "open" | "half-open";
4
4
  type CircuitBreakerError = {
@@ -256,4 +256,178 @@ declare const Schedule: Readonly<{
256
256
  poll: typeof repeatWithSchedule;
257
257
  }>;
258
258
 
259
- export { upTo as $, liveClock as A, makeCircuitBreaker as B, type CircuitBreakerError as C, makeScheduleDriver as D, map as E, maxDelay as F, maxElapsed as G, named as H, never as I, once as J, poll as K, recurs as L, repeatWithSchedule as M, repeat as N, retryWithSchedule as O, retry as P, runSchedule as Q, type RuntimeClock as R, Schedule as S, runtimeClockFromEnv as T, scheduleDriver as U, spaced as V, take as W, tapDecision as X, union as Y, untilInput as Z, untilOutput as _, type ScheduleObserver as a, whileInput as a0, whileOutput as a1, windowed as a2, type CircuitBreakerStats as b, type CircuitBreaker as c, type CircuitBreakerConfig as d, type CircuitBreakerState as e, type RuntimeClockEnv as f, type RuntimeTimerId as g, type ScheduleDecision as h, type ScheduleDriver as i, type ScheduleDriverDecision as j, type ScheduleDriverOptions as k, type ScheduleDriverSnapshot as l, type ScheduleObserverEvent as m, type ScheduleStepContext as n, andThen as o, contramap as p, elapsed as q, exponential as r, fibonacci as s, fixed as t, forever as u, intersect as v, jitter as w, jittered as x, jitteredSchedule as y, linear as z };
259
+ type ServiceTag<A> = {
260
+ readonly _tag: "ServiceTag";
261
+ readonly key: symbol;
262
+ readonly name: string;
263
+ };
264
+ declare class MissingLayerServiceError extends Error {
265
+ readonly _tag: "MissingLayerService";
266
+ readonly serviceName: string;
267
+ constructor(serviceName: string);
268
+ }
269
+ declare function formatLayerError(error: unknown): string;
270
+ declare function makeServiceTag<A>(name: string): ServiceTag<A>;
271
+ declare const serviceTag: typeof makeServiceTag;
272
+ declare const defineService: typeof makeServiceTag;
273
+ declare class LayerContext<Services = unknown> {
274
+ private readonly services;
275
+ constructor(entries?: Iterable<readonly [ServiceTag<any>, unknown]> | Map<symbol, unknown>);
276
+ static empty(): LayerContext<unknown>;
277
+ get<A>(tag: ServiceTag<A>): A | undefined;
278
+ unsafeGet<A>(tag: ServiceTag<A>): A;
279
+ has(tag: ServiceTag<unknown>): boolean;
280
+ add<A>(tag: ServiceTag<A>, service: A): LayerContext<Services & A>;
281
+ merge<Other>(other: LayerContext<Other>): LayerContext<Services & Other>;
282
+ size(): number;
283
+ }
284
+ type LayerScope = {
285
+ readonly get: <RIn, E, ROut>(layer: Layer<RIn, E, ROut>, deps?: RIn) => Async<unknown, E, ROut>;
286
+ readonly close: () => Async<unknown, never, void>;
287
+ readonly size: () => number;
288
+ };
289
+ type BuiltLayer<ROut> = {
290
+ readonly service: ROut;
291
+ readonly scope: LayerScope;
292
+ readonly close: () => Async<unknown, never, void>;
293
+ readonly use: <E, A>(body: (service: ROut) => Async<unknown, E, A>) => Async<unknown, E, A>;
294
+ };
295
+ type AnyLayer = Layer<any, any, any>;
296
+ type LayerInputOf<L> = L extends Layer<infer RIn, any, any> ? RIn : never;
297
+ type LayerErrorOf<L> = L extends Layer<any, infer E, any> ? E : never;
298
+ type LayerOutputOf<L> = L extends Layer<any, any, infer ROut> ? ROut : never;
299
+ type UnionToIntersection<U> = (U extends unknown ? (value: U) => void : never) extends (value: infer I) => void ? I : never;
300
+ type LastOf<T extends readonly unknown[]> = T extends readonly [...unknown[], infer Last] ? Last : never;
301
+ type ServiceTagMap = Record<string, ServiceTag<any>>;
302
+ type ServicesOf<Tags extends ServiceTagMap> = {
303
+ readonly [K in keyof Tags]: Tags[K] extends ServiceTag<infer A> ? A : never;
304
+ };
305
+ declare function makeLayerScope(): LayerScope;
306
+ /**
307
+ * Creates a Layer from an acquire/release pair.
308
+ *
309
+ * ```ts
310
+ * const DbLayer = layer(
311
+ * () => createPool({ max: 10 }),
312
+ * (pool) => pool.close()
313
+ * );
314
+ * ```
315
+ */
316
+ declare function layer<ROut, E = never>(acquire: () => Async<unknown, E, ROut>, release?: (service: ROut) => Async<unknown, never, void>): Layer<unknown, E, ROut>;
317
+ declare function layerValue<A>(tag: ServiceTag<A>, value: A): Layer<LayerContext, never, LayerContext>;
318
+ declare const makeTestLayer: typeof layerValue;
319
+ type TestLayerProvider<A = unknown> = readonly [ServiceTag<A>, A];
320
+ declare function makeTestLayers(...providers: readonly TestLayerProvider[]): Layer<LayerContext, never, LayerContext>;
321
+ declare function layerEffect<E, A>(tag: ServiceTag<A>, acquire: (deps: LayerContext) => Async<unknown, E, A>, release?: (service: A) => Async<unknown, never, void>): Layer<LayerContext, E, LayerContext>;
322
+ declare const layerFromContext: typeof layerEffect;
323
+ declare const defineLayer: typeof layerEffect;
324
+ declare function getService<A>(tag: ServiceTag<A>): Async<LayerContext, MissingLayerServiceError, A>;
325
+ declare function getServices<Tags extends ServiceTagMap>(tags: Tags): Async<LayerContext, MissingLayerServiceError, ServicesOf<Tags>>;
326
+ declare function useService<A, E, B>(tag: ServiceTag<A>, use: (service: A) => Async<unknown, E, B>): (context: LayerContext) => Async<unknown, MissingLayerServiceError | E, B>;
327
+ declare function useServices<Tags extends ServiceTagMap, E, A>(tags: Tags, use: (services: ServicesOf<Tags>) => Async<unknown, E, A>): (context: LayerContext) => Async<unknown, MissingLayerServiceError | E, A>;
328
+ /**
329
+ * Creates a Layer that depends on another service.
330
+ *
331
+ * ```ts
332
+ * const RepoLayer = layerFrom<DbPool>()(
333
+ * (pool) => createRepo(pool),
334
+ * (repo) => repo.close()
335
+ * );
336
+ * ```
337
+ */
338
+ declare function layerFrom<RIn>(): <ROut, E = never>(acquire: (deps: RIn) => Async<unknown, E, ROut>, release?: (service: ROut) => Async<unknown, never, void>) => Layer<RIn, E, ROut>;
339
+ /**
340
+ * Creates a Layer from a pure value (no lifecycle).
341
+ *
342
+ * ```ts
343
+ * const ConfigLayer = layerSucceed({ port: 3000, host: "localhost" });
344
+ * ```
345
+ */
346
+ declare function layerSucceed<ROut>(value: ROut): Layer<unknown, never, ROut>;
347
+ /**
348
+ * Creates a Layer that always fails.
349
+ */
350
+ declare function layerFail<E>(error: E): Layer<unknown, E, never>;
351
+ /**
352
+ * Compose two layers: the output of `from` feeds into `to`.
353
+ *
354
+ * ```ts
355
+ * const AppLayer = compose(DbLayer, RepoLayer);
356
+ * // DbLayer produces DbPool → RepoLayer consumes DbPool → produces Repo
357
+ * ```
358
+ */
359
+ declare function compose<R1, E1, Mid, E2, ROut>(from: Layer<R1, E1, Mid>, to: Layer<Mid, E2, ROut>): Layer<R1, E1 | E2, ROut>;
360
+ declare function composeAll<Layers extends readonly [AnyLayer, ...AnyLayer[]]>(...layers: Layers): Layer<LayerInputOf<Layers[0]>, LayerErrorOf<Layers[number]>, LayerOutputOf<LastOf<Layers>>>;
361
+ /**
362
+ * Merge two independent layers into one that produces both services.
363
+ *
364
+ * ```ts
365
+ * const AppLayer = merge(DbLayer, CacheLayer);
366
+ * // Produces { db: DbPool, cache: CacheClient }
367
+ * ```
368
+ */
369
+ declare function merge<R1, E1, A, R2, E2, B>(left: Layer<R1, E1, A>, right: Layer<R2, E2, B>): Layer<R1 & R2, E1 | E2, A & B>;
370
+ declare function mergeAll<Layers extends readonly [AnyLayer, ...AnyLayer[]]>(...layers: Layers): Layer<UnionToIntersection<LayerInputOf<Layers[number]>>, LayerErrorOf<Layers[number]>, UnionToIntersection<LayerOutputOf<Layers[number]>>>;
371
+ /**
372
+ * Map the output of a layer.
373
+ */
374
+ declare function mapLayer<RIn, E, A, B>(l: Layer<RIn, E, A>, f: (a: A) => B): Layer<RIn, E, B>;
375
+ declare function buildLayer<RIn, E, ROut>(l: Layer<RIn, E, ROut>, deps?: RIn): Async<unknown, E, BuiltLayer<ROut>>;
376
+ /**
377
+ * Builds a layer, runs an effect with the produced service, and releases.
378
+ *
379
+ * ```ts
380
+ * const result = await run(
381
+ * provideLayer(AppLayer, (services) => services.db.query("SELECT 1"))
382
+ * );
383
+ * ```
384
+ */
385
+ declare function provideLayer<RIn, E, ROut, E2, A>(l: Layer<RIn, E, ROut>, use: (service: ROut) => Async<unknown, E2, A>, deps?: RIn): Async<unknown, E | E2, A>;
386
+ declare function provideLayerContext<E, E2, A>(l: Layer<LayerContext, E, LayerContext>, use: (context: LayerContext) => Async<unknown, E2, A>, deps?: LayerContext): Async<unknown, E | E2, A>;
387
+ declare const provide: typeof provideLayer;
388
+ declare const provideContext: typeof provideLayerContext;
389
+ /**
390
+ * A Layer describes how to build a service.
391
+ *
392
+ * - RIn: dependencies required to build this service
393
+ * - E: possible failure during construction
394
+ * - ROut: the service produced
395
+ */
396
+ type Layer<RIn, E, ROut> = {
397
+ readonly _tag: "Layer";
398
+ readonly build: (deps: RIn) => Async<unknown, E, {
399
+ service: ROut;
400
+ release: () => Async<unknown, never, void>;
401
+ }>;
402
+ readonly buildScoped?: (deps: RIn, scope: LayerScope) => Async<unknown, E, ROut>;
403
+ };
404
+ declare const Layer: Readonly<{
405
+ make: typeof layer;
406
+ from: typeof layerFrom;
407
+ succeed: typeof layerSucceed;
408
+ fail: typeof layerFail;
409
+ value: typeof layerValue;
410
+ test: typeof layerValue;
411
+ tests: typeof makeTestLayers;
412
+ effect: typeof layerEffect;
413
+ define: typeof layerEffect;
414
+ fromContext: typeof layerEffect;
415
+ compose: typeof compose;
416
+ composeAll: typeof composeAll;
417
+ merge: typeof merge;
418
+ all: typeof mergeAll;
419
+ mergeAll: typeof mergeAll;
420
+ map: typeof mapLayer;
421
+ provide: typeof provideLayer;
422
+ provideContext: typeof provideLayerContext;
423
+ build: typeof buildLayer;
424
+ scope: typeof makeLayerScope;
425
+ context: typeof LayerContext.empty;
426
+ tag: typeof makeServiceTag;
427
+ service: typeof getService;
428
+ services: typeof getServices;
429
+ use: typeof useService;
430
+ useAll: typeof useServices;
431
+ }>;
432
+
433
+ export { layerSucceed as $, contramap as A, type BuiltLayer as B, type CircuitBreakerStats as C, defineLayer as D, defineService as E, elapsed as F, exponential as G, fibonacci as H, fixed as I, forever as J, formatLayerError as K, Layer as L, MissingLayerServiceError as M, getService as N, getServices as O, intersect as P, jitter as Q, type RuntimeClock as R, type ServiceTag as S, type TestLayerProvider as T, jittered as U, jitteredSchedule as V, layer as W, layerEffect as X, layerFail as Y, layerFrom as Z, layerFromContext as _, LayerContext as a, layerValue as a0, linear as a1, liveClock as a2, makeCircuitBreaker as a3, makeLayerScope as a4, makeScheduleDriver as a5, makeServiceTag as a6, makeTestLayer as a7, makeTestLayers as a8, mapLayer as a9, untilInput as aA, untilOutput as aB, upTo as aC, useService as aD, useServices as aE, whileInput as aF, whileOutput as aG, windowed as aH, map as aa, maxDelay as ab, maxElapsed as ac, mergeAll as ad, merge as ae, named as af, never as ag, once as ah, poll as ai, provide as aj, provideContext as ak, provideLayer as al, provideLayerContext as am, recurs as an, repeatWithSchedule as ao, repeat as ap, retryWithSchedule as aq, retry as ar, runSchedule as as, runtimeClockFromEnv as at, scheduleDriver as au, serviceTag as av, spaced as aw, take as ax, tapDecision as ay, union as az, type CircuitBreaker as b, type CircuitBreakerConfig as c, type CircuitBreakerError as d, type CircuitBreakerState as e, type LayerErrorOf as f, type LayerInputOf as g, type LayerOutputOf as h, type LayerScope as i, type RuntimeClockEnv as j, type RuntimeTimerId as k, Schedule as l, type ScheduleDecision as m, type ScheduleDriver as n, type ScheduleDriverDecision as o, type ScheduleDriverOptions as p, type ScheduleDriverSnapshot as q, type ScheduleObserver as r, type ScheduleObserverEvent as s, type ScheduleStepContext as t, type ServiceTagMap as u, type ServicesOf as v, andThen as w, buildLayer as x, composeAll as y, compose as z };
@@ -13,11 +13,12 @@
13
13
 
14
14
 
15
15
 
16
- var _chunk76YMRMH2cjs = require('../chunk-76YMRMH2.cjs');
17
16
 
18
17
 
19
18
 
20
19
 
20
+ var _chunkKHACHFBQcjs = require('../chunk-KHACHFBQ.cjs');
21
+ require('../chunk-5XADBMSU.cjs');
21
22
 
22
23
 
23
24
 
@@ -76,12 +77,21 @@ var _chunk76YMRMH2cjs = require('../chunk-76YMRMH2.cjs');
76
77
 
77
78
 
78
79
 
79
- var _chunkENKODRU3cjs = require('../chunk-ENKODRU3.cjs');
80
- require('../chunk-52PPNNI4.cjs');
81
- require('../chunk-3LOYJFRR.cjs');
82
- require('../chunk-GLE2WY7Z.cjs');
80
+
81
+
82
+
83
+
84
+
85
+ var _chunkLXBU5E77cjs = require('../chunk-LXBU5E77.cjs');
86
+ require('../chunk-AJMKZXRB.cjs');
87
+ require('../chunk-VIFA4DPN.cjs');
88
+ require('../chunk-L6VB5N7Q.cjs');
89
+ require('../chunk-3PFZGP23.cjs');
90
+ require('../chunk-SA6HUJVI.cjs');
91
+ require('../chunk-7TXQJFZX.cjs');
92
+ require('../chunk-SSQJKDN3.cjs');
83
93
  require('../chunk-MVGUEJ5Z.cjs');
84
- require('../chunk-CZIVE6NT.cjs');
94
+ require('../chunk-UUMKZJRJ.cjs');
85
95
  require('../chunk-OBGZSXTJ.cjs');
86
96
 
87
97
 
@@ -159,4 +169,9 @@ require('../chunk-OBGZSXTJ.cjs');
159
169
 
160
170
 
161
171
 
162
- exports.HTTP_OBSERVABILITY_CONTRACT = _chunk76YMRMH2cjs.HTTP_OBSERVABILITY_CONTRACT; exports.OTLP_JSON_CONTENT_TYPE = _chunkENKODRU3cjs.OTLP_JSON_CONTENT_TYPE; exports.PROMETHEUS_CONTENT_TYPE = _chunkENKODRU3cjs.PROMETHEUS_CONTENT_TYPE; exports.alwaysOffSampler = _chunkENKODRU3cjs.alwaysOffSampler; exports.alwaysOnSampler = _chunkENKODRU3cjs.alwaysOnSampler; exports.currentBaggage = _chunkENKODRU3cjs.currentBaggage; exports.currentSpanLink = _chunkENKODRU3cjs.currentSpanLink; exports.defaultStructuredLogWriter = _chunkENKODRU3cjs.defaultStructuredLogWriter; exports.exemplarFromTraceContext = _chunkENKODRU3cjs.exemplarFromTraceContext; exports.exportWithRetry = _chunkENKODRU3cjs.exportWithRetry; exports.extractBaggage = _chunkENKODRU3cjs.extractBaggage; exports.extractTraceContext = _chunkENKODRU3cjs.extractTraceContext; exports.formatBaggage = _chunkENKODRU3cjs.formatBaggage; exports.formatPrometheusMetrics = _chunkENKODRU3cjs.formatPrometheusMetrics; exports.formatStructuredLog = _chunkENKODRU3cjs.formatStructuredLog; exports.formatTraceparent = _chunkENKODRU3cjs.formatTraceparent; exports.healthToHttpResponse = _chunkENKODRU3cjs.healthToHttpResponse; exports.injectBaggage = _chunkENKODRU3cjs.injectBaggage; exports.injectTraceContext = _chunkENKODRU3cjs.injectTraceContext; exports.logEffect = _chunkENKODRU3cjs.logEffect; exports.makeCardinalityLimitedMetrics = _chunkENKODRU3cjs.makeCardinalityLimitedMetrics; exports.makeExportPipeline = _chunkENKODRU3cjs.makeExportPipeline; exports.makeExpressRequestObservabilityContext = _chunk76YMRMH2cjs.makeExpressRequestObservabilityContext; exports.makeFastifyRequestObservabilityContext = _chunk76YMRMH2cjs.makeFastifyRequestObservabilityContext; exports.makeFetchRequestObservabilityContext = _chunk76YMRMH2cjs.makeFetchRequestObservabilityContext; exports.makeHttpObservabilityMiddleware = _chunk76YMRMH2cjs.makeHttpObservabilityMiddleware; exports.makeNodeRequestObservabilityContext = _chunk76YMRMH2cjs.makeNodeRequestObservabilityContext; exports.makeNoopObservability = _chunk76YMRMH2cjs.makeNoopObservability; exports.makeObservability = _chunkENKODRU3cjs.makeObservability; exports.makeObservabilityFromEnv = _chunk76YMRMH2cjs.makeObservabilityFromEnv; exports.makeObservabilityPreset = _chunk76YMRMH2cjs.makeObservabilityPreset; exports.makeObservabilityRedactor = _chunkENKODRU3cjs.makeObservabilityRedactor; exports.makeOtlpHttpLogExporter = _chunkENKODRU3cjs.makeOtlpHttpLogExporter; exports.makeOtlpHttpMetricsExporter = _chunkENKODRU3cjs.makeOtlpHttpMetricsExporter; exports.makeOtlpHttpSpanExporter = _chunkENKODRU3cjs.makeOtlpHttpSpanExporter; exports.makePrometheusMetricsExporter = _chunkENKODRU3cjs.makePrometheusMetricsExporter; exports.makeRequestObservabilityContext = _chunkENKODRU3cjs.makeRequestObservabilityContext; exports.makeRuntimeHealth = _chunkENKODRU3cjs.makeRuntimeHealth; exports.makeRuntimeMetricsSink = _chunkENKODRU3cjs.makeRuntimeMetricsSink; exports.makeStructuredLogSink = _chunkENKODRU3cjs.makeStructuredLogSink; exports.makeTraceSampler = _chunkENKODRU3cjs.makeTraceSampler; exports.metricsSnapshotToOtlp = _chunkENKODRU3cjs.metricsSnapshotToOtlp; exports.normalizeHttpRoute = _chunkENKODRU3cjs.normalizeHttpRoute; exports.normalizeSpanId = _chunkENKODRU3cjs.normalizeSpanId; exports.normalizeTraceId = _chunkENKODRU3cjs.normalizeTraceId; exports.observabilityOptionsForPreset = _chunk76YMRMH2cjs.observabilityOptionsForPreset; exports.observabilityOptionsFromEnv = _chunk76YMRMH2cjs.observabilityOptionsFromEnv; exports.observeHttpServerRequest = _chunkENKODRU3cjs.observeHttpServerRequest; exports.otlpAnyValue = _chunkENKODRU3cjs.otlpAnyValue; exports.parseBaggage = _chunkENKODRU3cjs.parseBaggage; exports.parseTraceparent = _chunkENKODRU3cjs.parseTraceparent; exports.postOtlpJson = _chunkENKODRU3cjs.postOtlpJson; exports.ratioSampler = _chunkENKODRU3cjs.ratioSampler; exports.readiness = _chunkENKODRU3cjs.readiness; exports.resolveRequestBaggage = _chunkENKODRU3cjs.resolveRequestBaggage; exports.resolveRequestTraceSeed = _chunkENKODRU3cjs.resolveRequestTraceSeed; exports.resolveTraceSampling = _chunkENKODRU3cjs.resolveTraceSampling; exports.runObservedHttpServerEffect = _chunkENKODRU3cjs.runObservedHttpServerEffect; exports.runtimeHealth = _chunkENKODRU3cjs.runtimeHealth; exports.sanitizeHttpTarget = _chunkENKODRU3cjs.sanitizeHttpTarget; exports.shouldSampleWith = _chunkENKODRU3cjs.shouldSampleWith; exports.snapshotRuntimeHealth = _chunkENKODRU3cjs.snapshotRuntimeHealth; exports.spanEvent = _chunkENKODRU3cjs.spanEvent; exports.spanLink = _chunkENKODRU3cjs.spanLink; exports.spansToOtlp = _chunkENKODRU3cjs.spansToOtlp; exports.structuredLogsToOtlp = _chunkENKODRU3cjs.structuredLogsToOtlp; exports.toOtlpAttributes = _chunkENKODRU3cjs.toOtlpAttributes; exports.unixNanoFromMs = _chunkENKODRU3cjs.unixNanoFromMs; exports.withBaggage = _chunkENKODRU3cjs.withBaggage; exports.withFetchRequestObservability = _chunk76YMRMH2cjs.withFetchRequestObservability; exports.withHttpObservability = _chunk76YMRMH2cjs.withHttpObservability; exports.withLogContext = _chunkENKODRU3cjs.withLogContext; exports.withNodeRequestObservability = _chunk76YMRMH2cjs.withNodeRequestObservability; exports.withSpan = _chunkENKODRU3cjs.withSpan; exports.withTimeout = _chunkENKODRU3cjs.withTimeout;
172
+
173
+
174
+
175
+
176
+
177
+ exports.HTTP_OBSERVABILITY_CONTRACT = _chunkKHACHFBQcjs.HTTP_OBSERVABILITY_CONTRACT; exports.OTLP_JSON_CONTENT_TYPE = _chunkLXBU5E77cjs.OTLP_JSON_CONTENT_TYPE; exports.ObservabilityService = _chunkKHACHFBQcjs.ObservabilityService; exports.PROMETHEUS_CONTENT_TYPE = _chunkLXBU5E77cjs.PROMETHEUS_CONTENT_TYPE; exports.alwaysOffSampler = _chunkLXBU5E77cjs.alwaysOffSampler; exports.alwaysOnSampler = _chunkLXBU5E77cjs.alwaysOnSampler; exports.currentBaggage = _chunkLXBU5E77cjs.currentBaggage; exports.currentSpanLink = _chunkLXBU5E77cjs.currentSpanLink; exports.defaultStructuredLogWriter = _chunkLXBU5E77cjs.defaultStructuredLogWriter; exports.exemplarFromTraceContext = _chunkLXBU5E77cjs.exemplarFromTraceContext; exports.exportWithRetry = _chunkLXBU5E77cjs.exportWithRetry; exports.extractBaggage = _chunkLXBU5E77cjs.extractBaggage; exports.extractTraceContext = _chunkLXBU5E77cjs.extractTraceContext; exports.formatBaggage = _chunkLXBU5E77cjs.formatBaggage; exports.formatPrometheusMetrics = _chunkLXBU5E77cjs.formatPrometheusMetrics; exports.formatStructuredLog = _chunkLXBU5E77cjs.formatStructuredLog; exports.formatTraceparent = _chunkLXBU5E77cjs.formatTraceparent; exports.healthToHttpResponse = _chunkLXBU5E77cjs.healthToHttpResponse; exports.injectBaggage = _chunkLXBU5E77cjs.injectBaggage; exports.injectTraceContext = _chunkLXBU5E77cjs.injectTraceContext; exports.logEffect = _chunkLXBU5E77cjs.logEffect; exports.makeCardinalityLimitedMetrics = _chunkLXBU5E77cjs.makeCardinalityLimitedMetrics; exports.makeExportPipeline = _chunkLXBU5E77cjs.makeExportPipeline; exports.makeExpressRequestObservabilityContext = _chunkKHACHFBQcjs.makeExpressRequestObservabilityContext; exports.makeFastifyRequestObservabilityContext = _chunkKHACHFBQcjs.makeFastifyRequestObservabilityContext; exports.makeFetchRequestObservabilityContext = _chunkKHACHFBQcjs.makeFetchRequestObservabilityContext; exports.makeHttpObservabilityMiddleware = _chunkKHACHFBQcjs.makeHttpObservabilityMiddleware; exports.makeNodeRequestObservabilityContext = _chunkKHACHFBQcjs.makeNodeRequestObservabilityContext; exports.makeNoopObservability = _chunkKHACHFBQcjs.makeNoopObservability; exports.makeObservability = _chunkLXBU5E77cjs.makeObservability; exports.makeObservabilityFromEnv = _chunkKHACHFBQcjs.makeObservabilityFromEnv; exports.makeObservabilityLayer = _chunkKHACHFBQcjs.makeObservabilityLayer; exports.makeObservabilityPreset = _chunkKHACHFBQcjs.makeObservabilityPreset; exports.makeObservabilityRedactor = _chunkLXBU5E77cjs.makeObservabilityRedactor; exports.makeObservedHttpClientLayer = _chunkKHACHFBQcjs.makeObservedHttpClientLayer; exports.makeObservedRuntimeLayer = _chunkKHACHFBQcjs.makeObservedRuntimeLayer; exports.makeOtlpHttpLogExporter = _chunkLXBU5E77cjs.makeOtlpHttpLogExporter; exports.makeOtlpHttpMetricsExporter = _chunkLXBU5E77cjs.makeOtlpHttpMetricsExporter; exports.makeOtlpHttpSpanExporter = _chunkLXBU5E77cjs.makeOtlpHttpSpanExporter; exports.makeOtlpOptions = _chunkLXBU5E77cjs.makeOtlpOptions; exports.makePrometheusMetricsExporter = _chunkLXBU5E77cjs.makePrometheusMetricsExporter; exports.makeRequestObservabilityContext = _chunkLXBU5E77cjs.makeRequestObservabilityContext; exports.makeRuntimeHealth = _chunkLXBU5E77cjs.makeRuntimeHealth; exports.makeRuntimeMetricsSink = _chunkLXBU5E77cjs.makeRuntimeMetricsSink; exports.makeStructuredLogSink = _chunkLXBU5E77cjs.makeStructuredLogSink; exports.makeTraceSampler = _chunkLXBU5E77cjs.makeTraceSampler; exports.metricsSnapshotToOtlp = _chunkLXBU5E77cjs.metricsSnapshotToOtlp; exports.normalizeHttpRoute = _chunkLXBU5E77cjs.normalizeHttpRoute; exports.normalizeSpanId = _chunkLXBU5E77cjs.normalizeSpanId; exports.normalizeTraceId = _chunkLXBU5E77cjs.normalizeTraceId; exports.observabilityOptionsForPreset = _chunkKHACHFBQcjs.observabilityOptionsForPreset; exports.observabilityOptionsFromEnv = _chunkKHACHFBQcjs.observabilityOptionsFromEnv; exports.observeHttpServerRequest = _chunkLXBU5E77cjs.observeHttpServerRequest; exports.otlpAnyValue = _chunkLXBU5E77cjs.otlpAnyValue; exports.parseBaggage = _chunkLXBU5E77cjs.parseBaggage; exports.parseTraceparent = _chunkLXBU5E77cjs.parseTraceparent; exports.postOtlpJson = _chunkLXBU5E77cjs.postOtlpJson; exports.ratioSampler = _chunkLXBU5E77cjs.ratioSampler; exports.readiness = _chunkLXBU5E77cjs.readiness; exports.resolveRequestBaggage = _chunkLXBU5E77cjs.resolveRequestBaggage; exports.resolveRequestTraceSeed = _chunkLXBU5E77cjs.resolveRequestTraceSeed; exports.resolveTraceSampling = _chunkLXBU5E77cjs.resolveTraceSampling; exports.runObservedHttpServerEffect = _chunkLXBU5E77cjs.runObservedHttpServerEffect; exports.runtimeHealth = _chunkLXBU5E77cjs.runtimeHealth; exports.sanitizeHttpTarget = _chunkLXBU5E77cjs.sanitizeHttpTarget; exports.shouldSampleWith = _chunkLXBU5E77cjs.shouldSampleWith; exports.snapshotRuntimeHealth = _chunkLXBU5E77cjs.snapshotRuntimeHealth; exports.spanEvent = _chunkLXBU5E77cjs.spanEvent; exports.spanLink = _chunkLXBU5E77cjs.spanLink; exports.spansToOtlp = _chunkLXBU5E77cjs.spansToOtlp; exports.structuredLogsToOtlp = _chunkLXBU5E77cjs.structuredLogsToOtlp; exports.toOtlpAttributes = _chunkLXBU5E77cjs.toOtlpAttributes; exports.unixNanoFromMs = _chunkLXBU5E77cjs.unixNanoFromMs; exports.withBaggage = _chunkLXBU5E77cjs.withBaggage; exports.withFetchRequestObservability = _chunkKHACHFBQcjs.withFetchRequestObservability; exports.withHttpObservability = _chunkKHACHFBQcjs.withHttpObservability; exports.withLogContext = _chunkLXBU5E77cjs.withLogContext; exports.withNodeRequestObservability = _chunkKHACHFBQcjs.withNodeRequestObservability; exports.withSpan = _chunkLXBU5E77cjs.withSpan; exports.withTimeout = _chunkLXBU5E77cjs.withTimeout;
@@ -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-GJPg8ZSG.js';
2
- export { C as CardinalityConfig, c as CardinalityLimiterOptions, E as ExportBatchResult, d as ExportPipeline, e as ExportPipelineFlushOptions, f as ExportPipelineFlushResult, g as ExportPipelineOptions, h as ExportPipelineStats, i as ExportPipelineTuning, j as ExportRetryOptions, k as ExportSignal, H as HealthCheck, l as HealthCheckResult, m as HealthHttpResponse, n as HealthStatus, o as HttpServerObservabilityLogOptions, p as HttpServerObservabilityOptions, q as HttpServerObservabilitySpanOptions, r as HttpServerOutcome, I as InjectTraceContextOptions, s as OTLP_JSON_CONTENT_TYPE, t as ObservabilityExporters, u as ObservabilityFlushError, v as ObservabilityFlushResult, w as ObservabilityLogExportResult, x as ObservabilityOtlpOptions, y as ObservabilityRedactor, z as ObservabilityRequestEnvInput, A as ObservabilityRuntimeEnv, B as ObservabilityTraceExportResult, D as ObservedHttpServerResult, F as OtlpAttributeValue, G as OtlpExportOptions, J as OtlpFetch, K as OtlpHttpExportResult, M as OtlpHttpExporterOptions, N as OtlpHttpResponse, P as PROMETHEUS_CONTENT_TYPE, Q as PrometheusMetricsExporter, U as PrometheusMetricsOptions, V as RedactionConfig, W as RedactionOptions, X as RequestObservabilityRuntimeOptions, Y as ResolvedTraceSampling, Z as RuntimeHealthOptions, _ as RuntimeHealthReport, $ as RuntimeMetricsSinkOptions, a0 as SpanLink, a1 as SpanOptions, a2 as SpanSource, a3 as StructuredLogRecord, a4 as StructuredLogSinkOptions, a5 as StructuredLogSource, a6 as TraceContextHeaderValue, a7 as TraceSamplingConfig, a8 as TraceSamplingOptions, a9 as TraceSamplingRule, aa as alwaysOffSampler, ab as alwaysOnSampler, ac as currentBaggage, ad as currentSpanLink, ae as defaultStructuredLogWriter, af as exemplarFromTraceContext, ag as exportWithRetry, ah as extractBaggage, ai as extractTraceContext, aj as formatBaggage, ak as formatPrometheusMetrics, al as formatStructuredLog, am as formatTraceparent, an as healthToHttpResponse, ao as injectBaggage, ap as injectTraceContext, aq as logEffect, ar as makeCardinalityLimitedMetrics, as as makeExportPipeline, at as makeObservability, au as makeObservabilityRedactor, av as makeOtlpHttpLogExporter, aw as makeOtlpHttpMetricsExporter, ax as makeOtlpHttpSpanExporter, ay as makePrometheusMetricsExporter, az as makeRequestObservabilityContext, aA as makeRuntimeHealth, aB as makeRuntimeMetricsSink, aC as makeStructuredLogSink, aD as makeTraceSampler, aE as metricsSnapshotToOtlp, aF as normalizeHttpRoute, aG as normalizeSpanId, aH as normalizeTraceId, aI as observeHttpServerRequest, aJ as otlpAnyValue, aK as parseBaggage, aL as parseTraceparent, aM as postOtlpJson, aN as ratioSampler, aO as readiness, aP as resolveRequestBaggage, aQ as resolveRequestTraceSeed, aR as resolveTraceSampling, aS as runObservedHttpServerEffect, aT as runtimeHealth, aU as sanitizeHttpTarget, aV as shouldSampleWith, aW as snapshotRuntimeHealth, aX as spanEvent, aY as spanLink, aZ as spansToOtlp, a_ as structuredLogsToOtlp, a$ as toOtlpAttributes, b0 as unixNanoFromMs, b1 as withBaggage, b2 as withLogContext, b3 as withSpan, b4 as withTimeout } from '../server-GJPg8ZSG.js';
3
- import { M as MetricsRegistry } from '../tracer-Hwt1cl7h.js';
4
- import { a as HttpRequest, d as HttpMiddleware } from '../client-CZHU674n.js';
5
- import '../effect-DIUHZ9IN.js';
6
- import '../schedule-CK3Ml_7p.js';
7
- import '../stream-B4oK9JFP.js';
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-C1zVmqE6.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-C1zVmqE6.js';
3
+ import { R as RuntimeHooks, a as RuntimeOptions, b as Runtime } from '../effect-CtUDl5M5.js';
4
+ import { M as MetricsRegistry } from '../tracer-DzfuE6um.js';
5
+ import { H as HttpRequest, d as HttpMiddleware, e as DefaultHttpClientConfig, D as DefaultHttpClient } from '../defaultClient-DhpCQW9m.js';
6
+ import { a as LayerContext, S as ServiceTag, L as Layer } from '../layer-BalPI6cN.js';
7
+ import '../stream-Bb4FTejt.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
- 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, ObservabilityOptions, type ObservabilityPreset, RequestObservabilityContext, RequestObservabilityContextInput, SpanAttributes, TraceContextCarrier, makeExpressRequestObservabilityContext, makeFastifyRequestObservabilityContext, makeFetchRequestObservabilityContext, makeHttpObservabilityMiddleware, makeNodeRequestObservabilityContext, makeNoopObservability, makeObservabilityFromEnv, makeObservabilityPreset, observabilityOptionsForPreset, observabilityOptionsFromEnv, withFetchRequestObservability, withHttpObservability, withNodeRequestObservability };
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-AVNQLJ5V.js";
20
+ } from "../chunk-3PHU7FWS.js";
21
+ import "../chunk-W6WR37HN.js";
17
22
  import {
18
23
  OTLP_JSON_CONTENT_TYPE,
19
24
  PROMETHEUS_CONTENT_TYPE,
@@ -41,6 +46,7 @@ import {
41
46
  makeOtlpHttpLogExporter,
42
47
  makeOtlpHttpMetricsExporter,
43
48
  makeOtlpHttpSpanExporter,
49
+ makeOtlpOptions,
44
50
  makePrometheusMetricsExporter,
45
51
  makeRequestObservabilityContext,
46
52
  makeRuntimeHealth,
@@ -76,16 +82,21 @@ import {
76
82
  withLogContext,
77
83
  withSpan,
78
84
  withTimeout
79
- } from "../chunk-CIZFIMK5.js";
80
- import "../chunk-RKGKFN2A.js";
81
- import "../chunk-3Y2RIUMM.js";
82
- import "../chunk-FH2X7BVP.js";
85
+ } from "../chunk-4YQHPIWJ.js";
86
+ import "../chunk-AADFFVYS.js";
87
+ import "../chunk-H5GYX7RZ.js";
88
+ import "../chunk-TRM4JUZQ.js";
89
+ import "../chunk-JH4GI3DW.js";
90
+ import "../chunk-UCUBNWM2.js";
91
+ import "../chunk-IBRHSH5H.js";
92
+ import "../chunk-XSAHV5HQ.js";
83
93
  import "../chunk-UB4B6OFY.js";
84
- import "../chunk-C3MDXTRZ.js";
94
+ import "../chunk-HCJ4S3YB.js";
85
95
  import "../chunk-3RG5ZIWI.js";
86
96
  export {
87
97
  HTTP_OBSERVABILITY_CONTRACT,
88
98
  OTLP_JSON_CONTENT_TYPE,
99
+ ObservabilityService,
89
100
  PROMETHEUS_CONTENT_TYPE,
90
101
  alwaysOffSampler,
91
102
  alwaysOnSampler,
@@ -114,11 +125,15 @@ export {
114
125
  makeNoopObservability,
115
126
  makeObservability,
116
127
  makeObservabilityFromEnv,
128
+ makeObservabilityLayer,
117
129
  makeObservabilityPreset,
118
130
  makeObservabilityRedactor,
131
+ makeObservedHttpClientLayer,
132
+ makeObservedRuntimeLayer,
119
133
  makeOtlpHttpLogExporter,
120
134
  makeOtlpHttpMetricsExporter,
121
135
  makeOtlpHttpSpanExporter,
136
+ makeOtlpOptions,
122
137
  makePrometheusMetricsExporter,
123
138
  makeRequestObservabilityContext,
124
139
  makeRuntimeHealth,
@@ -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-DNFO2EIZ.mjs";
20
+ } from "../chunk-QCOLAHU3.mjs";
21
+ import "../chunk-ITZQ526U.mjs";
17
22
  import {
18
23
  OTLP_JSON_CONTENT_TYPE,
19
24
  PROMETHEUS_CONTENT_TYPE,
@@ -41,6 +46,7 @@ import {
41
46
  makeOtlpHttpLogExporter,
42
47
  makeOtlpHttpMetricsExporter,
43
48
  makeOtlpHttpSpanExporter,
49
+ makeOtlpOptions,
44
50
  makePrometheusMetricsExporter,
45
51
  makeRequestObservabilityContext,
46
52
  makeRuntimeHealth,
@@ -76,16 +82,21 @@ import {
76
82
  withLogContext,
77
83
  withSpan,
78
84
  withTimeout
79
- } from "../chunk-MT3OWDPC.mjs";
80
- import "../chunk-EJ6BPYVR.mjs";
81
- import "../chunk-PWC3RBQE.mjs";
82
- import "../chunk-GYM3LLGS.mjs";
85
+ } from "../chunk-KRYP6CAE.mjs";
86
+ import "../chunk-OT2TESZU.mjs";
87
+ import "../chunk-Z3PSSXP3.mjs";
88
+ import "../chunk-MOO4L7F4.mjs";
89
+ import "../chunk-RREBJX2S.mjs";
90
+ import "../chunk-B5JD23U7.mjs";
91
+ import "../chunk-ELLF55ER.mjs";
92
+ import "../chunk-2QNREG6K.mjs";
83
93
  import "../chunk-36I3M4UC.mjs";
84
- import "../chunk-DNFJLJMW.mjs";
94
+ import "../chunk-6MLAZPBL.mjs";
85
95
  import "../chunk-Y6FXYEAI.mjs";
86
96
  export {
87
97
  HTTP_OBSERVABILITY_CONTRACT,
88
98
  OTLP_JSON_CONTENT_TYPE,
99
+ ObservabilityService,
89
100
  PROMETHEUS_CONTENT_TYPE,
90
101
  alwaysOffSampler,
91
102
  alwaysOnSampler,
@@ -114,11 +125,15 @@ export {
114
125
  makeNoopObservability,
115
126
  makeObservability,
116
127
  makeObservabilityFromEnv,
128
+ makeObservabilityLayer,
117
129
  makeObservabilityPreset,
118
130
  makeObservabilityRedactor,
131
+ makeObservedHttpClientLayer,
132
+ makeObservedRuntimeLayer,
119
133
  makeOtlpHttpLogExporter,
120
134
  makeOtlpHttpMetricsExporter,
121
135
  makeOtlpHttpSpanExporter,
136
+ makeOtlpOptions,
122
137
  makePrometheusMetricsExporter,
123
138
  makeRequestObservabilityContext,
124
139
  makeRuntimeHealth,
package/dist/perf/cli.cjs CHANGED
@@ -15,44 +15,42 @@
15
15
 
16
16
 
17
17
 
18
- var _chunkVN44DYYTcjs = require('../chunk-VN44DYYT.cjs');
19
- require('../chunk-PD4EJTQC.cjs');
20
- require('../chunk-KQLYONSE.cjs');
21
- require('../chunk-5EC274J5.cjs');
18
+ var _chunkYTX2JYYPcjs = require('../chunk-YTX2JYYP.cjs');
19
+ require('../chunk-N6QNSTWD.cjs');
20
+ require('../chunk-KHACHFBQ.cjs');
21
+ require('../chunk-5XADBMSU.cjs');
22
+ require('../chunk-LXBU5E77.cjs');
23
+ require('../chunk-AJMKZXRB.cjs');
24
+ require('../chunk-VIFA4DPN.cjs');
22
25
  require('../chunk-L6VB5N7Q.cjs');
23
- require('../chunk-KZJQ723N.cjs');
26
+ require('../chunk-3PFZGP23.cjs');
24
27
  require('../chunk-SA6HUJVI.cjs');
25
- require('../chunk-AGR5B2BC.cjs');
26
- require('../chunk-JF5WGYJJ.cjs');
27
- require('../chunk-76YMRMH2.cjs');
28
- require('../chunk-ENKODRU3.cjs');
29
- require('../chunk-52PPNNI4.cjs');
30
- require('../chunk-3LOYJFRR.cjs');
31
- require('../chunk-GLE2WY7Z.cjs');
28
+ require('../chunk-7TXQJFZX.cjs');
29
+ require('../chunk-SSQJKDN3.cjs');
32
30
  require('../chunk-MVGUEJ5Z.cjs');
33
- require('../chunk-CZIVE6NT.cjs');
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 _chunkVN44DYYTcjs.profileRuntimeAb.call(void 0, cli.runtimeAb);
41
- await printReport(cli, report2, _chunkVN44DYYTcjs.formatRuntimeAbReport.call(void 0, report2));
38
+ const report2 = await _chunkYTX2JYYPcjs.profileRuntimeAb.call(void 0, cli.runtimeAb);
39
+ await printReport(cli, report2, _chunkYTX2JYYPcjs.formatRuntimeAbReport.call(void 0, report2));
42
40
  return;
43
41
  }
44
42
  if (cli.profile === "runtime-soak") {
45
- const report2 = await _chunkVN44DYYTcjs.profileRuntimeSoak.call(void 0, cli.runtimeSoak);
46
- await printReport(cli, report2, _chunkVN44DYYTcjs.formatRuntimeSoakReport.call(void 0, report2));
43
+ const report2 = await _chunkYTX2JYYPcjs.profileRuntimeSoak.call(void 0, cli.runtimeSoak);
44
+ await printReport(cli, report2, _chunkYTX2JYYPcjs.formatRuntimeSoakReport.call(void 0, report2));
47
45
  return;
48
46
  }
49
47
  if (cli.profile === "http-memory") {
50
- const report2 = await _chunkVN44DYYTcjs.profileHttpMemoryLab.call(void 0, cli.httpMemory);
51
- await printReport(cli, report2, _chunkVN44DYYTcjs.formatHttpMemoryLabReport.call(void 0, report2));
48
+ const report2 = await _chunkYTX2JYYPcjs.profileHttpMemoryLab.call(void 0, cli.httpMemory);
49
+ await printReport(cli, report2, _chunkYTX2JYYPcjs.formatHttpMemoryLabReport.call(void 0, report2));
52
50
  return;
53
51
  }
54
- const report = await _chunkVN44DYYTcjs.runBrassPerformanceProfile.call(void 0, cli.options);
55
- await printReport(cli, report, _chunkVN44DYYTcjs.formatPerformanceReport.call(void 0, report));
52
+ const report = await _chunkYTX2JYYPcjs.runBrassPerformanceProfile.call(void 0, cli.options);
53
+ await printReport(cli, report, _chunkYTX2JYYPcjs.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 = _chunkVN44DYYTcjs.createPerfHistoryEntry.call(void 0, cli.profile, report, storeOptions);
299
- const historyPath = config.recordHistory ? await _chunkVN44DYYTcjs.writePerfHistoryEntry.call(void 0, entry, storeOptions) : void 0;
300
- const savedBaseline = config.saveBaseline ? await _chunkVN44DYYTcjs.savePerfBaseline.call(void 0, config.saveBaseline, entry, storeOptions) : void 0;
301
- const loadedBaseline = config.compareBaseline ? await _chunkVN44DYYTcjs.loadPerfBaseline.call(void 0, config.compareBaseline, storeOptions) : void 0;
296
+ const entry = _chunkYTX2JYYPcjs.createPerfHistoryEntry.call(void 0, cli.profile, report, storeOptions);
297
+ const historyPath = config.recordHistory ? await _chunkYTX2JYYPcjs.writePerfHistoryEntry.call(void 0, entry, storeOptions) : void 0;
298
+ const savedBaseline = config.saveBaseline ? await _chunkYTX2JYYPcjs.savePerfBaseline.call(void 0, config.saveBaseline, entry, storeOptions) : void 0;
299
+ const loadedBaseline = config.compareBaseline ? await _chunkYTX2JYYPcjs.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 ? _chunkVN44DYYTcjs.comparePerfToBaseline.call(void 0, entry, loadedBaseline, config.thresholds) : void 0;
303
+ const comparison = loadedBaseline ? _chunkYTX2JYYPcjs.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(_chunkVN44DYYTcjs.formatPerfBaselineComparison.call(void 0, history.comparison));
318
+ lines.push(_chunkYTX2JYYPcjs.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(_chunkVN44DYYTcjs.HTTP_PROFILE_VARIANTS);
336
+ const allowed = new Set(_chunkYTX2JYYPcjs.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-BABBZK4Y.js";
19
- import "../chunk-5QC7LRZ3.js";
20
- import "../chunk-74ZTY6CP.js";
21
- import "../chunk-MIIYDLGM.js";
18
+ } from "../chunk-PSEU65ND.js";
19
+ import "../chunk-S4HHFUYP.js";
20
+ import "../chunk-3PHU7FWS.js";
21
+ import "../chunk-W6WR37HN.js";
22
+ import "../chunk-4YQHPIWJ.js";
23
+ import "../chunk-AADFFVYS.js";
24
+ import "../chunk-H5GYX7RZ.js";
22
25
  import "../chunk-TRM4JUZQ.js";
23
- import "../chunk-7JIJOVCT.js";
26
+ import "../chunk-JH4GI3DW.js";
24
27
  import "../chunk-UCUBNWM2.js";
25
- import "../chunk-6IXXWIUM.js";
26
- import "../chunk-L2SYFEBS.js";
27
- import "../chunk-AVNQLJ5V.js";
28
- import "../chunk-CIZFIMK5.js";
29
- import "../chunk-RKGKFN2A.js";
30
- import "../chunk-3Y2RIUMM.js";
31
- import "../chunk-FH2X7BVP.js";
28
+ import "../chunk-IBRHSH5H.js";
29
+ import "../chunk-XSAHV5HQ.js";
32
30
  import "../chunk-UB4B6OFY.js";
33
- import "../chunk-C3MDXTRZ.js";
31
+ import "../chunk-HCJ4S3YB.js";
34
32
  import "../chunk-3RG5ZIWI.js";
35
33
 
36
34
  // src/perf/cli.ts