brass-runtime 1.19.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/dist/{chunk-EZ76UNHP.cjs → chunk-62IBGQOU.cjs} +6 -6
- package/dist/{chunk-U42YF6B2.js → chunk-6LF3M4JC.js} +2 -2
- package/dist/{chunk-ID2WOCBA.mjs → chunk-6NXQL3IC.mjs} +642 -46
- package/dist/{chunk-67256TKF.cjs → chunk-BDTBIYAM.cjs} +13 -13
- package/dist/{chunk-22HYIE56.mjs → chunk-D53GY2SZ.mjs} +2 -2
- package/dist/{chunk-LXNU3MRV.cjs → chunk-LA2PAO7J.cjs} +738 -142
- package/dist/{chunk-AITYRQX2.mjs → chunk-OS4F5HZE.mjs} +1 -1
- package/dist/{chunk-IHXF6NQG.js → chunk-POH2WZBI.js} +642 -46
- package/dist/{chunk-XJSWDU2S.js → chunk-VXZIP3IU.js} +1 -1
- package/dist/{defaultClient-hyVSNzSJ.d.ts → defaultClient-DLOa3gdw.d.ts} +101 -3
- package/dist/http/index.cjs +69 -33
- package/dist/http/index.d.ts +67 -4
- package/dist/http/index.js +37 -1
- package/dist/http/index.mjs +37 -1
- package/dist/http/testing.cjs +4 -4
- package/dist/http/testing.d.ts +1 -1
- package/dist/http/testing.js +1 -1
- package/dist/http/testing.mjs +1 -1
- package/dist/observability/index.cjs +3 -3
- package/dist/observability/index.d.ts +3 -3
- package/dist/observability/index.js +2 -2
- package/dist/observability/index.mjs +2 -2
- package/dist/perf/cli.cjs +18 -18
- package/dist/perf/cli.js +3 -3
- package/dist/perf/cli.mjs +3 -3
- package/dist/perf/index.cjs +5 -5
- package/dist/perf/index.js +3 -3
- package/dist/perf/index.mjs +3 -3
- package/dist/{server-BKKuzAW9.d.ts → server-BGXOabjo.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ var _chunkZJC3JZIEcjs = require('./chunk-ZJC3JZIE.cjs');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkLA2PAO7Jcjs = require('./chunk-LA2PAO7J.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
var _chunkL6VB5N7Qcjs = require('./chunk-L6VB5N7Q.cjs');
|
|
@@ -217,13 +217,13 @@ function withHttpObservability(options) {
|
|
|
217
217
|
cb({ _tag: "Success", value: res });
|
|
218
218
|
};
|
|
219
219
|
const onError = (error) => {
|
|
220
|
-
const status =
|
|
220
|
+
const status = _chunkLA2PAO7Jcjs.httpErrorStatus.call(void 0, error);
|
|
221
221
|
const finish = completeFinish(
|
|
222
222
|
httpErrorOutcome(error),
|
|
223
223
|
status !== void 0 ? String(status) : void 0,
|
|
224
224
|
{
|
|
225
225
|
"error.type": error._tag,
|
|
226
|
-
"http.retryable":
|
|
226
|
+
"http.retryable": _chunkLA2PAO7Jcjs.isRetryableHttpError.call(void 0, error)
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
const adaptiveAttrs = observeAdaptiveLimiter(wireReq, next, resolved);
|
|
@@ -244,7 +244,7 @@ function withHttpObservability(options) {
|
|
|
244
244
|
durationMs: finish.durationMs,
|
|
245
245
|
...status !== void 0 ? { status } : {},
|
|
246
246
|
...statusText ? { statusText } : {},
|
|
247
|
-
retryable:
|
|
247
|
+
retryable: _chunkLA2PAO7Jcjs.isRetryableHttpError.call(void 0, error),
|
|
248
248
|
errorTag: error._tag,
|
|
249
249
|
message: httpErrorMessage(error)
|
|
250
250
|
});
|
|
@@ -312,7 +312,7 @@ function withLeanHttpSampledSpanObservability(next, options, metricCache) {
|
|
|
312
312
|
finishLeanHttpSpan(span, "success");
|
|
313
313
|
} else {
|
|
314
314
|
const error = httpErrorFromCause(exit.cause);
|
|
315
|
-
const status =
|
|
315
|
+
const status = _chunkLA2PAO7Jcjs.httpErrorStatus.call(void 0, error);
|
|
316
316
|
recordHttpMetricsFinish(
|
|
317
317
|
handles,
|
|
318
318
|
httpErrorOutcome(error),
|
|
@@ -375,7 +375,7 @@ function withLeanHttpMetricsObservability(next, options, metricCache) {
|
|
|
375
375
|
);
|
|
376
376
|
} else {
|
|
377
377
|
const error = httpErrorFromCause(exit.cause);
|
|
378
|
-
const status =
|
|
378
|
+
const status = _chunkLA2PAO7Jcjs.httpErrorStatus.call(void 0, error);
|
|
379
379
|
recordHttpMetricsFinish(
|
|
380
380
|
handles,
|
|
381
381
|
httpErrorOutcome(error),
|
|
@@ -594,7 +594,7 @@ function getCachedBaseLabels(req, options, cache) {
|
|
|
594
594
|
if (cache.disabled) return requestBaseLabels(req, options);
|
|
595
595
|
const route = requestRoute(req, options);
|
|
596
596
|
const host = options.includeHostLabel ? requestHost(req) : void 0;
|
|
597
|
-
const policy =
|
|
597
|
+
const policy = _chunkLA2PAO7Jcjs.getHttpRequestPolicy.call(void 0, req);
|
|
598
598
|
const preset = typeof policy === "string" ? policy : _optionalChain([policy, 'optionalAccess', _46 => _46.preset]);
|
|
599
599
|
const key = `${req.method}|${_nullishCoalesce(host, () => ( ""))}|${_nullishCoalesce(route, () => ( ""))}|${_nullishCoalesce(preset, () => ( ""))}`;
|
|
600
600
|
const existing = cache.baseLabelsCache.get(key);
|
|
@@ -727,7 +727,7 @@ function adaptiveLimiterLabels(req, stats, options) {
|
|
|
727
727
|
});
|
|
728
728
|
}
|
|
729
729
|
function inferAdaptiveLimiterKey(req, stats) {
|
|
730
|
-
const policy =
|
|
730
|
+
const policy = _chunkLA2PAO7Jcjs.getHttpRequestPolicy.call(void 0, req);
|
|
731
731
|
if (policy.poolKey) return policy.poolKey;
|
|
732
732
|
const host = requestHost(req);
|
|
733
733
|
if (host) return host;
|
|
@@ -809,7 +809,7 @@ function requestLogFields(req, options) {
|
|
|
809
809
|
}
|
|
810
810
|
function requestPolicyLogFields(req, options) {
|
|
811
811
|
if (!options.policy.enabled) return void 0;
|
|
812
|
-
const policy =
|
|
812
|
+
const policy = _chunkLA2PAO7Jcjs.getHttpRequestPolicy.call(void 0, req);
|
|
813
813
|
const fields = {
|
|
814
814
|
...policy.preset ? { preset: policy.preset } : {},
|
|
815
815
|
...policy.lane ? { lane: policy.lane } : {},
|
|
@@ -822,7 +822,7 @@ function requestPolicyLogFields(req, options) {
|
|
|
822
822
|
}
|
|
823
823
|
function requestPolicySpanAttributes(req, options) {
|
|
824
824
|
if (!options.policy.enabled) return {};
|
|
825
|
-
const policy =
|
|
825
|
+
const policy = _chunkLA2PAO7Jcjs.getHttpRequestPolicy.call(void 0, req);
|
|
826
826
|
return {
|
|
827
827
|
...compactSpanAttributes({
|
|
828
828
|
"http.request.policy.lane": policy.lane,
|
|
@@ -836,7 +836,7 @@ function requestPolicySpanAttributes(req, options) {
|
|
|
836
836
|
}
|
|
837
837
|
function requestPolicyMetricLabels(req, options) {
|
|
838
838
|
if (!options.policy.enabled || options.policy.labelKeys.length === 0) return {};
|
|
839
|
-
const policy =
|
|
839
|
+
const policy = _chunkLA2PAO7Jcjs.getHttpRequestPolicy.call(void 0, req);
|
|
840
840
|
const values = {
|
|
841
841
|
preset: policy.preset,
|
|
842
842
|
lane: policy.lane,
|
|
@@ -1217,7 +1217,7 @@ function makeObservedRuntimeLayer(options = {}) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
function makeObservedHttpClientLayer(config = {}, options = {}) {
|
|
1219
1219
|
const observabilityTag = _nullishCoalesce(options.observabilityTag, () => ( ObservabilityService));
|
|
1220
|
-
const httpTag = _nullishCoalesce(options.httpTag, () => (
|
|
1220
|
+
const httpTag = _nullishCoalesce(options.httpTag, () => ( _chunkLA2PAO7Jcjs.HttpClientService));
|
|
1221
1221
|
return _chunkZZ2CMYJLcjs.layerEffect.call(void 0,
|
|
1222
1222
|
httpTag,
|
|
1223
1223
|
(context) => _chunkMVGUEJ5Zcjs.asyncSync.call(void 0, () => {
|
|
@@ -1228,7 +1228,7 @@ function makeObservedHttpClientLayer(config = {}, options = {}) {
|
|
|
1228
1228
|
context,
|
|
1229
1229
|
observability
|
|
1230
1230
|
);
|
|
1231
|
-
return
|
|
1231
|
+
return _chunkLA2PAO7Jcjs.makeDefaultHttpClient.call(void 0, {
|
|
1232
1232
|
...httpConfig,
|
|
1233
1233
|
middleware: [
|
|
1234
1234
|
..._nullishCoalesce(httpConfig.middleware, () => ( [])),
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-S6KSHYAT.mjs";
|
|
5
5
|
import {
|
|
6
6
|
withHttpObservability
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OS4F5HZE.mjs";
|
|
8
8
|
import {
|
|
9
9
|
makeObservability
|
|
10
10
|
} from "./chunk-SCHM2MDA.mjs";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
makeDefaultHttpClient,
|
|
16
16
|
makeHttp
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6NXQL3IC.mjs";
|
|
18
18
|
import {
|
|
19
19
|
Runtime,
|
|
20
20
|
Scheduler
|