@sanseng/liveavatar-js-sdk-skywalking 1.0.1 → 1.0.2

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ## What it solves
6
6
 
7
7
  - Reports SDK-generated LiveAvatar A/V Sync alert lifecycles with compact, causally ordered diagnostic evidence for investigation in SkyWalking.
8
- - Reports qualifying SDK Operational Log errors without uploading the original error message, stack, token, or business payload.
8
+ - Reports qualifying SDK Operational Log errors with their code and SDK-provided reason for diagnosis.
9
9
  - Reports every terminal `performance.first-frame` Operational Log, including success, connection failure, and first-frame timeout.
10
10
  - Adds observability through the public LiveAvatar Plugin API v1, without subscribing to legacy SDK events or using SDK internals.
11
11
  - Bundles and registers a browser SkyWalking client when one has not already been supplied by the application.
package/dist/index.cjs.js CHANGED
@@ -33,7 +33,7 @@ const FRAME_METADATA_MAX_ASSOCIATION_AGE_MS = 150;
33
33
  const TIME_SYNC_BUCKET_MS = 1000;
34
34
  const SKYWALKING_SERVICE = "yy-tx::liveavatar-js-sdk";
35
35
  const DOMESTIC_COLLECTOR = "https://apm.hexin.cn/skywalking-web";
36
- const OVERSEAS_COLLECTOR = "https://apm.ainvest.com/skywalking-web";
36
+ const OVERSEAS_COLLECTOR = "https://ai.dreamfaceapp.com/skywalking-web";
37
37
  const REGISTRATION_STATE_KEY = Symbol.for("liveavatar.skywalking.registration-state");
38
38
  /**
39
39
  * Reports LiveAvatar A/V-sync incident lifecycle events through the bundled or
@@ -243,6 +243,7 @@ class SkyWalkingPlugin {
243
243
  if (!this._isInvocationActive(installation, signal))
244
244
  return;
245
245
  const code = stringOr(record.attributes?.code, "SDK_ERROR");
246
+ const reason = record.attributes?.reason;
246
247
  const clientMonitor = getClientMonitor();
247
248
  if (clientMonitor === undefined) {
248
249
  this._warnInvocation(installation, signal, "ClientMonitor.reportFrameErrors is unavailable", {
@@ -257,6 +258,7 @@ class SkyWalkingPlugin {
257
258
  sdkVersion: liveavatarJsSdk.VERSION,
258
259
  error: stringifyJson({
259
260
  code,
261
+ ...(typeof reason === "string" ? { reason } : {}),
260
262
  eventId: record.eventId,
261
263
  sequence: record.sequence,
262
264
  occurredAtMs: record.occurredAtMs,
package/dist/index.d.ts CHANGED
@@ -228,6 +228,7 @@ interface SkyWalkingSdkErrorPayload {
228
228
  schemaVersion: 2;
229
229
  kind: "liveavatar.sdk.error";
230
230
  sdkVersion: string;
231
+ /** JSON-encoded error record, including the SDK's optional string `reason`. */
231
232
  error: string;
232
233
  }
233
234
  interface SkyWalkingFrameError {
package/dist/index.esm.js CHANGED
@@ -31,7 +31,7 @@ const FRAME_METADATA_MAX_ASSOCIATION_AGE_MS = 150;
31
31
  const TIME_SYNC_BUCKET_MS = 1000;
32
32
  const SKYWALKING_SERVICE = "yy-tx::liveavatar-js-sdk";
33
33
  const DOMESTIC_COLLECTOR = "https://apm.hexin.cn/skywalking-web";
34
- const OVERSEAS_COLLECTOR = "https://apm.ainvest.com/skywalking-web";
34
+ const OVERSEAS_COLLECTOR = "https://ai.dreamfaceapp.com/skywalking-web";
35
35
  const REGISTRATION_STATE_KEY = Symbol.for("liveavatar.skywalking.registration-state");
36
36
  /**
37
37
  * Reports LiveAvatar A/V-sync incident lifecycle events through the bundled or
@@ -241,6 +241,7 @@ class SkyWalkingPlugin {
241
241
  if (!this._isInvocationActive(installation, signal))
242
242
  return;
243
243
  const code = stringOr(record.attributes?.code, "SDK_ERROR");
244
+ const reason = record.attributes?.reason;
244
245
  const clientMonitor = getClientMonitor();
245
246
  if (clientMonitor === undefined) {
246
247
  this._warnInvocation(installation, signal, "ClientMonitor.reportFrameErrors is unavailable", {
@@ -255,6 +256,7 @@ class SkyWalkingPlugin {
255
256
  sdkVersion: VERSION,
256
257
  error: stringifyJson({
257
258
  code,
259
+ ...(typeof reason === "string" ? { reason } : {}),
258
260
  eventId: record.eventId,
259
261
  sequence: record.sequence,
260
262
  occurredAtMs: record.occurredAtMs,
package/dist/index.umd.js CHANGED
@@ -35,7 +35,7 @@
35
35
  const TIME_SYNC_BUCKET_MS = 1000;
36
36
  const SKYWALKING_SERVICE = "yy-tx::liveavatar-js-sdk";
37
37
  const DOMESTIC_COLLECTOR = "https://apm.hexin.cn/skywalking-web";
38
- const OVERSEAS_COLLECTOR = "https://apm.ainvest.com/skywalking-web";
38
+ const OVERSEAS_COLLECTOR = "https://ai.dreamfaceapp.com/skywalking-web";
39
39
  const REGISTRATION_STATE_KEY = Symbol.for("liveavatar.skywalking.registration-state");
40
40
  /**
41
41
  * Reports LiveAvatar A/V-sync incident lifecycle events through the bundled or
@@ -245,6 +245,7 @@
245
245
  if (!this._isInvocationActive(installation, signal))
246
246
  return;
247
247
  const code = stringOr(record.attributes?.code, "SDK_ERROR");
248
+ const reason = record.attributes?.reason;
248
249
  const clientMonitor = getClientMonitor();
249
250
  if (clientMonitor === undefined) {
250
251
  this._warnInvocation(installation, signal, "ClientMonitor.reportFrameErrors is unavailable", {
@@ -259,6 +260,7 @@
259
260
  sdkVersion: liveavatarJsSdk.VERSION,
260
261
  error: stringifyJson({
261
262
  code,
263
+ ...(typeof reason === "string" ? { reason } : {}),
262
264
  eventId: record.eventId,
263
265
  sequence: record.sequence,
264
266
  occurredAtMs: record.occurredAtMs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanseng/liveavatar-js-sdk-skywalking",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "SkyWalking plugin for LiveAvatar A/V Sync alerts, first-frame performance, and SDK errors with type-selective reporting",
5
5
  "license": "MIT",
6
6
  "author": "sanseng",
@@ -58,4 +58,4 @@
58
58
  "vite": "^7.3.0",
59
59
  "vitest": "^4.1.7"
60
60
  }
61
- }
61
+ }