@glasstrace/sdk 0.12.4 → 0.13.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/dist/chunk-RFSCWIVN.js +242 -0
- package/dist/chunk-RFSCWIVN.js.map +1 -0
- package/dist/cli/init.cjs +489 -306
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +76 -265
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/status.cjs +162 -0
- package/dist/cli/status.cjs.map +1 -0
- package/dist/cli/status.d.cts +34 -0
- package/dist/cli/status.d.ts +34 -0
- package/dist/cli/status.js +127 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/index.cjs +18 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/monorepo-7SBKH7RP.js +15 -0
- package/dist/monorepo-7SBKH7RP.js.map +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17474,6 +17474,21 @@ var GlasstraceExporter = class {
|
|
|
17474
17474
|
if (statusCode !== void 0) {
|
|
17475
17475
|
extra[ATTR.HTTP_STATUS_CODE] = statusCode;
|
|
17476
17476
|
}
|
|
17477
|
+
if (method && span.status?.code === SpanStatusCode.ERROR) {
|
|
17478
|
+
if (statusCode === void 0 || statusCode === 0 || statusCode === 200) {
|
|
17479
|
+
const httpErrorType = attrs["error.type"];
|
|
17480
|
+
if (typeof httpErrorType === "string") {
|
|
17481
|
+
const parsed = parseInt(httpErrorType, 10);
|
|
17482
|
+
if (!isNaN(parsed) && parsed >= 400 && parsed <= 599) {
|
|
17483
|
+
extra[ATTR.HTTP_STATUS_CODE] = parsed;
|
|
17484
|
+
} else {
|
|
17485
|
+
extra[ATTR.HTTP_STATUS_CODE] = 500;
|
|
17486
|
+
}
|
|
17487
|
+
} else {
|
|
17488
|
+
extra[ATTR.HTTP_STATUS_CODE] = 500;
|
|
17489
|
+
}
|
|
17490
|
+
}
|
|
17491
|
+
}
|
|
17477
17492
|
if (span.startTime && span.endTime) {
|
|
17478
17493
|
const [startSec, startNano] = span.startTime;
|
|
17479
17494
|
const [endSec, endNano] = span.endTime;
|
|
@@ -20705,8 +20720,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
20705
20720
|
if (config2.verbose) {
|
|
20706
20721
|
console.info("[glasstrace] Background init firing.");
|
|
20707
20722
|
}
|
|
20708
|
-
const healthReport = collectHealthReport("0.
|
|
20709
|
-
const initResult = await performInit(config2, anonKeyForInit, "0.
|
|
20723
|
+
const healthReport = collectHealthReport("0.13.0");
|
|
20724
|
+
const initResult = await performInit(config2, anonKeyForInit, "0.13.0", healthReport);
|
|
20710
20725
|
if (generation !== registrationGeneration) return;
|
|
20711
20726
|
if (initResult?.claimResult) {
|
|
20712
20727
|
setResolvedApiKey(initResult.claimResult.newApiKey);
|
|
@@ -20714,7 +20729,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
20714
20729
|
}
|
|
20715
20730
|
maybeInstallConsoleCapture();
|
|
20716
20731
|
if (didLastInitSucceed()) {
|
|
20717
|
-
startHeartbeat(config2, anonKeyForInit, "0.
|
|
20732
|
+
startHeartbeat(config2, anonKeyForInit, "0.13.0", generation, (newApiKey) => {
|
|
20718
20733
|
setResolvedApiKey(newApiKey);
|
|
20719
20734
|
notifyApiKeyResolved();
|
|
20720
20735
|
});
|