@glasstrace/sdk 1.15.0 → 1.15.1

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/cli/init.cjs CHANGED
@@ -18095,7 +18095,7 @@ async function mcpAdd(options) {
18095
18095
  );
18096
18096
  const dispatchSetMcpAdd = detectedNonGenericMcpAdd.length === 0 ? agentsWithMcpReady : nonGenericReadyMcpAdd;
18097
18097
  if (dispatchSetMcpAdd.length > 0) {
18098
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
18098
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
18099
18099
  try {
18100
18100
  await injectAllTargets(
18101
18101
  dispatchSetMcpAdd,
@@ -18352,7 +18352,7 @@ async function runUpgradeInstructions(options) {
18352
18352
  );
18353
18353
  return { exitCode: 1, refreshed, skipped, warnings, errors };
18354
18354
  }
18355
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
18355
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
18356
18356
  const optedInAgents = [];
18357
18357
  for (const agent of agents) {
18358
18358
  if (agent.infoFilePath === null) {
@@ -20037,7 +20037,7 @@ Then add this as the first statement in your register() function:
20037
20037
  );
20038
20038
  const dispatchSet = detectedNonGeneric.length === 0 ? agentsWithMcpReady : nonGenericReady;
20039
20039
  if (dispatchSet.length > 0) {
20040
- const sdkVersionForInject = true ? "1.15.0" : "0.0.0-dev";
20040
+ const sdkVersionForInject = true ? "1.15.1" : "0.0.0-dev";
20041
20041
  try {
20042
20042
  await injectAllTargets(
20043
20043
  dispatchSet,
@@ -20139,7 +20139,7 @@ async function verifyAnonKeyRegistration(projectRoot) {
20139
20139
  }
20140
20140
  const baseConfig = resolveConfig({ apiKey: devKey });
20141
20141
  const config2 = { ...baseConfig, apiKey: devKey };
20142
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
20142
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
20143
20143
  const result = await verifyInitReachable(config2, anonKey, sdkVersion);
20144
20144
  if (result.ok) {
20145
20145
  return { outcome: "verified" };
package/dist/cli/init.js CHANGED
@@ -918,7 +918,7 @@ Then add this as the first statement in your register() function:
918
918
  );
919
919
  const dispatchSet = detectedNonGeneric.length === 0 ? agentsWithMcpReady : nonGenericReady;
920
920
  if (dispatchSet.length > 0) {
921
- const sdkVersionForInject = true ? "1.15.0" : "0.0.0-dev";
921
+ const sdkVersionForInject = true ? "1.15.1" : "0.0.0-dev";
922
922
  try {
923
923
  await injectAllTargets(
924
924
  dispatchSet,
@@ -1020,7 +1020,7 @@ async function verifyAnonKeyRegistration(projectRoot) {
1020
1020
  }
1021
1021
  const baseConfig = resolveConfig({ apiKey: devKey });
1022
1022
  const config = { ...baseConfig, apiKey: devKey };
1023
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
1023
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
1024
1024
  const result = await verifyInitReachable(config, anonKey, sdkVersion);
1025
1025
  if (result.ok) {
1026
1026
  return { outcome: "verified" };
@@ -15990,7 +15990,7 @@ async function mcpAdd(options) {
15990
15990
  );
15991
15991
  const dispatchSetMcpAdd = detectedNonGenericMcpAdd.length === 0 ? agentsWithMcpReady : nonGenericReadyMcpAdd;
15992
15992
  if (dispatchSetMcpAdd.length > 0) {
15993
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
15993
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
15994
15994
  try {
15995
15995
  await injectAllTargets(
15996
15996
  dispatchSetMcpAdd,
@@ -230,7 +230,7 @@ async function mcpAdd(options) {
230
230
  );
231
231
  const dispatchSetMcpAdd = detectedNonGenericMcpAdd.length === 0 ? agentsWithMcpReady : nonGenericReadyMcpAdd;
232
232
  if (dispatchSetMcpAdd.length > 0) {
233
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
233
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
234
234
  try {
235
235
  await injectAllTargets(
236
236
  dispatchSetMcpAdd,
@@ -672,7 +672,7 @@ async function runUpgradeInstructions(options) {
672
672
  );
673
673
  return { exitCode: 1, refreshed, skipped, warnings, errors };
674
674
  }
675
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
675
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
676
676
  const optedInAgents = [];
677
677
  for (const agent of agents) {
678
678
  if (agent.infoFilePath === null) {
@@ -67,7 +67,7 @@ async function runUpgradeInstructions(options) {
67
67
  );
68
68
  return { exitCode: 1, refreshed, skipped, warnings, errors };
69
69
  }
70
- const sdkVersion = true ? "1.15.0" : "0.0.0-dev";
70
+ const sdkVersion = true ? "1.15.1" : "0.0.0-dev";
71
71
  const optedInAgents = [];
72
72
  for (const agent of agents) {
73
73
  if (agent.infoFilePath === null) {
package/dist/index.cjs CHANGED
@@ -23685,6 +23685,13 @@ async function tryImport(moduleId) {
23685
23685
  return null;
23686
23686
  }
23687
23687
  }
23688
+ function warnPrismaInstrumentationUnavailable(verbose, detail) {
23689
+ if (!verbose) return;
23690
+ sdkLog(
23691
+ "warn",
23692
+ `[glasstrace] @prisma/instrumentation ${detail}; Prisma query spans will not be captured. If you use Prisma and expect database spans, add @prisma/instrumentation as a direct dependency (some package managers, e.g. pnpm, do not expose transitive copies).`
23693
+ );
23694
+ }
23688
23695
  async function configureOtel(config2, sessionManager) {
23689
23696
  setOtelState(OtelState.CONFIGURING);
23690
23697
  await new Promise((resolve3) => {
@@ -23792,7 +23799,14 @@ async function runRegistrationPath(config2, sessionManager) {
23792
23799
  const PrismaInstrumentation = prismaModule2.PrismaInstrumentation;
23793
23800
  if (PrismaInstrumentation) {
23794
23801
  otelConfig.instrumentations = [new PrismaInstrumentation()];
23802
+ } else {
23803
+ warnPrismaInstrumentationUnavailable(
23804
+ config2.verbose,
23805
+ "was loaded but did not export PrismaInstrumentation"
23806
+ );
23795
23807
  }
23808
+ } else {
23809
+ warnPrismaInstrumentationUnavailable(config2.verbose, "could not be loaded");
23796
23810
  }
23797
23811
  vercelOtel.registerOTel(otelConfig);
23798
23812
  const vercelProxy = trace.getTracerProvider();
@@ -23847,9 +23861,22 @@ async function runRegistrationPath(config2, sessionManager) {
23847
23861
  const inst = new PrismaInstrumentation();
23848
23862
  inst.setTracerProvider(provider);
23849
23863
  inst.enable();
23850
- } catch {
23864
+ } catch (err) {
23865
+ if (config2.verbose) {
23866
+ sdkLog(
23867
+ "warn",
23868
+ `[glasstrace] @prisma/instrumentation failed to initialize: ${err instanceof Error ? err.message : String(err)}. Prisma query spans will not be captured.`
23869
+ );
23870
+ }
23851
23871
  }
23872
+ } else {
23873
+ warnPrismaInstrumentationUnavailable(
23874
+ config2.verbose,
23875
+ "was loaded but did not export PrismaInstrumentation"
23876
+ );
23852
23877
  }
23878
+ } else {
23879
+ warnPrismaInstrumentationUnavailable(config2.verbose, "could not be loaded");
23853
23880
  }
23854
23881
  setOtelState(OtelState.OWNS_PROVIDER);
23855
23882
  emitLifecycleEvent("otel:configured", { state: OtelState.OWNS_PROVIDER, scenario: "A" });
@@ -24710,11 +24737,11 @@ function registerGlasstrace(options) {
24710
24737
  setCoreState(CoreState.REGISTERING);
24711
24738
  maybeWarnStaleAgentInstructions({
24712
24739
  projectRoot: process.cwd(),
24713
- sdkVersion: "1.15.0"
24740
+ sdkVersion: "1.15.1"
24714
24741
  });
24715
24742
  startRuntimeStateWriter({
24716
24743
  projectRoot: process.cwd(),
24717
- sdkVersion: "1.15.0"
24744
+ sdkVersion: "1.15.1"
24718
24745
  });
24719
24746
  const config2 = resolveConfig(options);
24720
24747
  setSideEffectVerboseFlag(config2.verbose);
@@ -24882,8 +24909,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
24882
24909
  if (config2.verbose) {
24883
24910
  console.info("[glasstrace] Background init firing.");
24884
24911
  }
24885
- const healthReport = collectHealthReport("1.15.0");
24886
- const initResult = await performInit(config2, anonKeyForInit, "1.15.0", healthReport);
24912
+ const healthReport = collectHealthReport("1.15.1");
24913
+ const initResult = await performInit(config2, anonKeyForInit, "1.15.1", healthReport);
24887
24914
  if (generation !== registrationGeneration) return;
24888
24915
  const currentState = getCoreState();
24889
24916
  if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
@@ -24906,7 +24933,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
24906
24933
  }
24907
24934
  maybeInstallConsoleCapture();
24908
24935
  if (didLastInitSucceed()) {
24909
- startHeartbeat(config2, anonKeyForInit, "1.15.0", generation, (newApiKey, accountId) => {
24936
+ startHeartbeat(config2, anonKeyForInit, "1.15.1", generation, (newApiKey, accountId) => {
24910
24937
  setAuthState(AuthState.CLAIMING);
24911
24938
  emitLifecycleEvent("auth:claim_started", { accountId });
24912
24939
  setResolvedApiKey(newApiKey);