@glasstrace/sdk 1.3.6 → 1.3.7
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 +23 -18
- package/dist/{chunk-QJVAKVQJ.js → chunk-4WUHMLMM.js} +2 -2
- package/dist/{chunk-BQKPRFLF.js → chunk-DBKG6SRI.js} +2 -2
- package/dist/{chunk-WKOQJCFN.js → chunk-FKBCEOJ5.js} +2 -2
- package/dist/{chunk-IY6A6EXS.js → chunk-LW7474ZA.js} +9 -9
- package/dist/{chunk-IY6A6EXS.js.map → chunk-LW7474ZA.js.map} +1 -1
- package/dist/{chunk-E62DL2H4.js → chunk-TUFUV43S.js} +3 -3
- package/dist/{chunk-LQKJ27LO.js → chunk-V2S7BSV4.js} +2 -2
- package/dist/{chunk-M4ZI7J3N.js → chunk-XS5W3SPL.js} +1 -1
- package/dist/{chunk-M4ZI7J3N.js.map → chunk-XS5W3SPL.js.map} +1 -1
- package/dist/{chunk-3HWBR7XM.js → chunk-YSBGMBI5.js} +3 -3
- package/dist/cli/init.cjs +2 -2
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +7 -7
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +2 -2
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{edge-entry-shCc8_Y1.d.ts → edge-entry-BSKA1l_0.d.ts} +1 -1
- package/dist/{edge-entry-DT9OhPTC.d.cts → edge-entry-DyMWa6JK.d.cts} +1 -1
- 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 +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-DiI6uVEW.d.cts → index.d-Bo_Rxund.d.cts} +4 -1
- package/dist/{index.d-DiI6uVEW.d.ts → index.d-Bo_Rxund.d.ts} +4 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/node-entry.cjs +4 -4
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +2 -2
- package/dist/node-entry.d.ts +2 -2
- package/dist/node-entry.js +7 -7
- 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-JAD3XM4F.js → source-map-uploader-FSTHCYDR.js} +3 -3
- package/package.json +1 -1
- /package/dist/{chunk-QJVAKVQJ.js.map → chunk-4WUHMLMM.js.map} +0 -0
- /package/dist/{chunk-BQKPRFLF.js.map → chunk-DBKG6SRI.js.map} +0 -0
- /package/dist/{chunk-WKOQJCFN.js.map → chunk-FKBCEOJ5.js.map} +0 -0
- /package/dist/{chunk-E62DL2H4.js.map → chunk-TUFUV43S.js.map} +0 -0
- /package/dist/{chunk-LQKJ27LO.js.map → chunk-V2S7BSV4.js.map} +0 -0
- /package/dist/{chunk-3HWBR7XM.js.map → chunk-YSBGMBI5.js.map} +0 -0
- /package/dist/{source-map-uploader-JAD3XM4F.js.map → source-map-uploader-FSTHCYDR.js.map} +0 -0
package/README.md
CHANGED
|
@@ -250,8 +250,8 @@ const provider = new BasicTracerProvider({
|
|
|
250
250
|
branded exporter the auto-attach path uses, so duplicate
|
|
251
251
|
`registerGlasstrace()` calls remain idempotent. `registerGlasstrace()`
|
|
252
252
|
is still required when wiring the processor manually — it handles the
|
|
253
|
-
init handshake, anonymous-key resolution, session management,
|
|
254
|
-
|
|
253
|
+
init handshake, anonymous-key resolution, and session management, none
|
|
254
|
+
of which are owned by the span processor.
|
|
255
255
|
|
|
256
256
|
A future SDK release may extend the auto-attach detection to recognize
|
|
257
257
|
additional Next 16 provider shapes; until that ships, the manual path
|
|
@@ -380,21 +380,22 @@ mapped frames.
|
|
|
380
380
|
|
|
381
381
|
## Browser-extension discovery
|
|
382
382
|
|
|
383
|
-
|
|
384
|
-
`public/.well-known/glasstrace.json` (or
|
|
385
|
-
on SvelteKit)
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
383
|
+
The supported discovery contract is the static file
|
|
384
|
+
`public/.well-known/glasstrace.json` (or
|
|
385
|
+
`static/.well-known/glasstrace.json` on SvelteKit). The Glasstrace
|
|
386
|
+
browser extension reads this file directly. `glasstrace init` writes
|
|
387
|
+
it for you; you do not need to add any HTTP routing for discovery. The
|
|
388
|
+
file contains only a schema version and the project's anonymous key —
|
|
389
|
+
it is public metadata, not a secret, and should be committed to source
|
|
389
390
|
control alongside the rest of your project.
|
|
390
391
|
|
|
391
|
-
The SDK no longer requires `createDiscoveryHandler` to be wired into
|
|
392
|
-
your server. If you previously registered the handler (for example,
|
|
393
|
-
inside `middleware.ts` or `proxy.ts` on Next.js), you can remove the
|
|
394
|
-
handler code and the extension will read the static file instead.
|
|
395
|
-
|
|
396
392
|
### Migration: removing the runtime discovery handler
|
|
397
393
|
|
|
394
|
+
If you previously wired `createDiscoveryHandler` yourself (for example
|
|
395
|
+
on `@glasstrace/sdk@<1.0.0`), the migration below shows how to remove
|
|
396
|
+
it on upgrade. Users starting fresh on `@glasstrace/sdk@>=1.0.0` do
|
|
397
|
+
not need this section.
|
|
398
|
+
|
|
398
399
|
**Next.js 15 and earlier (`middleware.ts`):**
|
|
399
400
|
|
|
400
401
|
```ts
|
|
@@ -451,11 +452,15 @@ export function proxy(_req: Request) {
|
|
|
451
452
|
|
|
452
453
|
If `proxy.ts` no longer does anything else, you can delete it entirely.
|
|
453
454
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
**The supported discovery contract is `public/.well-known/glasstrace.json`.**
|
|
456
|
+
`createDiscoveryHandler` was removed from the public API in `v1.0.0` and
|
|
457
|
+
is no longer exported from `@glasstrace/sdk`. The SDK retains an
|
|
458
|
+
internal runtime handler at `/__glasstrace/config` for backwards
|
|
459
|
+
compatibility with older consumer integrations during local
|
|
460
|
+
development. The internal handler is **not part of the supported
|
|
461
|
+
discovery contract** — it is not documented for use, not covered by
|
|
462
|
+
validation expectations, and may be removed in a future release
|
|
463
|
+
without a deprecation cycle. Rely on the static file.
|
|
459
464
|
|
|
460
465
|
## Subpath exports
|
|
461
466
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createBuildHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XS5W3SPL.js";
|
|
4
4
|
|
|
5
5
|
// src/import-graph.ts
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
extractImports,
|
|
176
176
|
buildImportGraph
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-4WUHMLMM.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
PresignedUploadResponseSchema,
|
|
6
6
|
SourceMapManifestResponseSchema,
|
|
7
7
|
SourceMapUploadResponseSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XS5W3SPL.js";
|
|
9
9
|
|
|
10
10
|
// src/source-map-uploader.ts
|
|
11
11
|
import * as fs from "node:fs/promises";
|
|
@@ -331,4 +331,4 @@ export {
|
|
|
331
331
|
uploadSourceMapsPresigned,
|
|
332
332
|
uploadSourceMapsAuto
|
|
333
333
|
};
|
|
334
|
-
//# sourceMappingURL=chunk-
|
|
334
|
+
//# sourceMappingURL=chunk-DBKG6SRI.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-DQ25VOKK.js";
|
|
4
4
|
import {
|
|
5
5
|
GLASSTRACE_ATTRIBUTE_NAMES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XS5W3SPL.js";
|
|
7
7
|
|
|
8
8
|
// src/errors.ts
|
|
9
9
|
var SdkError = class extends Error {
|
|
@@ -102,4 +102,4 @@ export {
|
|
|
102
102
|
GlasstraceSpanProcessor,
|
|
103
103
|
captureCorrelationId
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=chunk-
|
|
105
|
+
//# sourceMappingURL=chunk-FKBCEOJ5.js.map
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
performInit,
|
|
34
34
|
recordSpansDropped,
|
|
35
35
|
recordSpansExported
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YSBGMBI5.js";
|
|
37
37
|
import {
|
|
38
38
|
isAnonymousMode,
|
|
39
39
|
isProductionDisabled,
|
|
@@ -44,11 +44,11 @@ import {
|
|
|
44
44
|
getOrCreateAnonKey,
|
|
45
45
|
isSyncFsAvailable,
|
|
46
46
|
readAnonKey
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-V2S7BSV4.js";
|
|
48
48
|
import {
|
|
49
49
|
GLASSTRACE_ATTRIBUTE_NAMES,
|
|
50
50
|
deriveSessionId
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-XS5W3SPL.js";
|
|
52
52
|
import {
|
|
53
53
|
__require
|
|
54
54
|
} from "./chunk-NSBPE2FW.js";
|
|
@@ -4297,7 +4297,7 @@ function registerGlasstrace(options) {
|
|
|
4297
4297
|
setCoreState(CoreState.REGISTERING);
|
|
4298
4298
|
startRuntimeStateWriter({
|
|
4299
4299
|
projectRoot: process.cwd(),
|
|
4300
|
-
sdkVersion: "1.3.
|
|
4300
|
+
sdkVersion: "1.3.7"
|
|
4301
4301
|
});
|
|
4302
4302
|
const config = resolveConfig(options);
|
|
4303
4303
|
if (config.verbose) {
|
|
@@ -4464,8 +4464,8 @@ async function backgroundInit(config, anonKeyForInit, generation) {
|
|
|
4464
4464
|
if (config.verbose) {
|
|
4465
4465
|
console.info("[glasstrace] Background init firing.");
|
|
4466
4466
|
}
|
|
4467
|
-
const healthReport = collectHealthReport("1.3.
|
|
4468
|
-
const initResult = await performInit(config, anonKeyForInit, "1.3.
|
|
4467
|
+
const healthReport = collectHealthReport("1.3.7");
|
|
4468
|
+
const initResult = await performInit(config, anonKeyForInit, "1.3.7", healthReport);
|
|
4469
4469
|
if (generation !== registrationGeneration) return;
|
|
4470
4470
|
const currentState = getCoreState();
|
|
4471
4471
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -4488,7 +4488,7 @@ async function backgroundInit(config, anonKeyForInit, generation) {
|
|
|
4488
4488
|
}
|
|
4489
4489
|
maybeInstallConsoleCapture();
|
|
4490
4490
|
if (didLastInitSucceed()) {
|
|
4491
|
-
startHeartbeat(config, anonKeyForInit, "1.3.
|
|
4491
|
+
startHeartbeat(config, anonKeyForInit, "1.3.7", generation, (newApiKey, accountId) => {
|
|
4492
4492
|
setAuthState(AuthState.CLAIMING);
|
|
4493
4493
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
4494
4494
|
setResolvedApiKey(newApiKey);
|
|
@@ -4785,7 +4785,7 @@ async function handleSourceMapUpload(distDir) {
|
|
|
4785
4785
|
);
|
|
4786
4786
|
return;
|
|
4787
4787
|
}
|
|
4788
|
-
const { discoverSourceMapFiles, computeBuildHash, uploadSourceMaps } = await import("./source-map-uploader-
|
|
4788
|
+
const { discoverSourceMapFiles, computeBuildHash, uploadSourceMaps } = await import("./source-map-uploader-FSTHCYDR.js");
|
|
4789
4789
|
const files = await discoverSourceMapFiles(distDir);
|
|
4790
4790
|
if (files.length === 0) {
|
|
4791
4791
|
console.info("[glasstrace] No source map files found. Skipping upload.");
|
|
@@ -4888,4 +4888,4 @@ export {
|
|
|
4888
4888
|
withGlasstraceConfig,
|
|
4889
4889
|
captureError
|
|
4890
4890
|
};
|
|
4891
|
-
//# sourceMappingURL=chunk-
|
|
4891
|
+
//# sourceMappingURL=chunk-LW7474ZA.js.map
|