brass-runtime 1.16.1 → 1.17.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 (39) hide show
  1. package/README.md +4 -5
  2. package/dist/{chunk-MT3OWDPC.mjs → chunk-4P2HHGAX.mjs} +28 -0
  3. package/dist/{chunk-HLWLMW2F.mjs → chunk-6RY2FFN4.mjs} +2 -2
  4. package/dist/{chunk-BABBZK4Y.js → chunk-7X3K5RMS.js} +2 -2
  5. package/dist/{chunk-VN44DYYT.cjs → chunk-7ZPEZ57L.cjs} +4 -4
  6. package/dist/{chunk-CIZFIMK5.js → chunk-BKK77SBA.js} +28 -0
  7. package/dist/{chunk-76YMRMH2.cjs → chunk-F6XWZQY4.cjs} +25 -25
  8. package/dist/{chunk-DNFO2EIZ.mjs → chunk-SK7UZRNI.mjs} +1 -1
  9. package/dist/{chunk-AVNQLJ5V.js → chunk-VWIPB6I5.js} +1 -1
  10. package/dist/{chunk-ENKODRU3.cjs → chunk-WBGRHGBP.cjs} +29 -1
  11. package/dist/http/index.cjs +4 -4
  12. package/dist/http/index.d.ts +1 -1
  13. package/dist/http/index.js +1 -1
  14. package/dist/http/index.mjs +1 -1
  15. package/dist/observability/index.cjs +5 -3
  16. package/dist/observability/index.d.ts +2 -2
  17. package/dist/observability/index.js +4 -2
  18. package/dist/observability/index.mjs +4 -2
  19. package/dist/perf/cli.cjs +18 -18
  20. package/dist/perf/cli.js +3 -3
  21. package/dist/perf/cli.mjs +3 -3
  22. package/dist/perf/index.cjs +5 -5
  23. package/dist/perf/index.js +3 -3
  24. package/dist/perf/index.mjs +3 -3
  25. package/dist/{server-GJPg8ZSG.d.ts → server-D6JZ15_e.d.ts} +12 -1
  26. package/docs/README.md +2 -0
  27. package/docs/ai/PUBLIC_API.md +3 -0
  28. package/docs/framework-integrations.md +38 -0
  29. package/docs/frameworks/angular.md +153 -0
  30. package/docs/frameworks/express.md +125 -0
  31. package/docs/frameworks/fastify.md +124 -0
  32. package/docs/frameworks/nestjs.md +282 -0
  33. package/docs/frameworks/nextjs.md +147 -0
  34. package/docs/frameworks/react.md +139 -0
  35. package/docs/frameworks/vanilla.md +224 -0
  36. package/docs/nestjs.md +6 -0
  37. package/docs/observability-framework-examples.md +12 -0
  38. package/docs/observability.md +107 -0
  39. package/package.json +1 -1
package/README.md CHANGED
@@ -420,6 +420,7 @@ const client = baseClient.with(middleware);
420
420
  import { Runtime, asyncSucceed } from "brass-runtime/core";
421
421
  import {
422
422
  makeObservability,
423
+ makeOtlpOptions,
423
424
  runObservedHttpServerEffect,
424
425
  withHttpObservability,
425
426
  } from "brass-runtime/observability";
@@ -431,11 +432,7 @@ const obs = makeObservability({
431
432
  sampling: { ratio: 0.25, respectRemoteSampled: true, forceSampleOnError: true },
432
433
  redaction: {},
433
434
  cardinality: { maxValuesPerLabel: 100 },
434
- otlp: {
435
- metricsUrl: "http://collector:4318/v1/metrics",
436
- tracesUrl: "http://collector:4318/v1/traces",
437
- logsUrl: "http://collector:4318/v1/logs",
438
- },
435
+ otlp: makeOtlpOptions({ endpoint: "http://collector:4318" }),
439
436
  flushIntervalMs: 10_000,
440
437
  });
441
438
 
@@ -666,6 +663,8 @@ Property-based tests use `fast-check` with 100+ iterations per property. Each HT
666
663
  - [Cancellation & Interruption](./docs/cancellation.md)
667
664
  - [Observability: Hooks & Tracing](./docs/observability.md)
668
665
  - [Observability framework examples](./docs/observability-framework-examples.md)
666
+ - [Framework integrations](./docs/framework-integrations.md)
667
+ - [NestJS integration](./docs/frameworks/nestjs.md)
669
668
  - [Observability collector smoke](./docs/observability-collector-smoke.md)
670
669
  - [HTTP module](./docs/http.md)
671
670
  - [Production readiness](./docs/production-readiness.md)
@@ -1569,6 +1569,33 @@ function validateHttpObservabilityOptions(options) {
1569
1569
  }
1570
1570
 
1571
1571
  // src/observability/setup.ts
1572
+ var DEFAULT_OTLP_SIGNALS = ["metrics", "traces", "logs"];
1573
+ function makeOtlpOptions(input) {
1574
+ const endpoint = normalizeOtlpEndpoint(input.endpoint);
1575
+ const signals = input.signals ?? DEFAULT_OTLP_SIGNALS;
1576
+ return {
1577
+ ...signals.includes("metrics") ? { metricsUrl: `${endpoint}/v1/metrics` } : {},
1578
+ ...signals.includes("traces") ? { tracesUrl: `${endpoint}/v1/traces` } : {},
1579
+ ...signals.includes("logs") ? { logsUrl: `${endpoint}/v1/logs` } : {},
1580
+ ...input.headers ? { headers: input.headers } : {},
1581
+ ...input.fetch ? { fetch: input.fetch } : {},
1582
+ ...input.timeoutMs !== void 0 ? { timeoutMs: input.timeoutMs } : {},
1583
+ ...input.retry ? { retry: input.retry } : {},
1584
+ ...input.pipeline ? { pipeline: input.pipeline } : {}
1585
+ };
1586
+ }
1587
+ function normalizeOtlpEndpoint(endpoint) {
1588
+ const trimmed = endpoint.trim();
1589
+ let end = trimmed.length;
1590
+ while (end > 0 && trimmed.charCodeAt(end - 1) === 47) {
1591
+ end -= 1;
1592
+ }
1593
+ const normalized = trimmed.slice(0, end);
1594
+ if (!normalized) {
1595
+ throw new Error("makeOtlpOptions endpoint must not be empty");
1596
+ }
1597
+ return normalized;
1598
+ }
1572
1599
  function makeObservability(options = {}) {
1573
1600
  validateObservabilityOptions(options);
1574
1601
  const serviceName = options.serviceName ?? "brass-runtime";
@@ -2184,6 +2211,7 @@ export {
2184
2211
  normalizeHttpRoute,
2185
2212
  sanitizeHttpTarget,
2186
2213
  validateHttpObservabilityOptions,
2214
+ makeOtlpOptions,
2187
2215
  makeObservability,
2188
2216
  resolveRequestTraceSeed,
2189
2217
  resolveRequestBaggage,
@@ -10,10 +10,10 @@ import {
10
10
  } from "./chunk-5VRJNBLZ.mjs";
11
11
  import {
12
12
  withHttpObservability
13
- } from "./chunk-DNFO2EIZ.mjs";
13
+ } from "./chunk-SK7UZRNI.mjs";
14
14
  import {
15
15
  makeObservability
16
- } from "./chunk-MT3OWDPC.mjs";
16
+ } from "./chunk-4P2HHGAX.mjs";
17
17
  import {
18
18
  EventBus
19
19
  } from "./chunk-EJ6BPYVR.mjs";
