@glasstrace/sdk 1.10.2 → 1.12.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 +63 -8
- package/dist/async-context/index.cjs +1189 -440
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-CRQSqKgd.d.cts} +2 -2
- package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CqCbjoMq.d.ts} +2 -2
- package/dist/{chunk-OXM2BZMF.js → chunk-4YRYR32D.js} +2 -2
- package/dist/{chunk-XG6WR2KS.js → chunk-6NKMAKMI.js} +3 -3
- package/dist/{chunk-6RKS3DNA.js → chunk-BN5DVIUO.js} +1176 -424
- package/dist/chunk-BN5DVIUO.js.map +1 -0
- package/dist/{chunk-QS5RZ2TC.js → chunk-CZQN6G4I.js} +28 -22
- package/dist/chunk-CZQN6G4I.js.map +1 -0
- package/dist/{chunk-D54FMQHF.js → chunk-FFNGE5RR.js} +2 -2
- package/dist/{chunk-RL43PU2X.js → chunk-J3ZCVE67.js} +2 -2
- package/dist/{chunk-BSVWJSVX.js → chunk-KBHGPQZ2.js} +2 -2
- package/dist/{chunk-CIKPFJOM.js → chunk-KOYZJN6G.js} +310 -20
- package/dist/chunk-KOYZJN6G.js.map +1 -0
- package/dist/{chunk-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
- package/dist/{chunk-UMGZJYC4.js → chunk-V75ZB4G4.js} +10 -5
- package/dist/chunk-V75ZB4G4.js.map +1 -0
- package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
- package/dist/chunk-YIEXKQYP.js.map +1 -0
- package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
- package/dist/cli/init.cjs +1672 -576
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +33 -20
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +1509 -521
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +34 -16
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +6 -1
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.js +7 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +6 -1
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +4 -4
- package/dist/cli/upgrade-instructions.cjs +383 -112
- package/dist/cli/upgrade-instructions.cjs.map +1 -1
- package/dist/cli/upgrade-instructions.js +72 -20
- package/dist/cli/upgrade-instructions.js.map +1 -1
- package/dist/cli/validate.cjs +1168 -422
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
- package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
- package/dist/edge-entry.cjs +1197 -448
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/index.cjs +1341 -553
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.cts} +1 -1
- package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.ts} +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.cjs +1192 -443
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +1329 -551
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +3 -3
- package/dist/node-entry.d.ts +3 -3
- package/dist/node-entry.js +8 -8
- package/dist/node-subpath.cjs +1168 -422
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +1 -1
- package/dist/node-subpath.d.ts +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
- package/dist/trpc/index.cjs +1187 -438
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6RKS3DNA.js.map +0 -1
- package/dist/chunk-CIKPFJOM.js.map +0 -1
- package/dist/chunk-QS5RZ2TC.js.map +0 -1
- package/dist/chunk-UMGZJYC4.js.map +0 -1
- package/dist/chunk-ZBQQXVHD.js.map +0 -1
- /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
- /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
- /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
- /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
- /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
- /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
- /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
- /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
performInit,
|
|
55
55
|
recordSpansDropped,
|
|
56
56
|
recordSpansExported
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-6NKMAKMI.js";
|
|
58
58
|
import {
|
|
59
59
|
isAnonymousMode,
|
|
60
60
|
isProductionDisabled,
|
|
@@ -65,15 +65,15 @@ import {
|
|
|
65
65
|
getOrCreateAnonKey,
|
|
66
66
|
isSyncFsAvailable,
|
|
67
67
|
readAnonKey
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-J3ZCVE67.js";
|
|
69
69
|
import {
|
|
70
70
|
GLASSTRACE_ATTRIBUTE_NAMES,
|
|
71
71
|
deriveSessionId
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-BN5DVIUO.js";
|
|
73
73
|
import {
|
|
74
74
|
isEndMarkerLine,
|
|
75
75
|
parseStartMarkerLine
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-YIEXKQYP.js";
|
|
77
77
|
import {
|
|
78
78
|
__require
|
|
79
79
|
} from "./chunk-NSBPE2FW.js";
|
|
@@ -1393,7 +1393,7 @@ function getStringFromEnv(key) {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
|
|
1395
1395
|
// ../../node_modules/@opentelemetry/core/build/esm/version.js
|
|
1396
|
-
var VERSION = "2.7.
|
|
1396
|
+
var VERSION = "2.7.1";
|
|
1397
1397
|
|
|
1398
1398
|
// ../../node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js
|
|
1399
1399
|
var ATTR_EXCEPTION_MESSAGE = "exception.message";
|
|
@@ -2273,9 +2273,13 @@ var TraceIdRatioBasedSampler = class {
|
|
|
2273
2273
|
}
|
|
2274
2274
|
_accumulate(traceId) {
|
|
2275
2275
|
let accumulation = 0;
|
|
2276
|
-
for (let i = 0; i <
|
|
2277
|
-
|
|
2278
|
-
|
|
2276
|
+
for (let i = 0; i < 32; i += 8) {
|
|
2277
|
+
let part = 0;
|
|
2278
|
+
for (let j = 0; j < 8; j++) {
|
|
2279
|
+
const c = traceId.charCodeAt(i + j);
|
|
2280
|
+
const v = c < 58 ? c - 48 : c < 71 ? c - 55 : c - 87;
|
|
2281
|
+
part = part << 4 | v;
|
|
2282
|
+
}
|
|
2279
2283
|
accumulation = (accumulation ^ part) >>> 0;
|
|
2280
2284
|
}
|
|
2281
2285
|
return accumulation;
|
|
@@ -2635,7 +2639,7 @@ function samplingDecisionToString(decision) {
|
|
|
2635
2639
|
}
|
|
2636
2640
|
|
|
2637
2641
|
// ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js
|
|
2638
|
-
var VERSION2 = "2.7.
|
|
2642
|
+
var VERSION2 = "2.7.1";
|
|
2639
2643
|
|
|
2640
2644
|
// ../../node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js
|
|
2641
2645
|
var Tracer = class {
|
|
@@ -3396,7 +3400,7 @@ function parseRetryAfterToMills(retryAfter) {
|
|
|
3396
3400
|
}
|
|
3397
3401
|
|
|
3398
3402
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js
|
|
3399
|
-
var VERSION3 = "0.
|
|
3403
|
+
var VERSION3 = "0.218.0";
|
|
3400
3404
|
|
|
3401
3405
|
// ../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-transport-utils.js
|
|
3402
3406
|
var DEFAULT_USER_AGENT = `OTel-OTLP-Exporter-JavaScript/${VERSION3}`;
|
|
@@ -3410,14 +3414,11 @@ function sendWithHttp(request, url, headers, compression, userAgent, agent, data
|
|
|
3410
3414
|
headers["User-Agent"] = DEFAULT_USER_AGENT;
|
|
3411
3415
|
}
|
|
3412
3416
|
const options = {
|
|
3413
|
-
hostname: parsedUrl.hostname,
|
|
3414
|
-
port: parsedUrl.port,
|
|
3415
|
-
path: parsedUrl.pathname,
|
|
3416
3417
|
method: "POST",
|
|
3417
3418
|
headers,
|
|
3418
3419
|
agent
|
|
3419
3420
|
};
|
|
3420
|
-
const req = request(options, (res) => {
|
|
3421
|
+
const req = request(parsedUrl, options, (res) => {
|
|
3421
3422
|
const responseData = [];
|
|
3422
3423
|
let responseSize = 0;
|
|
3423
3424
|
res.on("data", (chunk) => {
|
|
@@ -4451,9 +4452,14 @@ import * as fs2 from "node:fs";
|
|
|
4451
4452
|
import * as path2 from "node:path";
|
|
4452
4453
|
var warningEmitted = false;
|
|
4453
4454
|
var AGENT_INSTRUCTION_FILES = [
|
|
4455
|
+
"AGENTS.md",
|
|
4454
4456
|
"CLAUDE.md",
|
|
4457
|
+
"GEMINI.md",
|
|
4458
|
+
".cursor/rules/glasstrace.mdc",
|
|
4459
|
+
".windsurf/rules/glasstrace.md",
|
|
4460
|
+
".cursorrules",
|
|
4455
4461
|
"codex.md",
|
|
4456
|
-
".
|
|
4462
|
+
".windsurfrules"
|
|
4457
4463
|
];
|
|
4458
4464
|
function parseSemver(input) {
|
|
4459
4465
|
const plusIdx = input.indexOf("+");
|
|
@@ -4614,11 +4620,11 @@ function registerGlasstrace(options) {
|
|
|
4614
4620
|
setCoreState(CoreState.REGISTERING);
|
|
4615
4621
|
maybeWarnStaleAgentInstructions({
|
|
4616
4622
|
projectRoot: process.cwd(),
|
|
4617
|
-
sdkVersion: "1.
|
|
4623
|
+
sdkVersion: "1.12.0"
|
|
4618
4624
|
});
|
|
4619
4625
|
startRuntimeStateWriter({
|
|
4620
4626
|
projectRoot: process.cwd(),
|
|
4621
|
-
sdkVersion: "1.
|
|
4627
|
+
sdkVersion: "1.12.0"
|
|
4622
4628
|
});
|
|
4623
4629
|
const config = resolveConfig(options);
|
|
4624
4630
|
if (config.verbose) {
|
|
@@ -4785,8 +4791,8 @@ async function backgroundInit(config, anonKeyForInit, generation) {
|
|
|
4785
4791
|
if (config.verbose) {
|
|
4786
4792
|
console.info("[glasstrace] Background init firing.");
|
|
4787
4793
|
}
|
|
4788
|
-
const healthReport = collectHealthReport("1.
|
|
4789
|
-
const initResult = await performInit(config, anonKeyForInit, "1.
|
|
4794
|
+
const healthReport = collectHealthReport("1.12.0");
|
|
4795
|
+
const initResult = await performInit(config, anonKeyForInit, "1.12.0", healthReport);
|
|
4790
4796
|
if (generation !== registrationGeneration) return;
|
|
4791
4797
|
const currentState = getCoreState();
|
|
4792
4798
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -4809,7 +4815,7 @@ async function backgroundInit(config, anonKeyForInit, generation) {
|
|
|
4809
4815
|
}
|
|
4810
4816
|
maybeInstallConsoleCapture();
|
|
4811
4817
|
if (didLastInitSucceed()) {
|
|
4812
|
-
startHeartbeat(config, anonKeyForInit, "1.
|
|
4818
|
+
startHeartbeat(config, anonKeyForInit, "1.12.0", generation, (newApiKey, accountId) => {
|
|
4813
4819
|
setAuthState(AuthState.CLAIMING);
|
|
4814
4820
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
4815
4821
|
setResolvedApiKey(newApiKey);
|
|
@@ -5106,7 +5112,7 @@ async function handleSourceMapUpload(distDir) {
|
|
|
5106
5112
|
);
|
|
5107
5113
|
return;
|
|
5108
5114
|
}
|
|
5109
|
-
const { discoverSourceMapFiles, computeBuildHash, uploadSourceMaps } = await import("./source-map-uploader-
|
|
5115
|
+
const { discoverSourceMapFiles, computeBuildHash, uploadSourceMaps } = await import("./source-map-uploader-K67LTPBG.js");
|
|
5110
5116
|
const files = await discoverSourceMapFiles(distDir);
|
|
5111
5117
|
if (files.length === 0) {
|
|
5112
5118
|
console.info("[glasstrace] No source map files found. Skipping upload.");
|
|
@@ -5206,4 +5212,4 @@ export {
|
|
|
5206
5212
|
withGlasstraceConfig,
|
|
5207
5213
|
captureError
|
|
5208
5214
|
};
|
|
5209
|
-
//# sourceMappingURL=chunk-
|
|
5215
|
+
//# sourceMappingURL=chunk-CZQN6G4I.js.map
|