@glasstrace/sdk 0.15.1 → 0.16.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 +84 -1
- package/dist/adapters/drizzle.js +2 -5
- package/dist/adapters/drizzle.js.map +1 -1
- package/dist/{chunk-PD2SKFQQ.js → chunk-55FBXXER.js} +4 -8
- package/dist/{chunk-PD2SKFQQ.js.map → chunk-55FBXXER.js.map} +1 -1
- package/dist/chunk-5C2TJFLB.js +851 -0
- package/dist/chunk-5C2TJFLB.js.map +1 -0
- package/dist/{chunk-YMEXDDTA.js → chunk-7JBKXSBU.js} +3 -99
- package/dist/chunk-7JBKXSBU.js.map +1 -0
- package/dist/{chunk-2LDBR3F3.js → chunk-BANTDXUT.js} +15 -74
- package/dist/chunk-BANTDXUT.js.map +1 -0
- package/dist/{chunk-ZNOD6FC7.js → chunk-CTJI2YKA.js} +8 -15
- package/dist/{chunk-ZNOD6FC7.js.map → chunk-CTJI2YKA.js.map} +1 -1
- package/dist/{chunk-WK7MPK2T.js → chunk-DQ25VOKK.js} +1 -89
- package/dist/chunk-DQ25VOKK.js.map +1 -0
- package/dist/{chunk-BL3YDC6V.js → chunk-DXRZKKSO.js} +1 -6
- package/dist/{chunk-BL3YDC6V.js.map → chunk-DXRZKKSO.js.map} +1 -1
- package/dist/{chunk-BGZ7J74D.js → chunk-NSBPE2FW.js} +2 -16
- package/dist/{chunk-A2AZL6MZ.js → chunk-O63DJKIJ.js} +169 -18
- package/dist/chunk-O63DJKIJ.js.map +1 -0
- package/dist/{chunk-ECEN724Y.js → chunk-TM5NKZTO.js} +4 -8
- package/dist/{chunk-ECEN724Y.js.map → chunk-TM5NKZTO.js.map} +1 -1
- package/dist/chunk-VUZCLMIX.js +57 -0
- package/dist/chunk-VUZCLMIX.js.map +1 -0
- package/dist/{chunk-OSXIUKD5.js → chunk-WZXVS2EO.js} +1 -6
- package/dist/{chunk-OSXIUKD5.js.map → chunk-WZXVS2EO.js.map} +1 -1
- package/dist/{chunk-ROFOJQWN.js → chunk-XNDHQN4S.js} +7 -11
- package/dist/{chunk-ROFOJQWN.js.map → chunk-XNDHQN4S.js.map} +1 -1
- package/dist/cli/init.cjs +673 -161
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.d.cts +54 -1
- package/dist/cli/init.d.ts +54 -1
- package/dist/cli/init.js +146 -37
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +16 -16
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +10 -13
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +2 -2
- package/dist/cli/status.js +4 -7
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +56 -59
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +4 -4
- package/dist/cli/validate.cjs +2 -2
- package/dist/cli/validate.js +3 -6
- package/dist/cli/validate.js.map +1 -1
- package/dist/{esm-MDK7CZID.js → esm-KBPHCVB4.js} +3 -3
- package/dist/{getMachineId-bsd-4NIRBWME.js → getMachineId-bsd-345PYXFX.js} +4 -7
- package/dist/{getMachineId-bsd-4NIRBWME.js.map → getMachineId-bsd-345PYXFX.js.map} +1 -1
- package/dist/{getMachineId-darwin-2XNOCCJQ.js → getMachineId-darwin-5L2D25AD.js} +4 -7
- package/dist/{getMachineId-darwin-2XNOCCJQ.js.map → getMachineId-darwin-5L2D25AD.js.map} +1 -1
- package/dist/{getMachineId-linux-V6YSQEY7.js → getMachineId-linux-KJR4P5HN.js} +3 -6
- package/dist/{getMachineId-linux-V6YSQEY7.js.map → getMachineId-linux-KJR4P5HN.js.map} +1 -1
- package/dist/{getMachineId-unsupported-4FKBJNVO.js → getMachineId-unsupported-NDNXDYDY.js} +3 -6
- package/dist/{getMachineId-unsupported-4FKBJNVO.js.map → getMachineId-unsupported-NDNXDYDY.js.map} +1 -1
- package/dist/{getMachineId-win-WLRZBKVG.js → getMachineId-win-T7PJNJXG.js} +4 -7
- package/dist/{getMachineId-win-WLRZBKVG.js.map → getMachineId-win-T7PJNJXG.js.map} +1 -1
- package/dist/index.cjs +449 -461
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -3
- package/dist/index.d.ts +38 -3
- package/dist/index.js +195 -701
- package/dist/index.js.map +1 -1
- package/dist/{monorepo-YILKGQXQ.js → monorepo-N5Z63XP7.js} +4 -4
- package/dist/{source-map-uploader-3GWUQDTS.js → source-map-uploader-MUZPI2S5.js} +5 -4
- package/dist/source-map-uploader-MUZPI2S5.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-2LDBR3F3.js.map +0 -1
- package/dist/chunk-A2AZL6MZ.js.map +0 -1
- package/dist/chunk-BGZ7J74D.js.map +0 -1
- package/dist/chunk-UPS5BGER.js +0 -182
- package/dist/chunk-UPS5BGER.js.map +0 -1
- package/dist/chunk-WK7MPK2T.js.map +0 -1
- package/dist/chunk-YMEXDDTA.js.map +0 -1
- /package/dist/{esm-MDK7CZID.js.map → chunk-NSBPE2FW.js.map} +0 -0
- /package/dist/{monorepo-YILKGQXQ.js.map → esm-KBPHCVB4.js.map} +0 -0
- /package/dist/{source-map-uploader-3GWUQDTS.js.map → monorepo-N5Z63XP7.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -292,6 +292,13 @@ declare function saveCachedConfig(response: SdkInitResponse, projectRoot?: strin
|
|
|
292
292
|
/**
|
|
293
293
|
* Sends a POST request to `/v1/sdk/init`.
|
|
294
294
|
* Validates the response against `SdkInitResponseSchema`.
|
|
295
|
+
*
|
|
296
|
+
* Uses `node:https` via {@link httpsPostJson} rather than the global
|
|
297
|
+
* `fetch` because Next.js 16 patches `fetch` for caching/revalidation
|
|
298
|
+
* and can cause the init request to silently hang (DISC-493 Issue 3).
|
|
299
|
+
* Retries transport-level failures (DNS, TCP, TLS) twice with 500ms +
|
|
300
|
+
* 1500ms backoff, capped at a 20-second total deadline. Server responses
|
|
301
|
+
* (HTTP 4xx/5xx) are never retried and are surfaced immediately.
|
|
295
302
|
*/
|
|
296
303
|
declare function sendInitRequest(config: ResolvedConfig, anonKey: AnonApiKey | null, sdkVersion: string, importGraph?: ImportGraphPayload, healthReport?: SdkHealthReport, diagnostics?: Array<{
|
|
297
304
|
code: SdkDiagnosticCode;
|
|
@@ -520,6 +527,31 @@ type NextConfig = object;
|
|
|
520
527
|
* The build NEVER fails because of Glasstrace — all errors are caught
|
|
521
528
|
* and logged as warnings.
|
|
522
529
|
*
|
|
530
|
+
* ## What the wrapper configures for you
|
|
531
|
+
*
|
|
532
|
+
* - `experimental.serverSourceMaps: true` — enables server-side source maps
|
|
533
|
+
* so Glasstrace can resolve stack traces back to your source.
|
|
534
|
+
* - `serverExternalPackages: ["@glasstrace/sdk"]` — tells Next to load the
|
|
535
|
+
* SDK via Node's `require()` at runtime instead of bundling it through
|
|
536
|
+
* webpack or Turbopack on the RSC / Route Handler paths. This is the same
|
|
537
|
+
* pattern Prisma, `@vercel/otel`, Sentry, `sharp`, and `bcrypt` ship with.
|
|
538
|
+
* - A webpack `externals` entry that marks every Node.js built-in import
|
|
539
|
+
* (both `node:*` and bare forms like `zlib` or `stream`) as a runtime
|
|
540
|
+
* `commonjs` require. `serverExternalPackages` does not apply to the
|
|
541
|
+
* instrumentation path under `next dev --webpack`
|
|
542
|
+
* (vercel/next.js#58003, #28774), so any bundled SDK chunk that imports
|
|
543
|
+
* `node:child_process` or the bare `zlib` specifier used by
|
|
544
|
+
* `@opentelemetry/otlp-exporter-base` would otherwise crash with
|
|
545
|
+
* `UnhandledSchemeError` or `Can't resolve 'zlib'`. This entry is the
|
|
546
|
+
* actual DISC-1257 fix for the dev-webpack path. Turbopack is
|
|
547
|
+
* unaffected — it ignores `config.webpack` and resolves Node built-ins
|
|
548
|
+
* natively.
|
|
549
|
+
* - An empty `turbopack: {}` when none is set, so Next 16 does not reject
|
|
550
|
+
* the config for setting `webpack` without a companion `turbopack` key
|
|
551
|
+
* (DISC-1256).
|
|
552
|
+
* - A `webpack` hook that collects and uploads `.map` files on client-side
|
|
553
|
+
* production builds.
|
|
554
|
+
*
|
|
523
555
|
* ## Turbopack
|
|
524
556
|
*
|
|
525
557
|
* Next.js 16 made Turbopack the default bundler for `next build`, and Next
|
|
@@ -570,10 +602,13 @@ declare function getStatus(): {
|
|
|
570
602
|
* manually integrate Glasstrace with their existing OTel provider
|
|
571
603
|
* (e.g., Sentry's openTelemetrySpanProcessors config option).
|
|
572
604
|
*
|
|
573
|
-
* Also provides
|
|
574
|
-
*
|
|
605
|
+
* Also provides the auto-attach path (tryAutoAttachGlasstraceProcessor)
|
|
606
|
+
* that configureOtel() uses when it detects a pre-registered provider
|
|
607
|
+
* at runtime (Next.js 16 production, Sentry, Datadog, New Relic). Both
|
|
608
|
+
* entry points reuse the same span-processor factory so the manual and
|
|
609
|
+
* automatic paths stay in lockstep.
|
|
575
610
|
*
|
|
576
|
-
* Design: sdk-otel-coexistence.md Sections 3, 5, 6
|
|
611
|
+
* Design: sdk-otel-coexistence.md Sections 3, 4, 5, 6
|
|
577
612
|
*/
|
|
578
613
|
|
|
579
614
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -292,6 +292,13 @@ declare function saveCachedConfig(response: SdkInitResponse, projectRoot?: strin
|
|
|
292
292
|
/**
|
|
293
293
|
* Sends a POST request to `/v1/sdk/init`.
|
|
294
294
|
* Validates the response against `SdkInitResponseSchema`.
|
|
295
|
+
*
|
|
296
|
+
* Uses `node:https` via {@link httpsPostJson} rather than the global
|
|
297
|
+
* `fetch` because Next.js 16 patches `fetch` for caching/revalidation
|
|
298
|
+
* and can cause the init request to silently hang (DISC-493 Issue 3).
|
|
299
|
+
* Retries transport-level failures (DNS, TCP, TLS) twice with 500ms +
|
|
300
|
+
* 1500ms backoff, capped at a 20-second total deadline. Server responses
|
|
301
|
+
* (HTTP 4xx/5xx) are never retried and are surfaced immediately.
|
|
295
302
|
*/
|
|
296
303
|
declare function sendInitRequest(config: ResolvedConfig, anonKey: AnonApiKey | null, sdkVersion: string, importGraph?: ImportGraphPayload, healthReport?: SdkHealthReport, diagnostics?: Array<{
|
|
297
304
|
code: SdkDiagnosticCode;
|
|
@@ -520,6 +527,31 @@ type NextConfig = object;
|
|
|
520
527
|
* The build NEVER fails because of Glasstrace — all errors are caught
|
|
521
528
|
* and logged as warnings.
|
|
522
529
|
*
|
|
530
|
+
* ## What the wrapper configures for you
|
|
531
|
+
*
|
|
532
|
+
* - `experimental.serverSourceMaps: true` — enables server-side source maps
|
|
533
|
+
* so Glasstrace can resolve stack traces back to your source.
|
|
534
|
+
* - `serverExternalPackages: ["@glasstrace/sdk"]` — tells Next to load the
|
|
535
|
+
* SDK via Node's `require()` at runtime instead of bundling it through
|
|
536
|
+
* webpack or Turbopack on the RSC / Route Handler paths. This is the same
|
|
537
|
+
* pattern Prisma, `@vercel/otel`, Sentry, `sharp`, and `bcrypt` ship with.
|
|
538
|
+
* - A webpack `externals` entry that marks every Node.js built-in import
|
|
539
|
+
* (both `node:*` and bare forms like `zlib` or `stream`) as a runtime
|
|
540
|
+
* `commonjs` require. `serverExternalPackages` does not apply to the
|
|
541
|
+
* instrumentation path under `next dev --webpack`
|
|
542
|
+
* (vercel/next.js#58003, #28774), so any bundled SDK chunk that imports
|
|
543
|
+
* `node:child_process` or the bare `zlib` specifier used by
|
|
544
|
+
* `@opentelemetry/otlp-exporter-base` would otherwise crash with
|
|
545
|
+
* `UnhandledSchemeError` or `Can't resolve 'zlib'`. This entry is the
|
|
546
|
+
* actual DISC-1257 fix for the dev-webpack path. Turbopack is
|
|
547
|
+
* unaffected — it ignores `config.webpack` and resolves Node built-ins
|
|
548
|
+
* natively.
|
|
549
|
+
* - An empty `turbopack: {}` when none is set, so Next 16 does not reject
|
|
550
|
+
* the config for setting `webpack` without a companion `turbopack` key
|
|
551
|
+
* (DISC-1256).
|
|
552
|
+
* - A `webpack` hook that collects and uploads `.map` files on client-side
|
|
553
|
+
* production builds.
|
|
554
|
+
*
|
|
523
555
|
* ## Turbopack
|
|
524
556
|
*
|
|
525
557
|
* Next.js 16 made Turbopack the default bundler for `next build`, and Next
|
|
@@ -570,10 +602,13 @@ declare function getStatus(): {
|
|
|
570
602
|
* manually integrate Glasstrace with their existing OTel provider
|
|
571
603
|
* (e.g., Sentry's openTelemetrySpanProcessors config option).
|
|
572
604
|
*
|
|
573
|
-
* Also provides
|
|
574
|
-
*
|
|
605
|
+
* Also provides the auto-attach path (tryAutoAttachGlasstraceProcessor)
|
|
606
|
+
* that configureOtel() uses when it detects a pre-registered provider
|
|
607
|
+
* at runtime (Next.js 16 production, Sentry, Datadog, New Relic). Both
|
|
608
|
+
* entry points reuse the same span-processor factory so the manual and
|
|
609
|
+
* automatic paths stay in lockstep.
|
|
575
610
|
*
|
|
576
|
-
* Design: sdk-otel-coexistence.md Sections 3, 5, 6
|
|
611
|
+
* Design: sdk-otel-coexistence.md Sections 3, 4, 5, 6
|
|
577
612
|
*/
|
|
578
613
|
|
|
579
614
|
/**
|