@@ -10,10 +10,10 @@ import {
10
10
  } from "./chunk-MIIYDLGM.js";
11
11
  import {
12
12
  withHttpObservability
13
- } from "./chunk-AVNQLJ5V.js";
13
+ } from "./chunk-VWIPB6I5.js";
14
14
  import {
15
15
  makeObservability
16
- } from "./chunk-CIZFIMK5.js";
16
+ } from "./chunk-BKK77SBA.js";
17
17
  import {
18
18
  EventBus
19
19
  } from "./chunk-RKGKFN2A.js";
@@ -10,10 +10,10 @@ var _chunkKQLYONSEcjs = require('./chunk-KQLYONSE.cjs');
10
10
  var _chunk5EC274J5cjs = require('./chunk-5EC274J5.cjs');
11
11
 
12
12
 
13
- var _chunk76YMRMH2cjs = require('./chunk-76YMRMH2.cjs');
13
+ var _chunkF6XWZQY4cjs = require('./chunk-F6XWZQY4.cjs');
14
14
 
15
15
 
16
- var _chunkENKODRU3cjs = require('./chunk-ENKODRU3.cjs');
16
+ var _chunkWBGRHGBPcjs = require('./chunk-WBGRHGBP.cjs');
17
17
 
18
18
 
19
19
  var _chunk52PPNNI4cjs = require('./chunk-52PPNNI4.cjs');
@@ -653,7 +653,7 @@ async function profileHttpLayers(options = {}) {
653
653
  }
