@interopio/otel 0.1.17 → 0.1.19

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.
Files changed (2) hide show
  1. package/insights.d.ts +48 -7
  2. package/package.json +1 -1
package/insights.d.ts CHANGED
@@ -1392,6 +1392,18 @@ export namespace IOInsights {
1392
1392
  * the pre-init recorder (when installed) captures errors from page start -
1393
1393
  * opt out of that with the configuration object's `preInit: false`.
1394
1394
  *
1395
+ * Also works in NodeJS, via process.uncaughtExceptionMonitor - a
1396
+ * behavior-preserving hook: the process still crashes exactly as it would
1397
+ * have. The span processors are force-flushed immediately, so the crash
1398
+ * span is exported whenever anything keeps the process alive past the
1399
+ * crash (an application 'uncaughtException' handler, a graceful
1400
+ * shutdown); on a hard crash the export cannot complete and the span is
1401
+ * lost with the process. Under Node's default
1402
+ * unhandled-rejections=throw mode, crash-grade unhandled rejections are
1403
+ * reported too; non-crashing rejection observation is deliberately not
1404
+ * done in Node, because subscribing to process.unhandledRejection would
1405
+ * suppress Node's default crash semantics.
1406
+ *
1395
1407
  * @default false
1396
1408
  */
1397
1409
  instrumentErrors?: boolean | ErrorInstrumentationConfig;
@@ -1440,7 +1452,18 @@ export namespace IOInsights {
1440
1452
 
1441
1453
  /**
1442
1454
  * If `true`, io.Insights will instrument and trace the application startup process
1443
- * automatically.
1455
+ * automatically: a root "interopio.api.appStartup" span starting at the runtime's
1456
+ * time origin, under which spans created during the startup window are nested
1457
+ * (via the propagation defaults). In browsers the root carries child spans and
1458
+ * KPIs reconstructed from the performance timeline (navigation phases, paints,
1459
+ * long tasks, startup-window web vitals, lifecycle transitions).
1460
+ *
1461
+ * Also works in NodeJS: the root span opens at process start and the startup
1462
+ * window nesting applies, but the browser performance-timeline children are
1463
+ * not produced. The window closes on startupParentSpanTimeoutMs or an explicit
1464
+ * startupTraceFinished() call ("loader" mode behaves as "any" in Node - there
1465
+ * is no loader signal). When the platform provides a root propagation info,
1466
+ * the startup span is parented under it.
1444
1467
  *
1445
1468
  * @default true
1446
1469
  */
@@ -1450,7 +1473,7 @@ export namespace IOInsights {
1450
1473
  * If `true`, io.Insights will instrument and trace the application initialization process
1451
1474
  * automatically.
1452
1475
  *
1453
- * @default true
1476
+ * @default false
1454
1477
  * @deprecated use instrumentAppStartup
1455
1478
  */
1456
1479
  instrumentAppLoad?: boolean;
@@ -1459,7 +1482,7 @@ export namespace IOInsights {
1459
1482
  * If `true`, io.Insights will instrument and trace the steps of the document load
1460
1483
  * process automatically
1461
1484
  *
1462
- * @default true
1485
+ * @default false
1463
1486
  * @deprecated use instrumentAppStartup
1464
1487
  */
1465
1488
  instrumentDocumentLoad?: boolean;
@@ -1579,9 +1602,12 @@ export namespace IOInsights {
1579
1602
  /**
1580
1603
  * If non-zero, how long after application startup will any traced operations
1581
1604
  * automatically be nested under the application startup trace. The timeout is counted from the moment
1582
- * the io.Connect API begins initializing.
1583
- *
1584
- * @default 0
1605
+ * the io.Connect API begins initializing. Without a timeout the startup window
1606
+ * only closes on an explicit startupTraceFinished() call (or the loader signal
1607
+ * in io.Connect Desktop windows) - the root span stays open, and unexported,
1608
+ * until then.
1609
+ *
1610
+ * @default 3000
1585
1611
  */
1586
1612
  startupParentSpanTimeoutMs?: number;
1587
1613
  /**
@@ -1591,7 +1617,10 @@ export namespace IOInsights {
1591
1617
  * * timeout - same as "explicit" OR when startupParentSpanTimeoutMs have elapsed and the DOMContentLoaded event has fired
1592
1618
  * * loader - same as "explicit" OR when the loading animation of the window has completed
1593
1619
  * * any - when any of the above conditions are met
1594
- *
1620
+ *
1621
+ * In NodeJS there is no loader signal (or DOM readiness): "loader" behaves as
1622
+ * "any", and the timeout counts alone.
1623
+ *
1595
1624
  * @default "any"
1596
1625
  */
1597
1626
  startupParentSpanEnd?: "explicit" | "timeout" | "loader" | "any";
@@ -2859,6 +2888,18 @@ export namespace IOInsights {
2859
2888
  * @default 0
2860
2889
  */
2861
2890
  chainLength?: number;
2891
+ /**
2892
+ * Unless `false`, focus spans for windows that sit in a workspace also
2893
+ * carry the workspace context - workspaceId, workspaceName and
2894
+ * workspaceTitle. Only workspace membership is resolvable synchronously;
2895
+ * the id/name/title are fetched from the workspaces frame asynchronously
2896
+ * (two round trips per focus change into a workspace window) and added to
2897
+ * the still-open focus span when they arrive - a focus change racing the
2898
+ * lookup loses only these attributes.
2899
+ *
2900
+ * @default true
2901
+ */
2902
+ includeWorkspaceInfo?: boolean;
2862
2903
  }
2863
2904
 
2864
2905
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/otel",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "description": "io.Insights observability library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",