@autter/runtime-node 1.6.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -5
- package/dist/{chunk-UXTIMS3G.cjs → chunk-37W7YYXO.cjs} +89 -51
- package/dist/{chunk-7OTD2YPT.cjs → chunk-7H3FCV4P.cjs} +11 -11
- package/dist/{chunk-HRDELHZP.js → chunk-B5ZMOCEM.js} +52 -1
- package/dist/{chunk-4MVWIRBI.cjs → chunk-MOZOUEMA.cjs} +52 -1
- package/dist/{chunk-5KISVAVB.js → chunk-QKY2OQSO.js} +39 -1
- package/dist/{chunk-L5ENELB2.js → chunk-UC3QH4PC.js} +1 -1
- package/dist/cli.cjs +8 -8
- package/dist/cli.js +2 -2
- package/dist/index.cjs +258 -175
- package/dist/index.d.cts +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +94 -11
- package/dist/{sinks-CPGDyfU8.d.cts → sinks-CIdlmYwy.d.cts} +21 -1
- package/dist/{sinks-CPGDyfU8.d.ts → sinks-CIdlmYwy.d.ts} +21 -1
- package/dist/testing.cjs +8 -8
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +2 -2
- package/package.json +1 -1
|
@@ -119,6 +119,57 @@ var compat_manifest_default = {
|
|
|
119
119
|
ingester: "1.6.0",
|
|
120
120
|
migrations: [],
|
|
121
121
|
sdks: { "@autter/runtime-browser": "1.6.0", "@autter/runtime-next": "1.6.0", "@autter/runtime-node": "1.6.0" }
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "sourcemap_upload_keys",
|
|
125
|
+
title: "Upload-only keys for source maps (autter_rtu_)",
|
|
126
|
+
ingester: "1.7.0",
|
|
127
|
+
migrations: [],
|
|
128
|
+
route: "/v1/sourcemaps",
|
|
129
|
+
sdks: {}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "source_map_verify",
|
|
133
|
+
title: "Source map check by debug id (autter-runtime sourcemaps verify)",
|
|
134
|
+
ingester: "1.7.0",
|
|
135
|
+
migrations: ["0017-source-maps-debug-id"],
|
|
136
|
+
route: "/v1/sourcemaps/check",
|
|
137
|
+
sdks: {}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: "ingest_drop_counts",
|
|
141
|
+
title: "Rejected and dropped records per repository",
|
|
142
|
+
ingester: "1.8.0",
|
|
143
|
+
migrations: ["0018-runtime-ingest-drops"],
|
|
144
|
+
sdks: {}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: "telemetry_sender_via",
|
|
148
|
+
title: "How each service's telemetry arrives (SDK, OpenTelemetry Collector or browser relay)",
|
|
149
|
+
ingester: "1.8.0",
|
|
150
|
+
migrations: ["0019-sdk-versions-via"],
|
|
151
|
+
sdks: {}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: "frame_resolution_counts",
|
|
155
|
+
title: "Resolved and unresolved browser frames per occurrence",
|
|
156
|
+
ingester: "1.8.0",
|
|
157
|
+
migrations: ["0020-occurrence-frame-resolution"],
|
|
158
|
+
sdks: {}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "ingest_suppression",
|
|
162
|
+
title: "Suppression rules: drop or sample matching errors at ingest",
|
|
163
|
+
ingester: "1.9.0",
|
|
164
|
+
migrations: [],
|
|
165
|
+
sdks: {}
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: "loop_collapse",
|
|
169
|
+
title: "Loop collapse: a looping error stored as one sample a minute with an exact count",
|
|
170
|
+
ingester: "1.9.0",
|
|
171
|
+
migrations: ["0021-occurrence-collapsed-count"],
|
|
172
|
+
sdks: {}
|
|
122
173
|
}
|
|
123
174
|
]
|
|
124
175
|
};
|
|
@@ -464,7 +515,7 @@ var _https = require('https');
|
|
|
464
515
|
// package.json
|
|
465
516
|
var package_default = {
|
|
466
517
|
name: "@autter/runtime-node",
|
|
467
|
-
version: "1.
|
|
518
|
+
version: "1.8.0",
|
|
468
519
|
description: "Autter Runtime for Node.js: request wide events, coded errors, operation logging, same-origin browser relay and a curated OpenTelemetry server tracker",
|
|
469
520
|
license: "MIT",
|
|
470
521
|
type: "module",
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
noteCompatFeature,
|
|
3
3
|
observeIngesterResponse,
|
|
4
4
|
sharedSlot
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B5ZMOCEM.js";
|
|
6
6
|
|
|
7
7
|
// ../runtime-core/dist/index.js
|
|
8
8
|
var SENSITIVE_KEY_PATTERNS = [
|
|
@@ -974,6 +974,43 @@ function splitFingerprint(attributes) {
|
|
|
974
974
|
const { fingerprint, ...rest } = attributes;
|
|
975
975
|
return { attributes: rest, fingerprint };
|
|
976
976
|
}
|
|
977
|
+
function testPattern(pattern, type, message) {
|
|
978
|
+
if (typeof pattern === "string") {
|
|
979
|
+
return pattern !== "" && (message.includes(pattern) || type.includes(pattern));
|
|
980
|
+
}
|
|
981
|
+
if (!(pattern instanceof RegExp)) return false;
|
|
982
|
+
const re = pattern.global || pattern.sticky ? new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, "")) : pattern;
|
|
983
|
+
return re.test(message) || type !== "" && (re.test(type) || re.test(`${type}: ${message}`));
|
|
984
|
+
}
|
|
985
|
+
function isIgnoredError(patterns, type, message) {
|
|
986
|
+
if (!patterns?.length) return false;
|
|
987
|
+
for (const pattern of patterns) {
|
|
988
|
+
try {
|
|
989
|
+
if (testPattern(pattern, type, message)) return true;
|
|
990
|
+
} catch {
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
return false;
|
|
994
|
+
}
|
|
995
|
+
function effectiveSampleRate(rate) {
|
|
996
|
+
return typeof rate === "number" && Number.isFinite(rate) && rate >= 0 && rate < 1 ? rate : null;
|
|
997
|
+
}
|
|
998
|
+
function createErrorFilter(options = {}, random = Math.random) {
|
|
999
|
+
const patterns = Array.isArray(options.ignoreErrors) ? options.ignoreErrors.slice() : [];
|
|
1000
|
+
const rate = effectiveSampleRate(options.sampleRate);
|
|
1001
|
+
if (!patterns.length && rate === null) return () => true;
|
|
1002
|
+
return (input) => {
|
|
1003
|
+
try {
|
|
1004
|
+
if (isIgnoredError(patterns, input.type ?? "", input.message ?? "")) return false;
|
|
1005
|
+
if (rate === null || input.crash) return true;
|
|
1006
|
+
const severity = input.severity ?? "error";
|
|
1007
|
+
if (severity !== "error") return true;
|
|
1008
|
+
return random() < rate;
|
|
1009
|
+
} catch {
|
|
1010
|
+
return true;
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
977
1014
|
|
|
978
1015
|
// src/breadcrumbs.ts
|
|
979
1016
|
import { trace as trace2 } from "@opentelemetry/api";
|
|
@@ -1924,6 +1961,7 @@ export {
|
|
|
1924
1961
|
fingerprintValues,
|
|
1925
1962
|
fingerprintEventAttributes,
|
|
1926
1963
|
splitFingerprint,
|
|
1964
|
+
createErrorFilter,
|
|
1927
1965
|
addBreadcrumb,
|
|
1928
1966
|
breadcrumbEventAttributes,
|
|
1929
1967
|
otlpSink,
|
package/dist/cli.cjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
7
|
+
var _chunk7H3FCV4Pcjs = require('./chunk-7H3FCV4P.cjs');
|
|
8
|
+
require('./chunk-MOZOUEMA.cjs');
|
|
9
9
|
|
|
10
10
|
// src/cli.ts
|
|
11
11
|
var _child_process = require('child_process');
|
|
@@ -31,22 +31,22 @@ async function main(argv) {
|
|
|
31
31
|
return 64;
|
|
32
32
|
}
|
|
33
33
|
if (command !== "doctor") {
|
|
34
|
-
console.log(
|
|
34
|
+
console.log(_chunk7H3FCV4Pcjs.DOCTOR_USAGE);
|
|
35
35
|
return command === void 0 || command === "--help" || command === "-h" ? 0 : 64;
|
|
36
36
|
}
|
|
37
|
-
const parsed =
|
|
37
|
+
const parsed = _chunk7H3FCV4Pcjs.parseDoctorArgs.call(void 0, rest);
|
|
38
38
|
if ("help" in parsed) {
|
|
39
|
-
console.log(
|
|
39
|
+
console.log(_chunk7H3FCV4Pcjs.DOCTOR_USAGE);
|
|
40
40
|
return 0;
|
|
41
41
|
}
|
|
42
42
|
if ("error" in parsed) {
|
|
43
43
|
console.error(`${parsed.error}
|
|
44
44
|
|
|
45
|
-
${
|
|
45
|
+
${_chunk7H3FCV4Pcjs.DOCTOR_USAGE}`);
|
|
46
46
|
return 64;
|
|
47
47
|
}
|
|
48
|
-
const report = await
|
|
49
|
-
console.log(parsed.json ? JSON.stringify(report, null, 2) :
|
|
48
|
+
const report = await _chunk7H3FCV4Pcjs.runDoctor.call(void 0, parsed);
|
|
49
|
+
console.log(parsed.json ? JSON.stringify(report, null, 2) : _chunk7H3FCV4Pcjs.formatDoctorReport.call(void 0, report));
|
|
50
50
|
return report.exitCode;
|
|
51
51
|
}
|
|
52
52
|
main(process.argv.slice(2)).then(
|
package/dist/cli.js
CHANGED