@salesforce/internal-lightning-out-containers 2.2.2 → 2.2.3

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.
@@ -177,6 +177,12 @@ export default class LightningOutBaseContainer extends LightningElement {
177
177
  hasError: this.isError,
178
178
  loAppOrigin: this.#env.loAppOrigin,
179
179
  });
180
+
181
+ // Direct-to-Argus: count render errors.
182
+ this.#instrumentation.incrementCounter("lo2.render.error.count", 1, true, {
183
+ componentType: type,
184
+ componentName: specifier,
185
+ });
180
186
  this.#globalError(err);
181
187
  } finally {
182
188
  if (this.isError && this.#renderActivity && !this.#renderActivityStopped) {
@@ -268,6 +274,11 @@ export default class LightningOutBaseContainer extends LightningElement {
268
274
  loAppOrigin: this.#env.loAppOrigin,
269
275
  });
270
276
  this.#renderActivityStopped = true;
277
+
278
+ // Direct-to-Argus: count successful renders.
279
+ this.#instrumentation.incrementCounter("lo2.render.count", 1, false, {
280
+ componentType: this.embeddedCmpType,
281
+ });
271
282
  }
272
283
  }
273
284
  }
@@ -85,7 +85,11 @@ class EmbeddingResizer {
85
85
  requestAnimationFrame(() => {
86
86
  this.#scheduled = false;
87
87
  if (!this.#isObserving) return;
88
- this.#onResize(this.#lastHeight);
88
+ try {
89
+ this.#onResize(this.#lastHeight);
90
+ } catch {
91
+ // Swallow: a throwing consumer (e.g. disposed bridge) must not wedge the rAF loop.
92
+ }
89
93
  });
90
94
  }
91
95
  };
@@ -48,11 +48,24 @@ export function createInstrumentation(channelName, componentName, loAppOrigin) {
48
48
  }
49
49
  }
50
50
 
51
+ // Direct-to-Argus counter emission. In production the o11y client's
52
+ // incrementCounter() flows through Core → Funnel → Argus.
53
+ // Metric naming: core_ui_LightningOutLWRApp:<scope>.<name>.COUNT.Count
54
+ function incrementCounter(name, value, isError, tags) {
55
+ if (!instrumentation || typeof instrumentation.incrementCounter !== "function") return;
56
+ try {
57
+ instrumentation.incrementCounter(name, value, isError, tags || {});
58
+ } catch {
59
+ // swallow — telemetry must never break the container
60
+ }
61
+ }
62
+
51
63
  return {
52
64
  logError,
53
65
  startRenderActivity,
54
66
  errorRenderActivity,
55
67
  stopRenderActivity,
56
68
  log,
69
+ incrementCounter,
57
70
  };
58
71
  }
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@salesforce/internal-lightning-out-containers",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "private": false,
5
5
  "description": "Lightning Out 2.0 Container Components",
6
6
  "type": "module",
7
7
  "files": [
8
- "dist"
8
+ "dist/",
9
+ "!dist/__tests__/",
10
+ "!dist/__mocks__/",
11
+ "!dist/*.test.js",
12
+ "!dist/*.map"
9
13
  ],
10
14
  "scripts": {
11
15
  "build": "node scripts/build.mjs",