654
654
  async function runScenario(scenario) {
655
655
  const server = await startDummyServer(scenario.delayMs);
656
- const observability = scenario.variant === "default-json-observed" ? _chunkENKODRU3cjs.makeObservability.call(void 0, {
656
+ const observability = scenario.variant === "default-json-observed" ? _chunkWBGRHGBPcjs.makeObservability.call(void 0, {
657
657
  logs: false,
658
658
  traces: { maxFinishedSpans: 1e4 },
659
659
  autoStart: false
@@ -881,7 +881,7 @@ function makeDefaultClient(baseUrl, scenario, preset, disableAdaptiveLimiter, ob
881
881
  ...disableAdaptiveLimiter ? { adaptiveLimiter: false } : {},
882
882
  ...observability ? {
883
883
  middleware: [
884
- _chunk76YMRMH2cjs.withHttpObservability.call(void 0, {
884
+ _chunkF6XWZQY4cjs.withHttpObservability.call(void 0, {
885
885
  metrics: observability.metrics,
886
886
  logs: false,
887
887
  spans: {},
@@ -1569,6 +1569,33 @@ function validateHttpObservabilityOptions(options) {
1569
1569
  }
1570
1570
 
1571
1571
  // src/observability/setup.ts
1572
+ var DEFAULT_OTLP_SIGNALS = ["metrics", "traces", "logs"];
1573
+ function makeOtlpOptions(input) {
1574
+ const endpoint = normalizeOtlpEndpoint(input.endpoint);
1575
+ const signals = input.signals ?? DEFAULT_OTLP_SIGNALS;
1576
+ return {
1577
+ ...signals.includes("metrics") ? { metricsUrl: `${endpoint}/v1/metrics` } : {},
1578
+ ...signals.includes("traces") ? { tracesUrl: `${endpoint}/v1/traces` } : {},
1579
+ ...signals.includes("logs") ? { logsUrl: `${endpoint}/v1/logs` } : {},
1580
+ ...input.headers ? { headers: input.headers } : {},
1581
+ ...input.fetch ? { fetch: input.fetch } : {},
1582
+ ...input.timeoutMs !== void 0 ? { timeoutMs: input.timeoutMs } : {},
1583
+ ...input.retry ? { retry: input.retry } : {},
1584
+ ...input.pipeline ? { pipeline: input.pipeline } : {}
1585
+ };
1586
+ }
1587
+ function normalizeOtlpEndpoint(endpoint) {
1588
+ const trimmed = endpoint.trim();
1589
+ let end = trimmed.length;
1590
+ while (end > 0 && trimmed.charCodeAt(end - 1) === 47) {
1591
+ end -= 1;
1592
+ }
1593
+ const normalized = trimmed.slice(0, end);
1594
+ if (!normalized) {
1595
+ throw new Error("makeOtlpOptions endpoint must not be empty");
1596
+ }
1597
+ return normalized;
1598
+ }
1572
1599
  function makeObservability(options = {}) {
1573
1600
  validateObservabilityOptions(options);
1574
1601
  const serviceName = options.serviceName ?? "brass-runtime";
@@ -2184,6 +2211,7 @@ export {
2184
2211
  normalizeHttpRoute,
2185
2212
  sanitizeHttpTarget,
2186
2213
  validateHttpObservabilityOptions,
2214
+ makeOtlpOptions,
2187
2215
  makeObservability,
2188
2216
  resolveRequestTraceSeed,
2189
2217
  resolveRequestBaggage,
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkENKODRU3cjs = require('./chunk-ENKODRU3.cjs');
12
+ var _chunkWBGRHGBPcjs = require('./chunk-WBGRHGBP.cjs');
13
13
 
14
14
 
15
15
 
@@ -100,7 +100,7 @@ var HTTP_OBSERVABILITY_CONTRACT = Object.freeze({
100
100
  });
101
101
  function withHttpObservability(options) {
102
102
  if (!isObservabilityInstance(options)) {
103
- _chunkENKODRU3cjs.validateHttpObservabilityOptions.call(void 0, _nullishCoalesce(options, () => ( {})));
103
+ _chunkWBGRHGBPcjs.validateHttpObservabilityOptions.call(void 0, _nullishCoalesce(options, () => ( {})));
104
104
  }
105
105
  const resolved = resolveHttpObservabilityOptions(options);
106
106
  return (next) => {
@@ -117,7 +117,7 @@ function withHttpObservability(options) {
117
117
  const finish = state.finishWithError(error);
118
118
  const adaptiveLimiterAttrs = observeAdaptiveLimiter(wireReq, next, resolved);
119
119
  return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
120
- _chunkENKODRU3cjs.spanEvent.call(void 0, "http.client.error", {
120
+ _chunkWBGRHGBPcjs.spanEvent.call(void 0, "http.client.error", {
121
121
  ...finish.spanAttributes,
122
122
  ...adaptiveLimiterAttrs,
123
123
  "error.type": error._tag
@@ -129,7 +129,7 @@ function withHttpObservability(options) {
129
129
  const finish = state.finishWithResponse(res);
130
130
  const adaptiveLimiterAttrs = observeAdaptiveLimiter(wireReq, next, resolved);
131
131
  return _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
132
- _chunkENKODRU3cjs.spanEvent.call(void 0, "http.client.response", {
132
+ _chunkWBGRHGBPcjs.spanEvent.call(void 0, "http.client.response", {
133
133
  ...finish.spanAttributes,
134
134
  ...adaptiveLimiterAttrs
135
135
  }),
@@ -141,7 +141,7 @@ function withHttpObservability(options) {
141
141
  )
142
142
  );
143
143
  if (resolved.spans === false) return run;
144
- return _chunkENKODRU3cjs.withSpan.call(void 0, spanName(req, resolved.spans), run, spanStartAttributes(req, resolved));
144
+ return _chunkWBGRHGBPcjs.withSpan.call(void 0, spanName(req, resolved.spans), run, spanStartAttributes(req, resolved));
145
145
  };
146
146
  };
147
147
  }
@@ -197,13 +197,13 @@ function prepareHttpRequest(req, options) {
197
197
  function logHttpRequest(req, options) {
198
198
  const level = options.logs === false ? false : _nullishCoalesce(options.logs.requestLevel, () => ( false));
199
199
  if (!level) return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
200
- return _chunkENKODRU3cjs.logEffect.call(void 0, level, "http.client.request", requestLogFields(req, options));
200
+ return _chunkWBGRHGBPcjs.logEffect.call(void 0, level, "http.client.request", requestLogFields(req, options));
201
201
  }
202
202
  function logHttpResponse(req, res, finish, options) {
203
203
  const configured = options.logs === false ? false : _nullishCoalesce(options.logs.responseLevel, () => ( false));
204
204
  const level = configured || (finish.outcome === "error" ? options.logs !== false ? _nullishCoalesce(options.logs.errorLevel, () => ( "warn")) : false : false);
205
205
  if (!level) return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
206
- return _chunkENKODRU3cjs.logEffect.call(void 0, level, "http.client.response", {
206
+ return _chunkWBGRHGBPcjs.logEffect.call(void 0, level, "http.client.response", {
207
207
  ...requestLogFields(req, options),
208
208
  status: res.status,
209
209
  statusText: res.statusText,
@@ -216,7 +216,7 @@ function logHttpError(req, error, finish, options) {
216
216
  if (!level) return _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, void 0);
217
217
  const status = _chunk3LOYJFRRcjs.httpErrorStatus.call(void 0, error);
218
218
  const statusText = httpErrorStatusText(error);
219
- return _chunkENKODRU3cjs.logEffect.call(void 0, level, "http.client.error", {
219
+ return _chunkWBGRHGBPcjs.logEffect.call(void 0, level, "http.client.error", {
220
220
  ...requestLogFields(req, options),
221
221
  outcome: finish.outcome,
222
222
  durationMs: finish.durationMs,
@@ -490,12 +490,12 @@ function injectCurrentTraceContext(req) {
490
490
  if (!_optionalChain([trace, 'optionalAccess', _33 => _33.traceId]) || !_optionalChain([trace, 'optionalAccess', _34 => _34.spanId])) return req;
491
491
  return {
492
492
  ...req,
493
- headers: _chunkENKODRU3cjs.injectTraceContext.call(void 0, req.headers, trace)
493
+ headers: _chunkWBGRHGBPcjs.injectTraceContext.call(void 0, req.headers, trace)
494
494
  };
495
495
  }
496
496
  function currentTraceExemplar(value, timestamp) {
497
497
  const fiber = _chunkGLE2WY7Zcjs.getCurrentFiber.call(void 0, );
498
- return _chunkENKODRU3cjs.exemplarFromTraceContext.call(void 0, _optionalChain([fiber, 'optionalAccess', _35 => _35.fiberContext, 'optionalAccess', _36 => _36.trace]), value, timestamp);
498
+ return _chunkWBGRHGBPcjs.exemplarFromTraceContext.call(void 0, _optionalChain([fiber, 'optionalAccess', _35 => _35.fiberContext, 'optionalAccess', _36 => _36.trace]), value, timestamp);
499
499
  }
500
500
  function requestHost(req) {
501
501
  if (!isAbsoluteUrl(req.url)) return void 0;
@@ -563,38 +563,38 @@ function compactLabels(labels) {
563
563
 
564
564
  // src/observability/adapters.ts
565
565
  function makeFetchRequestObservabilityContext(observability, request, input = {}) {
566
- return _chunkENKODRU3cjs.makeRequestObservabilityContext.call(void 0, observability, {
566
+ return _chunkWBGRHGBPcjs.makeRequestObservabilityContext.call(void 0, observability, {
567
567
  headers: request.headers,
568
568
  method: request.method,
569
- target: _chunkENKODRU3cjs.sanitizeHttpTarget.call(void 0, request.url),
570
- route: _nullishCoalesce(input.route, () => ( _chunkENKODRU3cjs.normalizeHttpRoute.call(void 0, urlPathname(request.url)))),
569
+ target: _chunkWBGRHGBPcjs.sanitizeHttpTarget.call(void 0, request.url),
570
+ route: _nullishCoalesce(input.route, () => ( _chunkWBGRHGBPcjs.normalizeHttpRoute.call(void 0, urlPathname(request.url)))),
571
571
  ...input
572
572
  });
573
573
  }
574
574
  function makeNodeRequestObservabilityContext(observability, request, input = {}) {
575
- return _chunkENKODRU3cjs.makeRequestObservabilityContext.call(void 0, observability, {
575
+ return _chunkWBGRHGBPcjs.makeRequestObservabilityContext.call(void 0, observability, {
576
576
  headers: request.headers,
577
577
  method: request.method,
578
- target: _chunkENKODRU3cjs.sanitizeHttpTarget.call(void 0, request.url),
579
- route: _nullishCoalesce(input.route, () => ( _chunkENKODRU3cjs.normalizeHttpRoute.call(void 0, request.url))),
578
+ target: _chunkWBGRHGBPcjs.sanitizeHttpTarget.call(void 0, request.url),
579
+ route: _nullishCoalesce(input.route, () => ( _chunkWBGRHGBPcjs.normalizeHttpRoute.call(void 0, request.url))),
580
580
  ...input
581
581
  });
582
582
  }
583
583
  function makeExpressRequestObservabilityContext(observability, request, input = {}) {
584
- return _chunkENKODRU3cjs.makeRequestObservabilityContext.call(void 0, observability, {
584
+ return _chunkWBGRHGBPcjs.makeRequestObservabilityContext.call(void 0, observability, {
585
585
  headers: request.headers,
586
586
  method: request.method,
587
- target: _chunkENKODRU3cjs.sanitizeHttpTarget.call(void 0, _nullishCoalesce(request.originalUrl, () => ( request.url))),
588
- route: _nullishCoalesce(_nullishCoalesce(input.route, () => ( _optionalChain([request, 'access', _37 => _37.route, 'optionalAccess', _38 => _38.path]))), () => ( _chunkENKODRU3cjs.normalizeHttpRoute.call(void 0, _nullishCoalesce(request.path, () => ( request.url))))),
587
+ target: _chunkWBGRHGBPcjs.sanitizeHttpTarget.call(void 0, _nullishCoalesce(request.originalUrl, () => ( request.url))),
588
+ route: _nullishCoalesce(_nullishCoalesce(input.route, () => ( _optionalChain([request, 'access', _37 => _37.route, 'optionalAccess', _38 => _38.path]))), () => ( _chunkWBGRHGBPcjs.normalizeHttpRoute.call(void 0, _nullishCoalesce(request.path, () => ( request.url))))),
589
589
  ...input
590
590
  });
591
591
  }
592
592
  function makeFastifyRequestObservabilityContext(observability, request, input = {}) {
593
- return _chunkENKODRU3cjs.makeRequestObservabilityContext.call(void 0, observability, {
593
+ return _chunkWBGRHGBPcjs.makeRequestObservabilityContext.call(void 0, observability, {
594
594
  headers: request.headers,
595
595
  method: request.method,
596
- target: _chunkENKODRU3cjs.sanitizeHttpTarget.call(void 0, request.url),
597
- route: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.route, () => ( _optionalChain([request, 'access', _39 => _39.routeOptions, 'optionalAccess', _40 => _40.url]))), () => ( request.routerPath)), () => ( _chunkENKODRU3cjs.normalizeHttpRoute.call(void 0, request.url))),
596
+ target: _chunkWBGRHGBPcjs.sanitizeHttpTarget.call(void 0, request.url),
597
+ route: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(input.route, () => ( _optionalChain([request, 'access', _39 => _39.routeOptions, 'optionalAccess', _40 => _40.url]))), () => ( request.routerPath)), () => ( _chunkWBGRHGBPcjs.normalizeHttpRoute.call(void 0, request.url))),
598
598
  ...input
599
599
  });
600
600
  }
@@ -615,7 +615,7 @@ function urlPathname(url) {
615
615
 
616
616
  // src/observability/config.ts
617
617
  function makeNoopObservability() {
618
- return _chunkENKODRU3cjs.makeObservability.call(void 0, {
618
+ return _chunkWBGRHGBPcjs.makeObservability.call(void 0, {
619
619
  metrics: false,
620
620
  logs: false,
621
621
  traces: false,
@@ -624,12 +624,12 @@ function makeNoopObservability() {
624
624
  }
625
625
  function makeObservabilityPreset(preset, overrides = {}) {
626
626
  if (preset === "disabled") return makeNoopObservability();
627
- return _chunkENKODRU3cjs.makeObservability.call(void 0, mergeObservabilityOptions(observabilityOptionsForPreset(preset), overrides));
627
+ return _chunkWBGRHGBPcjs.makeObservability.call(void 0, mergeObservabilityOptions(observabilityOptionsForPreset(preset), overrides));
628
628
  }
629
629
  function makeObservabilityFromEnv(env = readProcessEnv(), overrides = {}) {
630
630
  const preset = env.BRASS_OBSERVABILITY === "disabled" ? "disabled" : parsePreset(_nullishCoalesce(env.BRASS_OBSERVABILITY_PRESET, () => ( env.NODE_ENV)));
631
631
  if (preset === "disabled") return makeNoopObservability();
632
- return _chunkENKODRU3cjs.makeObservability.call(void 0, mergeObservabilityOptions(observabilityOptionsFromEnv(env, preset), overrides));
632
+ return _chunkWBGRHGBPcjs.makeObservability.call(void 0, mergeObservabilityOptions(observabilityOptionsFromEnv(env, preset), overrides));
633
633
  }
634
634
  function observabilityOptionsForPreset(preset) {
635
635
  switch (preset) {
@@ -9,7 +9,7 @@ import {
9
9
  spanEvent,
10
10
  validateHttpObservabilityOptions,
11
11
  withSpan
12
- } from "./chunk-MT3OWDPC.mjs";
12
+ } from "./chunk-4P2HHGAX.mjs";
13
13
  import {
14
14
  getHttpRequestPolicy,
15
15
  httpErrorStatus,
@@ -9,7 +9,7 @@ import {
9
9
  spanEvent,
10
10
  validateHttpObservabilityOptions,
11
11
  withSpan
12
- } from "./chunk-CIZFIMK5.js";
12
+ } from "./chunk-BKK77SBA.js";
13
13
  import {
14
14
  getHttpRequestPolicy,
15
15
  httpErrorStatus,
@@ -1569,6 +1569,33 @@ function validateHttpObservabilityOptions(options) {
1569
1569
  }
1570
1570
 
1571
1571
  // src/observability/setup.ts
1572
+ var DEFAULT_OTLP_SIGNALS = ["metrics", "traces", "logs"];
1573
+ function makeOtlpOptions(input) {
1574
+ const endpoint = normalizeOtlpEndpoint(input.endpoint);
1575
+ const signals = _nullishCoalesce(input.signals, () => ( DEFAULT_OTLP_SIGNALS));
1576
+ return {
1577
+ ...signals.includes("metrics") ? { metricsUrl: `${endpoint}/v1/metrics` } : {},
1578
+ ...signals.includes("traces") ? { tracesUrl: `${endpoint}/v1/traces` } : {},
1579
+ ...signals.includes("logs") ? { logsUrl: `${endpoint}/v1/logs` } : {},
1580
+ ...input.headers ? { headers: input.headers } : {},
1581
+ ...input.fetch ? { fetch: input.fetch } : {},
1582
+ ...input.timeoutMs !== void 0 ? { timeoutMs: input.timeoutMs } : {},
1583
+ ...input.retry ? { retry: input.retry } : {},
1584
+ ...input.pipeline ? { pipeline: input.pipeline } : {}
1585
+ };
1586
+ }
1587
+ function normalizeOtlpEndpoint(endpoint) {
1588
+ const trimmed = endpoint.trim();
1589
+ let end = trimmed.length;
1590
+ while (end > 0 && trimmed.charCodeAt(end - 1) === 47) {
1591
+ end -= 1;
1592
+ }
1593
+ const normalized = trimmed.slice(0, end);
1594
+ if (!normalized) {
1595
+ throw new Error("makeOtlpOptions endpoint must not be empty");
1596
+ }
1597
+ return normalized;
1598
+ }
1572
1599
  function makeObservability(options = {}) {
1573
1600
  validateObservabilityOptions(options);
1574
1601
  const serviceName = _nullishCoalesce(options.serviceName, () => ( "brass-runtime"));
@@ -2190,4 +2217,5 @@ function compactLabels(labels) {
2190
2217
 
2191
2218
 
2192
2219
 
2193
- exports.snapshotRuntimeHealth = snapshotRuntimeHealth; exports.makeRuntimeHealth = makeRuntimeHealth; exports.runtimeHealth = runtimeHealth; exports.readiness = readiness; exports.healthToHttpResponse = healthToHttpResponse; exports.makeObservabilityRedactor = makeObservabilityRedactor; exports.parseTraceparent = parseTraceparent; exports.formatTraceparent = formatTraceparent; exports.extractTraceContext = extractTraceContext; exports.injectTraceContext = injectTraceContext; exports.parseBaggage = parseBaggage; exports.formatBaggage = formatBaggage; exports.extractBaggage = extractBaggage; exports.injectBaggage = injectBaggage; exports.normalizeTraceId = normalizeTraceId; exports.normalizeSpanId = normalizeSpanId; exports.PROMETHEUS_CONTENT_TYPE = PROMETHEUS_CONTENT_TYPE; exports.OTLP_JSON_CONTENT_TYPE = OTLP_JSON_CONTENT_TYPE; exports.makePrometheusMetricsExporter = makePrometheusMetricsExporter; exports.formatPrometheusMetrics = formatPrometheusMetrics; exports.metricsSnapshotToOtlp = metricsSnapshotToOtlp; exports.makeOtlpHttpMetricsExporter = makeOtlpHttpMetricsExporter; exports.makeRuntimeMetricsSink = makeRuntimeMetricsSink; exports.exemplarFromTraceContext = exemplarFromTraceContext; exports.toOtlpAttributes = toOtlpAttributes; exports.otlpAnyValue = otlpAnyValue; exports.postOtlpJson = postOtlpJson; exports.unixNanoFromMs = unixNanoFromMs; exports.makeStructuredLogSink = makeStructuredLogSink; exports.formatStructuredLog = formatStructuredLog; exports.structuredLogsToOtlp = structuredLogsToOtlp; exports.makeOtlpHttpLogExporter = makeOtlpHttpLogExporter; exports.logEffect = logEffect; exports.withLogContext = withLogContext; exports.defaultStructuredLogWriter = defaultStructuredLogWriter; exports.alwaysOnSampler = alwaysOnSampler; exports.alwaysOffSampler = alwaysOffSampler; exports.ratioSampler = ratioSampler; exports.makeTraceSampler = makeTraceSampler; exports.resolveTraceSampling = resolveTraceSampling; exports.shouldSampleWith = shouldSampleWith; exports.withSpan = withSpan; exports.spanLink = spanLink; exports.currentSpanLink = currentSpanLink; exports.withBaggage = withBaggage; exports.currentBaggage = currentBaggage; exports.spanEvent = spanEvent; exports.spansToOtlp = spansToOtlp; exports.makeOtlpHttpSpanExporter = makeOtlpHttpSpanExporter; exports.makeExportPipeline = makeExportPipeline; exports.exportWithRetry = exportWithRetry; exports.withTimeout = withTimeout; exports.makeCardinalityLimitedMetrics = makeCardinalityLimitedMetrics; exports.normalizeHttpRoute = normalizeHttpRoute; exports.sanitizeHttpTarget = sanitizeHttpTarget; exports.validateHttpObservabilityOptions = validateHttpObservabilityOptions; exports.makeObservability = makeObservability; exports.resolveRequestTraceSeed = resolveRequestTraceSeed; exports.resolveRequestBaggage = resolveRequestBaggage; exports.makeRequestObservabilityContext = makeRequestObservabilityContext; exports.runObservedHttpServerEffect = runObservedHttpServerEffect; exports.observeHttpServerRequest = observeHttpServerRequest;
2220
+
2221
+ exports.snapshotRuntimeHealth = snapshotRuntimeHealth; exports.makeRuntimeHealth = makeRuntimeHealth; exports.runtimeHealth = runtimeHealth; exports.readiness = readiness; exports.healthToHttpResponse = healthToHttpResponse; exports.makeObservabilityRedactor = makeObservabilityRedactor; exports.parseTraceparent = parseTraceparent; exports.formatTraceparent = formatTraceparent; exports.extractTraceContext = extractTraceContext; exports.injectTraceContext = injectTraceContext; exports.parseBaggage = parseBaggage; exports.formatBaggage = formatBaggage; exports.extractBaggage = extractBaggage; exports.injectBaggage = injectBaggage; exports.normalizeTraceId = normalizeTraceId; exports.normalizeSpanId = normalizeSpanId; exports.PROMETHEUS_CONTENT_TYPE = PROMETHEUS_CONTENT_TYPE; exports.OTLP_JSON_CONTENT_TYPE = OTLP_JSON_CONTENT_TYPE; exports.makePrometheusMetricsExporter = makePrometheusMetricsExporter; exports.formatPrometheusMetrics = formatPrometheusMetrics; exports.metricsSnapshotToOtlp = metricsSnapshotToOtlp; exports.makeOtlpHttpMetricsExporter = makeOtlpHttpMetricsExporter; exports.makeRuntimeMetricsSink = makeRuntimeMetricsSink; exports.exemplarFromTraceContext = exemplarFromTraceContext; exports.toOtlpAttributes = toOtlpAttributes; exports.otlpAnyValue = otlpAnyValue; exports.postOtlpJson = postOtlpJson; exports.unixNanoFromMs = unixNanoFromMs; exports.makeStructuredLogSink = makeStructuredLogSink; exports.formatStructuredLog = formatStructuredLog; exports.structuredLogsToOtlp = structuredLogsToOtlp; exports.makeOtlpHttpLogExporter = makeOtlpHttpLogExporter; exports.logEffect = logEffect; exports.withLogContext = withLogContext; exports.defaultStructuredLogWriter = defaultStructuredLogWriter; exports.alwaysOnSampler = alwaysOnSampler; exports.alwaysOffSampler = alwaysOffSampler; exports.ratioSampler = ratioSampler; exports.makeTraceSampler = makeTraceSampler; exports.resolveTraceSampling = resolveTraceSampling; exports.shouldSampleWith = shouldSampleWith; exports.withSpan = withSpan; exports.spanLink = spanLink; exports.currentSpanLink = currentSpanLink; exports.withBaggage = withBaggage; exports.currentBaggage = currentBaggage; exports.spanEvent = spanEvent; exports.spansToOtlp = spansToOtlp; exports.makeOtlpHttpSpanExporter = makeOtlpHttpSpanExporter; exports.makeExportPipeline = makeExportPipeline; exports.exportWithRetry = exportWithRetry; exports.withTimeout = withTimeout; exports.makeCardinalityLimitedMetrics = makeCardinalityLimitedMetrics; exports.normalizeHttpRoute = normalizeHttpRoute; exports.sanitizeHttpTarget = sanitizeHttpTarget; exports.validateHttpObservabilityOptions = validateHttpObservabilityOptions; exports.makeOtlpOptions = makeOtlpOptions; exports.makeObservability = makeObservability; exports.resolveRequestTraceSeed = resolveRequestTraceSeed; exports.resolveRequestBaggage = resolveRequestBaggage; exports.makeRequestObservabilityContext = makeRequestObservabilityContext; exports.runObservedHttpServerEffect = runObservedHttpServerEffect; exports.observeHttpServerRequest = observeHttpServerRequest;
@@ -91,7 +91,7 @@ require('../chunk-JF5WGYJJ.cjs');
91
91
 
92
92
 
93
93
 
94
- var _chunkENKODRU3cjs = require('../chunk-ENKODRU3.cjs');
94
+ var _chunkWBGRHGBPcjs = require('../chunk-WBGRHGBP.cjs');
95
95
  require('../chunk-52PPNNI4.cjs');
96
96
 
97
97
 
@@ -1038,7 +1038,7 @@ function makeRuntimeHealthRoute(options = {}) {
1038
1038
  "GET",
1039
1039
  path,
1040
1040
  () => _chunkMVGUEJ5Zcjs.asyncFlatMap.call(void 0,
1041
- _chunkENKODRU3cjs.makeRuntimeHealth.call(void 0, healthOptions),
1041
+ _chunkWBGRHGBPcjs.makeRuntimeHealth.call(void 0, healthOptions),
1042
1042
  (report) => _chunkMVGUEJ5Zcjs.asyncSucceed.call(void 0, healthReportToServerResponse(report))
1043
1043
  )
1044
1044
  );
@@ -1061,7 +1061,7 @@ function withResponseHeader(name, value) {
1061
1061
  );
1062
1062
  }
1063
1063
  function healthReportToServerResponse(report) {
1064
- return healthHttpResponseToServerResponse(_chunkENKODRU3cjs.healthToHttpResponse.call(void 0, report));
1064
+ return healthHttpResponseToServerResponse(_chunkWBGRHGBPcjs.healthToHttpResponse.call(void 0, report));
1065
1065
  }
1066
1066
  function healthHttpResponseToServerResponse(response) {
1067
1067
  return {
@@ -1305,7 +1305,7 @@ async function handleNodeRequest(req, res, router, options) {
1305
1305
  target: serverRequest.target,
1306
1306
  headers: serverRequest.headers
1307
1307
  };
1308
- const response = options.observability ? (await _chunkENKODRU3cjs.runObservedHttpServerEffect.call(void 0,
1308
+ const response = options.observability ? (await _chunkWBGRHGBPcjs.runObservedHttpServerEffect.call(void 0,
1309
1309
  options.observability,
1310
1310
  observedInput,
1311
1311
  effect,
@@ -7,7 +7,7 @@ import { d as CircuitBreakerConfig, S as Schedule } from '../schedule-CK3Ml_7p.j
7
7
  import { T as Tracer, R as Resource } from '../tracing-DqbTKGcf.js';
8
8
  import { Server } from 'node:http';
9
9
  import { AddressInfo } from 'node:net';
10
- import { O as Observability, p as HttpServerObservabilityOptions, Z as RuntimeHealthOptions } from '../server-GJPg8ZSG.js';
10
+ import { O as Observability, p as HttpServerObservabilityOptions, $ as RuntimeHealthOptions } from '../server-D6JZ15_e.js';
11
11
  import '../stream-B4oK9JFP.js';
12
12
  import '../tracer-Hwt1cl7h.js';
13
13
 
@@ -91,7 +91,7 @@ import {
91
91
  healthToHttpResponse,
92
92
  makeRuntimeHealth,
93
93
  runObservedHttpServerEffect
94
- } from "../chunk-CIZFIMK5.js";
94
+ } from "../chunk-BKK77SBA.js";
95
95
  import "../chunk-RKGKFN2A.js";
96
96
  import {
97
97
  defineHttpPolicyPresets,
@@ -91,7 +91,7 @@ import {
91
91
  healthToHttpResponse,
92
92
  makeRuntimeHealth,
93
93
  runObservedHttpServerEffect
94
- } from "../chunk-MT3OWDPC.mjs";
94
+ } from "../chunk-4P2HHGAX.mjs";
95
95
  import "../chunk-EJ6BPYVR.mjs";
96
96
  import {
97
97
  defineHttpPolicyPresets,
@@ -13,7 +13,7 @@
13
13
 
14
14
 
15
15
 
16
- var _chunk76YMRMH2cjs = require('../chunk-76YMRMH2.cjs');
16
+ var _chunkF6XWZQY4cjs = require('../chunk-F6XWZQY4.cjs');
17
17
 
18
18
 
19
19
 
@@ -76,7 +76,8 @@ var _chunk76YMRMH2cjs = require('../chunk-76YMRMH2.cjs');
76
76
 
77
77
 
78
78
 
79
- var _chunkENKODRU3cjs = require('../chunk-ENKODRU3.cjs');
79
+
80
+ var _chunkWBGRHGBPcjs = require('../chunk-WBGRHGBP.cjs');
80
81
  require('../chunk-52PPNNI4.cjs');
81
82
  require('../chunk-3LOYJFRR.cjs');
82
83
  require('../chunk-GLE2WY7Z.cjs');
@@ -159,4 +160,5 @@ require('../chunk-OBGZSXTJ.cjs');
159
160
 
160
161
 
161
162
 
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;
163
+
164
+ exports.HTTP_OBSERVABILITY_CONTRACT = _chunkF6XWZQY4cjs.HTTP_OBSERVABILITY_CONTRACT; exports.OTLP_JSON_CONTENT_TYPE = _chunkWBGRHGBPcjs.OTLP_JSON_CONTENT_TYPE; exports.PROMETHEUS_CONTENT_TYPE = _chunkWBGRHGBPcjs.PROMETHEUS_CONTENT_TYPE; exports.alwaysOffSampler = _chunkWBGRHGBPcjs.alwaysOffSampler; exports.alwaysOnSampler = _chunkWBGRHGBPcjs.alwaysOnSampler; exports.currentBaggage = _chunkWBGRHGBPcjs.currentBaggage; exports.currentSpanLink = _chunkWBGRHGBPcjs.currentSpanLink; exports.defaultStructuredLogWriter = _chunkWBGRHGBPcjs.defaultStructuredLogWriter; exports.exemplarFromTraceContext = _chunkWBGRHGBPcjs.exemplarFromTraceContext; exports.exportWithRetry = _chunkWBGRHGBPcjs.exportWithRetry; exports.extractBaggage = _chunkWBGRHGBPcjs.extractBaggage; exports.extractTraceContext = _chunkWBGRHGBPcjs.extractTraceContext; exports.formatBaggage = _chunkWBGRHGBPcjs.formatBaggage; exports.formatPrometheusMetrics = _chunkWBGRHGBPcjs.formatPrometheusMetrics; exports.formatStructuredLog = _chunkWBGRHGBPcjs.formatStructuredLog; exports.formatTraceparent = _chunkWBGRHGBPcjs.formatTraceparent; exports.healthToHttpResponse = _chunkWBGRHGBPcjs.healthToHttpResponse; exports.injectBaggage = _chunkWBGRHGBPcjs.injectBaggage; exports.injectTraceContext = _chunkWBGRHGBPcjs.injectTraceContext; exports.logEffect = _chunkWBGRHGBPcjs.logEffect; exports.makeCardinalityLimitedMetrics = _chunkWBGRHGBPcjs.makeCardinalityLimitedMetrics; exports.makeExportPipeline = _chunkWBGRHGBPcjs.makeExportPipeline; exports.makeExpressRequestObservabilityContext = _chunkF6XWZQY4cjs.makeExpressRequestObservabilityContext; exports.makeFastifyRequestObservabilityContext = _chunkF6XWZQY4cjs.makeFastifyRequestObservabilityContext; exports.makeFetchRequestObservabilityContext = _chunkF6XWZQY4cjs.makeFetchRequestObservabilityContext; exports.makeHttpObservabilityMiddleware = _chunkF6XWZQY4cjs.makeHttpObservabilityMiddleware; exports.makeNodeRequestObservabilityContext = _chunkF6XWZQY4cjs.makeNodeRequestObservabilityContext; exports.makeNoopObservability = _chunkF6XWZQY4cjs.makeNoopObservability; exports.makeObservability = _chunkWBGRHGBPcjs.makeObservability; exports.makeObservabilityFromEnv = _chunkF6XWZQY4cjs.makeObservabilityFromEnv; exports.makeObservabilityPreset = _chunkF6XWZQY4cjs.makeObservabilityPreset; exports.makeObservabilityRedactor = _chunkWBGRHGBPcjs.makeObservabilityRedactor; exports.makeOtlpHttpLogExporter = _chunkWBGRHGBPcjs.makeOtlpHttpLogExporter; exports.makeOtlpHttpMetricsExporter = _chunkWBGRHGBPcjs.makeOtlpHttpMetricsExporter; exports.makeOtlpHttpSpanExporter = _chunkWBGRHGBPcjs.makeOtlpHttpSpanExporter; exports.makeOtlpOptions = _chunkWBGRHGBPcjs.makeOtlpOptions; exports.makePrometheusMetricsExporter = _chunkWBGRHGBPcjs.makePrometheusMetricsExporter; exports.makeRequestObservabilityContext = _chunkWBGRHGBPcjs.makeRequestObservabilityContext; exports.makeRuntimeHealth = _chunkWBGRHGBPcjs.makeRuntimeHealth; exports.makeRuntimeMetricsSink = _chunkWBGRHGBPcjs.makeRuntimeMetricsSink; exports.makeStructuredLogSink = _chunkWBGRHGBPcjs.makeStructuredLogSink; exports.makeTraceSampler = _chunkWBGRHGBPcjs.makeTraceSampler; exports.metricsSnapshotToOtlp = _chunkWBGRHGBPcjs.metricsSnapshotToOtlp; exports.normalizeHttpRoute = _chunkWBGRHGBPcjs.normalizeHttpRoute; exports.normalizeSpanId = _chunkWBGRHGBPcjs.normalizeSpanId; exports.normalizeTraceId = _chunkWBGRHGBPcjs.normalizeTraceId; exports.observabilityOptionsForPreset = _chunkF6XWZQY4cjs.observabilityOptionsForPreset; exports.observabilityOptionsFromEnv = _chunkF6XWZQY4cjs.observabilityOptionsFromEnv; exports.observeHttpServerRequest = _chunkWBGRHGBPcjs.observeHttpServerRequest; exports.otlpAnyValue = _chunkWBGRHGBPcjs.otlpAnyValue; exports.parseBaggage = _chunkWBGRHGBPcjs.parseBaggage; exports.parseTraceparent = _chunkWBGRHGBPcjs.parseTraceparent; exports.postOtlpJson = _chunkWBGRHGBPcjs.postOtlpJson; exports.ratioSampler = _chunkWBGRHGBPcjs.ratioSampler; exports.readiness = _chunkWBGRHGBPcjs.readiness; exports.resolveRequestBaggage = _chunkWBGRHGBPcjs.resolveRequestBaggage; exports.resolveRequestTraceSeed = _chunkWBGRHGBPcjs.resolveRequestTraceSeed; exports.resolveTraceSampling = _chunkWBGRHGBPcjs.resolveTraceSampling; exports.runObservedHttpServerEffect = _chunkWBGRHGBPcjs.runObservedHttpServerEffect; exports.runtimeHealth = _chunkWBGRHGBPcjs.runtimeHealth; exports.sanitizeHttpTarget = _chunkWBGRHGBPcjs.sanitizeHttpTarget; exports.shouldSampleWith = _chunkWBGRHGBPcjs.shouldSampleWith; exports.snapshotRuntimeHealth = _chunkWBGRHGBPcjs.snapshotRuntimeHealth; exports.spanEvent = _chunkWBGRHGBPcjs.spanEvent; exports.spanLink = _chunkWBGRHGBPcjs.spanLink; exports.spansToOtlp = _chunkWBGRHGBPcjs.spansToOtlp; exports.structuredLogsToOtlp = _chunkWBGRHGBPcjs.structuredLogsToOtlp; exports.toOtlpAttributes = _chunkWBGRHGBPcjs.toOtlpAttributes; exports.unixNanoFromMs = _chunkWBGRHGBPcjs.unixNanoFromMs; exports.withBaggage = _chunkWBGRHGBPcjs.withBaggage; exports.withFetchRequestObservability = _chunkF6XWZQY4cjs.withFetchRequestObservability; exports.withHttpObservability = _chunkF6XWZQY4cjs.withHttpObservability; exports.withLogContext = _chunkWBGRHGBPcjs.withLogContext; exports.withNodeRequestObservability = _chunkF6XWZQY4cjs.withNodeRequestObservability; exports.withSpan = _chunkWBGRHGBPcjs.withSpan; exports.withTimeout = _chunkWBGRHGBPcjs.withTimeout;
@@ -1,5 +1,5 @@
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';
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-D6JZ15_e.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, M as MakeOtlpOptionsInput, s as OTLP_JSON_CONTENT_TYPE, t as ObservabilityExporters, u as ObservabilityFlushError, v as ObservabilityFlushResult, w as ObservabilityLogExportResult, x as ObservabilityOtlpOptions, y as ObservabilityOtlpSignal, z as ObservabilityRedactor, A as ObservabilityRequestEnvInput, B as ObservabilityRuntimeEnv, 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-D6JZ15_e.js';
3
3
  import { M as MetricsRegistry } from '../tracer-Hwt1cl7h.js';
4
4
  import { a as HttpRequest, d as HttpMiddleware } from '../client-CZHU674n.js';
5
5
  import '../effect-DIUHZ9IN.js';
@@ -13,7 +13,7 @@ import {
13
13
  withFetchRequestObservability,
14
14
  withHttpObservability,
15
15
  withNodeRequestObservability
16
- } from "../chunk-AVNQLJ5V.js";
16
+ } from "../chunk-VWIPB6I5.js";
17
17
  import {
18
18
  OTLP_JSON_CONTENT_TYPE,
19
19
  PROMETHEUS_CONTENT_TYPE,
@@ -41,6 +41,7 @@ import {
41
41
  makeOtlpHttpLogExporter,
42
42
  makeOtlpHttpMetricsExporter,
43
43
  makeOtlpHttpSpanExporter,
44
+ makeOtlpOptions,
44
45
  makePrometheusMetricsExporter,
45
46
  makeRequestObservabilityContext,
46
47
  makeRuntimeHealth,
@@ -76,7 +77,7 @@ import {
76
77
  withLogContext,
77
78
  withSpan,
78
79
  withTimeout
79
- } from "../chunk-CIZFIMK5.js";
80
+ } from "../chunk-BKK77SBA.js";
80
81
  import "../chunk-RKGKFN2A.js";
81
82
  import "../chunk-3Y2RIUMM.js";
82
83
  import "../chunk-FH2X7BVP.js";
@@ -119,6 +120,7 @@ export {
119
120
  makeOtlpHttpLogExporter,
120
121
  makeOtlpHttpMetricsExporter,
121
122
  makeOtlpHttpSpanExporter,
123
+ makeOtlpOptions,
122
124
  makePrometheusMetricsExporter,
123
125
  makeRequestObservabilityContext,
124
126
  makeRuntimeHealth,
@@ -13,7 +13,7 @@ import {
13
13
  withFetchRequestObservability,
14
14
  withHttpObservability,
15
15
  withNodeRequestObservability
16
- } from "../chunk-DNFO2EIZ.mjs";
16
+ } from "../chunk-SK7UZRNI.mjs";
17
17
  import {
18
18
  OTLP_JSON_CONTENT_TYPE,
19
19
  PROMETHEUS_CONTENT_TYPE,
@@ -41,6 +41,7 @@ import {
41
41
  makeOtlpHttpLogExporter,
42
42
  makeOtlpHttpMetricsExporter,
43
43
  makeOtlpHttpSpanExporter,
44
+ makeOtlpOptions,
44
45
  makePrometheusMetricsExporter,
45
46
  makeRequestObservabilityContext,
46
47
  makeRuntimeHealth,
@@ -76,7 +77,7 @@ import {
76
77
  withLogContext,
77
78
  withSpan,
78
79
  withTimeout
79
- } from "../chunk-MT3OWDPC.mjs";
80
+ } from "../chunk-4P2HHGAX.mjs";
80
81
  import "../chunk-EJ6BPYVR.mjs";
81
82
  import "../chunk-PWC3RBQE.mjs";
82
83
  import "../chunk-GYM3LLGS.mjs";
@@ -119,6 +120,7 @@ export {
119
120
  makeOtlpHttpLogExporter,
120
121
  makeOtlpHttpMetricsExporter,
121
122
  makeOtlpHttpSpanExporter,
123
+ makeOtlpOptions,
122
124
  makePrometheusMetricsExporter,
123
125
  makeRequestObservabilityContext,
124
126
  makeRuntimeHealth,