@interopio/otel 0.1.16 → 0.1.18

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/index.d.ts CHANGED
@@ -39,6 +39,13 @@ export type InstanceCrashHandler = IOInsights.InstanceCrashHandler;
39
39
  export type InstanceCrashHandlerArgs = IOInsights.InstanceCrashHandlerArgs;
40
40
  export type InstanceErrorHandler = IOInsights.InstanceErrorHandler;
41
41
  export type InstanceErrorHandlerArgs = IOInsights.InstanceErrorHandlerArgs;
42
+ export type InstanceHangHandler = IOInsights.InstanceHangHandler;
43
+ export type InstanceHangHandlerArgs = IOInsights.InstanceHangHandlerArgs;
44
+ export type InstanceLoadFailedHandler = IOInsights.InstanceLoadFailedHandler;
45
+ export type InstanceLoadFailedHandlerArgs = IOInsights.InstanceLoadFailedHandlerArgs;
46
+ export type InstanceReloadHandler = IOInsights.InstanceReloadHandler;
47
+ export type InstanceReloadHandlerArgs = IOInsights.InstanceReloadHandlerArgs;
48
+ export type ApplicationStack = IOInsights.ApplicationStack;
42
49
  export type InstanceFocusedHandler = IOInsights.InstanceFocusedHandler;
43
50
  export type InstanceFocusedHandlerArgs = IOInsights.InstanceFocusedHandlerArgs;
44
51
  export type InstanceReadyHandler = IOInsights.InstanceReadyHandler;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASC,CAAC;AAKF,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,wDAAuD;AAA9C,8GAAA,aAAa,OAAA;AACtB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AA0BlB,uCAA4C;AAAnC,kGAAA,UAAU,OAAA;AACnB,+EAA8E;AAArE,oIAAA,wBAAwB,OAAA;AAgEjC,0DAAoD;AAC3C,iBADF,gBAAM,CACE;AAAE,yFADC,iBAAQ,OACD;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L,CAAC;AACD,IAAK,cAcJ;AAdD,WAAK,cAAc;IACjB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdI,cAAc,8BAAd,cAAc,QAclB"}
@@ -7,6 +7,9 @@ export declare class MetricsDependencyBuilder {
7
7
  private instanceFocusedHandler;
8
8
  private instanceErrorHandler;
9
9
  private instanceCrashHandler;
10
+ private instanceHangHandler;
11
+ private instanceLoadFailedHandler;
12
+ private instanceReloadHandler;
10
13
  private layoutRestoredHandler;
11
14
  private platformStartedHandler;
12
15
  private platformErrorHandler;
@@ -31,6 +34,9 @@ export declare class MetricsDependencyBuilder {
31
34
  withInstanceFocusedHandler(instanceFocusedHandler: IOInsights.InstanceFocusedHandler): this;
32
35
  withInstanceErrorHandler(instanceErrorHandler: IOInsights.InstanceErrorHandler): this;
33
36
  withInstanceCrashHandler(instanceCrashHandler: IOInsights.InstanceCrashHandler): this;
37
+ withInstanceHangHandler(instanceHangHandler: IOInsights.InstanceHangHandler): this;
38
+ withInstanceLoadFailedHandler(instanceLoadFailedHandler: IOInsights.InstanceLoadFailedHandler): this;
39
+ withInstanceReloadHandler(instanceReloadHandler: IOInsights.InstanceReloadHandler): this;
34
40
  withLayoutRestoredHandler(layoutRestoredHandler: IOInsights.LayoutRestoredHandler): this;
35
41
  withWorkspaceLoadedHandler(workspaceLoadedHandler: IOInsights.WorkspaceGenericActionHandler<IOInsights.WorkspaceLoadedHandlerArgs>): this;
36
42
  withWorkspaceSavedHandler(workspaceSavedHandler: IOInsights.WorkspaceGenericActionHandler<IOInsights.WorkspaceSavedHandlerArgs>): this;
@@ -11,6 +11,9 @@ class MetricsDependencyBuilder {
11
11
  this.instanceReadyHandler = () => () => { };
12
12
  this.instanceErrorHandler = () => () => { };
13
13
  this.instanceCrashHandler = () => () => { };
14
+ this.instanceHangHandler = () => () => { };
15
+ this.instanceLoadFailedHandler = () => () => { };
16
+ this.instanceReloadHandler = () => () => { };
14
17
  this.layoutRestoredHandler = () => () => { };
15
18
  this.platformStartedHandler = () => () => { };
16
19
  this.platformErrorHandler = () => () => { };
@@ -37,6 +40,9 @@ class MetricsDependencyBuilder {
37
40
  instanceFocusedHandler: this.instanceFocusedHandler,
38
41
  instanceErrorHandler: this.instanceErrorHandler,
39
42
  instanceCrashHandler: this.instanceCrashHandler,
43
+ instanceHangHandler: this.instanceHangHandler,
44
+ instanceLoadFailedHandler: this.instanceLoadFailedHandler,
45
+ instanceReloadHandler: this.instanceReloadHandler,
40
46
  layoutRestoredHandler: this.layoutRestoredHandler,
41
47
  platformStartedHandler: this.platformStartedHandler,
42
48
  platformErrorHandler: this.platformErrorHandler,
@@ -80,6 +86,18 @@ class MetricsDependencyBuilder {
80
86
  this.instanceCrashHandler = instanceCrashHandler;
81
87
  return this;
82
88
  }
89
+ withInstanceHangHandler(instanceHangHandler) {
90
+ this.instanceHangHandler = instanceHangHandler;
91
+ return this;
92
+ }
93
+ withInstanceLoadFailedHandler(instanceLoadFailedHandler) {
94
+ this.instanceLoadFailedHandler = instanceLoadFailedHandler;
95
+ return this;
96
+ }
97
+ withInstanceReloadHandler(instanceReloadHandler) {
98
+ this.instanceReloadHandler = instanceReloadHandler;
99
+ return this;
100
+ }
83
101
  withLayoutRestoredHandler(layoutRestoredHandler) {
84
102
  this.layoutRestoredHandler = layoutRestoredHandler;
85
103
  return this;
@@ -1 +1 @@
1
- {"version":3,"file":"metricsDependencyBuilder.js","sourceRoot":"","sources":["../../src/metrics/metricsDependencyBuilder.ts"],"names":[],"mappings":";;;AACA,yDAA6D;AAC7D,MAAa,wBAAwB;IA0BjC;QACI,IAAI,CAAC,mBAAmB,GAAG,IAAI,0CAAuB,EAAE,CAAC;QACzD,IAAI,CAAC,sBAAsB,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,sBAAsB,GAAG,GAAG,EAAE,CAAC,GAAG,EAA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G,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,2BAA2B,CAAC,uBAAyG;QACxI,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,gCAAgC,CAAC,4BAAkH;QACtJ,IAAI,CAAC,4BAA4B,GAAG,4BAA4B,CAAC;QACjE,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,6BAA6B,CAAC,yBAA+G;QAChJ,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;QAC3D,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,iCAAiC,CAAC,6BAAmH;QACxJ,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;QACnE,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,wCAAwC,CAAC,oCAA0H;QACtK,IAAI,CAAC,oCAAoC,GAAG,oCAAoC,CAAC;QACjF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,oCAAoC,CAAC,gCAAsH;QAC9J,IAAI,CAAC,gCAAgC,GAAG,gCAAgC,CAAC;QACzE,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,+BAA+B,CAAC,2BAAiH;QACpJ,IAAI,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;QAC/D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAhOD,4DAgOC"}
package/insights.d.ts CHANGED
@@ -539,7 +539,10 @@ export namespace IOInsights {
539
539
  | "app_duration"
540
540
  | "app_duration_soft"
541
541
  | "app_error"
542
+ | "app_hang"
543
+ | "app_load_failed"
542
544
  | "app_memory"
545
+ | "app_reload"
543
546
  | "app_started"
544
547
  | "app_startup"
545
548
  | "app_stopped"
@@ -647,6 +650,9 @@ export namespace IOInsights {
647
650
  instanceFocusedHandler: InstanceFocusedHandler;
648
651
  instanceErrorHandler: InstanceErrorHandler;
649
652
  instanceCrashHandler: InstanceCrashHandler;
653
+ instanceHangHandler: InstanceHangHandler;
654
+ instanceLoadFailedHandler: InstanceLoadFailedHandler;
655
+ instanceReloadHandler: InstanceReloadHandler;
650
656
  layoutRestoredHandler: LayoutRestoredHandler;
651
657
  // vnikolov 2025-09-04 keeping these non-generic names to avoid breaking changes
652
658
  // in platforms
@@ -670,11 +676,19 @@ export namespace IOInsights {
670
676
  * @ignore
671
677
  */
672
678
  export type Unsubscribe = () => void;
679
+ /**
680
+ * Which runtime stack an application belongs to: "web" for renderer-backed
681
+ * applications (windows, workspaces, web groups), "exe" for external
682
+ * processes, "node" for node processes. Published as a metric attribute on
683
+ * the app_* metrics.
684
+ */
685
+ export type ApplicationStack = "web" | "exe" | "node" | "unknown";
673
686
  /**
674
687
  * @ignore
675
688
  */
676
689
  export interface InstanceActionHandlerArgs {
677
690
  application: string;
691
+ stack?: ApplicationStack;
678
692
  }
679
693
  /**
680
694
  * @ignore
@@ -685,6 +699,7 @@ export namespace IOInsights {
685
699
 
686
700
  export interface InstanceErrorHandlerArgs {
687
701
  application: string;
702
+ stack?: ApplicationStack;
688
703
  }
689
704
  /**
690
705
  * @ignore
@@ -708,6 +723,7 @@ export namespace IOInsights {
708
723
  export interface InstanceCrashHandlerArgs {
709
724
  application: string;
710
725
  reason: string;
726
+ stack?: ApplicationStack;
711
727
  }
712
728
  /**
713
729
  * @ignore
@@ -715,12 +731,72 @@ export namespace IOInsights {
715
731
  export type InstanceCrashHandler = (
716
732
  callback: (args: InstanceCrashHandlerArgs) => void
717
733
  ) => Unsubscribe;
734
+ /**
735
+ * @ignore
736
+ */
737
+ export interface InstanceHangHandlerArgs {
738
+ application: string;
739
+ /**
740
+ * How long the instance was unresponsive, in milliseconds: until it became
741
+ * responsive again, or until it was closed/killed while still hung.
742
+ */
743
+ durationMs: number;
744
+ /**
745
+ * Whether the instance became responsive again. false when it was
746
+ * closed/killed while still hung.
747
+ */
748
+ recovered?: boolean;
749
+ stack?: ApplicationStack;
750
+ }
751
+ /**
752
+ * @ignore
753
+ */
754
+ export type InstanceHangHandler = (
755
+ callback: (args: InstanceHangHandlerArgs) => void
756
+ ) => Unsubscribe;
757
+ /**
758
+ * @ignore
759
+ */
760
+ export interface InstanceLoadFailedHandlerArgs {
761
+ application: string;
762
+ /** Milliseconds from load start until the failure was determined. */
763
+ durationMs: number;
764
+ /** Why the load failed (e.g. "timeout", "crashed", "load-error"). */
765
+ reason?: string;
766
+ stack?: ApplicationStack;
767
+ }
768
+ /**
769
+ * @ignore
770
+ */
771
+ export type InstanceLoadFailedHandler = (
772
+ callback: (args: InstanceLoadFailedHandlerArgs) => void
773
+ ) => Unsubscribe;
774
+ /**
775
+ * @ignore
776
+ */
777
+ export interface InstanceReloadHandlerArgs {
778
+ application: string;
779
+ /**
780
+ * What initiated the reload, when known (e.g. "user" for F5/menu refresh,
781
+ * "app" for a page-initiated reload, "platform"). Keep the set of values
782
+ * small - it becomes a metric attribute.
783
+ */
784
+ initiator?: string;
785
+ stack?: ApplicationStack;
786
+ }
787
+ /**
788
+ * @ignore
789
+ */
790
+ export type InstanceReloadHandler = (
791
+ callback: (args: InstanceReloadHandlerArgs) => void
792
+ ) => Unsubscribe;
718
793
  /**
719
794
  * @ignore
720
795
  */
721
796
  export interface InstanceFocusedHandlerArgs {
722
797
  application: string;
723
798
  focused: boolean;
799
+ stack?: ApplicationStack;
724
800
  }
725
801
  /**
726
802
  * @ignore
@@ -847,6 +923,7 @@ export namespace IOInsights {
847
923
  startTime: Date;
848
924
  endTime: Date;
849
925
  api: string;
926
+ stack?: ApplicationStack;
850
927
  }
851
928
  /**
852
929
  * @ignore
@@ -886,6 +963,7 @@ export namespace IOInsights {
886
963
  app: string;
887
964
  instance: string;
888
965
  cpu: number;
966
+ stack?: ApplicationStack;
889
967
  }
890
968
  /**
891
969
  * @ignore
@@ -894,6 +972,7 @@ export namespace IOInsights {
894
972
  app: string;
895
973
  instance: string;
896
974
  memory: number;
975
+ stack?: ApplicationStack;
897
976
  }
898
977
  /**
899
978
  * @ignore
@@ -928,8 +1007,23 @@ export namespace IOInsights {
928
1007
  /**
929
1008
  * Called by the application to signify that its startup has completed
930
1009
  * and no further spans should be nested under the startup trace.
1010
+ *
1011
+ * @param reason Optional description of the startup finalization status, gets added to the span
1012
+ */
1013
+ startupTraceFinished?: (reason?: string) => void;
1014
+
1015
+ /**
1016
+ * Instruments Electron's main-process `net` module (net.request and net.fetch)
1017
+ * with the request spans (source "interopio.api.instrumentation.electronNet" /
1018
+ * ".fetch") and the same request metrics as the renderer fetch/XHR
1019
+ * instrumentation. The net module is injected by the caller - io.Connect
1020
+ * Desktop's bootstrap, guarded by instrumentRequests.platform - because the
1021
+ * io.Insights packages have no electron dependency. Honors the
1022
+ * instrumentRequests configuration (ignore/match patterns, ignoreTelemetryURLs,
1023
+ * errorStatusCodes, spanNames, metric flags); no-op when instrumentRequests is
1024
+ * disabled.
931
1025
  */
932
- startupTraceFinished?: () => void;
1026
+ instrumentElectronNet?: (netModule: unknown) => void;
933
1027
 
934
1028
  /**
935
1029
  * Optional callback function to programmatically create marker spans in the User Journey trace.
@@ -1240,36 +1334,97 @@ export namespace IOInsights {
1240
1334
  resultMetric?: string;
1241
1335
 
1242
1336
  /**
1243
- * If `true`, io.Insights will instrument and trace XMLHttpRequest and fetch()
1244
- * requests automatically.
1245
- *
1246
- * @default true
1337
+ * If `true` (or a configuration object with `enabled: true`), io.Insights
1338
+ * will instrument and trace XMLHttpRequest and fetch() requests
1339
+ * automatically. When enabled, the pre-init recorder (when installed)
1340
+ * also captures requests from page start - opt out of that with the
1341
+ * configuration object's `preInit: false`.
1342
+ *
1343
+ * @default false
1247
1344
  */
1248
1345
  instrumentRequests?: boolean | RequestTraceConfig;
1249
1346
 
1347
+ /**
1348
+ * If `true` (or a configuration object), WebSocket connections are instrumented:
1349
+ * each connection is published as a span ("interopio.api.instrumentation.webSocket")
1350
+ * covering its whole lifetime - construction until close - with the connect
1351
+ * duration, negotiated protocol, close code/reason/wasClean, and message/byte
1352
+ * totals in both directions. Abnormal closures (code 1006) and connection
1353
+ * failures mark the span as ERROR. Optional message/byte counters and a
1354
+ * connect-duration histogram can be enabled via the configuration object.
1355
+ * Telemetry endpoints are never instrumented; the io.Connect gateway connection
1356
+ * is tracked by default (its lifecycle is platform-health telemetry - exclude it
1357
+ * with ignoreGateway), and ignorePattern can exclude other infrastructure sockets.
1358
+ *
1359
+ * When the pre-init module (early.js) is loaded, sockets are tracked from page
1360
+ * start: connections that closed before initialization become retroactive spans,
1361
+ * and connections still open are adopted with spans starting at their true
1362
+ * construction time and counters carried across - a socket opened at bootstrap
1363
+ * is fully observed. Without the pre-init module, sockets constructed before
1364
+ * initialization are not observed at all.
1365
+ *
1366
+ * @default false
1367
+ */
1368
+ instrumentWebSockets?: boolean | WebSocketInstrumentationConfig;
1369
+
1370
+ /**
1371
+ * If `true` (or a configuration object), session-level Web Vitals are tracked:
1372
+ * CLS (cumulative layout shift, session-window algorithm), INP (interaction to
1373
+ * next paint, the web-vitals estimation over Event Timing entries) and the final
1374
+ * LCP. A "interopio.api.instrumentation.webVitals" span with the current values
1375
+ * is published each time the page becomes hidden (when the values changed), and
1376
+ * optional histogram metrics record one terminal sample per page at pagehide.
1377
+ * Complements the startup trace's perf.vitals, which cover only the startup
1378
+ * window - CLS accumulates and INP is defined over the whole session.
1379
+ *
1380
+ * @default false
1381
+ */
1382
+ instrumentWebVitals?: boolean | WebVitalsInstrumentationConfig;
1383
+
1250
1384
  // https://github.com/open-telemetry/opentelemetry-browser/blob/main/packages/instrumentation/README.md#fetch
1251
1385
  /**
1252
- * If `true`, uncaught errors and unhandled promise rejections are published as
1253
- * error spans ("interopio.api.instrumentation.error" / ".unhandledRejection"),
1386
+ * If `true` (or a configuration object with `enabled`), uncaught errors and
1387
+ * unhandled promise rejections are published as error spans
1388
+ * ("interopio.api.instrumentation.error" / ".unhandledRejection"),
1254
1389
  * including errors buffered before initialization by the pre-init recorder.
1255
1390
  * Capped per session to guard against error storms. When enabled, the app
1256
- * startup trace defers its own error capture to this instrumentation.
1391
+ * startup trace defers its own error capture to this instrumentation, and
1392
+ * the pre-init recorder (when installed) captures errors from page start -
1393
+ * opt out of that with the configuration object's `preInit: false`.
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.
1257
1406
  *
1258
- * @default true
1407
+ * @default false
1259
1408
  */
1260
- instrumentErrors?: boolean;
1409
+ instrumentErrors?: boolean | ErrorInstrumentationConfig;
1261
1410
 
1262
1411
  /**
1263
- * If `true`, resource loads (scripts, stylesheets, images, fonts, ...) are
1264
- * published as spans ("interopio.api.instrumentation.resource") with their real
1265
- * timings from the resource timing buffer, including resources loaded before
1266
- * initialization. fetch/XHR resources are excluded (the request instrumentation
1267
- * covers them in more detail), as are telemetry uploads. When enabled, the app
1268
- * startup trace defers its slowest-resource child spans to this instrumentation.
1412
+ * If `true` (or a configuration object), resource loads (scripts, stylesheets,
1413
+ * images, fonts, ...) are published as spans
1414
+ * ("interopio.api.instrumentation.resource") with their real timings from the
1415
+ * resource timing buffer, including resources loaded before initialization, a
1416
+ * cacheState attribute ("hit", "revalidated", "network", or "unknown" -
1417
+ * cross-origin resources without a Timing-Allow-Origin header withhold cache
1418
+ * provenance), and the nonzero connection-phase timings (dns/connect/tls/ttfb).
1419
+ * By default fetch/XHR resources are excluded (the request instrumentation
1420
+ * covers them in more detail; see skipRequests), as are telemetry uploads.
1421
+ * Optional histogram/counter metrics can be enabled via the configuration
1422
+ * object. When enabled, the app startup trace defers its slowest-resource
1423
+ * child spans to this instrumentation.
1269
1424
  *
1270
- * @default true
1425
+ * @default false
1271
1426
  */
1272
- instrumentResources?: boolean;
1427
+ instrumentResources?: boolean | ResourceInstrumentationConfig;
1273
1428
 
1274
1429
  /**
1275
1430
  * If `true`, in-page (SPA) navigations - history pushState/replaceState,
@@ -1277,32 +1432,57 @@ export namespace IOInsights {
1277
1432
  * ("interopio.api.instrumentation.navigation") with the sanitized from/to URLs.
1278
1433
  * Same-URL state updates are not reported.
1279
1434
  *
1280
- * @default true
1435
+ * @default false
1281
1436
  */
1282
1437
  instrumentNavigation?: boolean;
1283
1438
 
1439
+ /**
1440
+ * If `true` (or a configuration object), event loop responsiveness is instrumented:
1441
+ * slow input events (Event Timing API) and main-thread-blocking long frames
1442
+ * (Long Animation Frames API, falling back to Long Tasks) are published as spans
1443
+ * ("interopio.api.instrumentation.inputDelay" / ".eventLoopBlocking"), with the
1444
+ * input-delay spans carrying the same element-describing attributes as the
1445
+ * clickstream spans. Optional histogram metrics can be enabled via the
1446
+ * configuration object. Entries recorded before initialization are replayed
1447
+ * from the performance buffers.
1448
+ *
1449
+ * @default false
1450
+ */
1451
+ instrumentEventLoop?: boolean | EventLoopInstrumentationConfig;
1452
+
1284
1453
  /**
1285
1454
  * If `true`, io.Insights will instrument and trace the application startup process
1286
- * 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.
1287
1467
  *
1288
1468
  * @default true
1289
1469
  */
1290
1470
  instrumentAppStartup?: boolean;
1291
1471
 
1292
1472
  /**
1293
- * If `true`, io.Insights will instrument and trace the application loading process
1473
+ * If `true`, io.Insights will instrument and trace the application initialization process
1294
1474
  * automatically.
1295
1475
  *
1296
- * @default true
1476
+ * @default false
1297
1477
  * @deprecated use instrumentAppStartup
1298
1478
  */
1299
1479
  instrumentAppLoad?: boolean;
1300
1480
 
1301
1481
  /**
1302
1482
  * If `true`, io.Insights will instrument and trace the steps of the document load
1303
- * and initialization process automatically
1483
+ * process automatically
1304
1484
  *
1305
- * @default true
1485
+ * @default false
1306
1486
  * @deprecated use instrumentAppStartup
1307
1487
  */
1308
1488
  instrumentDocumentLoad?: boolean;
@@ -1420,12 +1600,30 @@ export namespace IOInsights {
1420
1600
  */
1421
1601
  userJourney?: boolean | "nested" | "sibling" | UserJourneyTraceConfig;
1422
1602
  /**
1423
- * How long after application startup will any traced operations
1424
- * automatically be nested under the application startup trace.
1425
- *
1426
- * @default 3000
1603
+ * If non-zero, how long after application startup will any traced operations
1604
+ * automatically be nested under the application startup trace. The timeout is counted from the moment
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
1427
1611
  */
1428
1612
  startupParentSpanTimeoutMs?: number;
1613
+ /**
1614
+ * When will the application startup span be considered completed,
1615
+ * so that further spans are added under it.
1616
+ * * explicit - when Traces.instance.startupTraceFinished() is called by the application code
1617
+ * * timeout - same as "explicit" OR when startupParentSpanTimeoutMs have elapsed and the DOMContentLoaded event has fired
1618
+ * * loader - same as "explicit" OR when the loading animation of the window has completed
1619
+ * * any - when any of the above conditions are met
1620
+ *
1621
+ * In NodeJS there is no loader signal (or DOM readiness): "loader" behaves as
1622
+ * "any", and the timeout counts alone.
1623
+ *
1624
+ * @default "any"
1625
+ */
1626
+ startupParentSpanEnd?: "explicit" | "timeout" | "loader" | "any";
1429
1627
 
1430
1628
  /**
1431
1629
  * If `true`, the application will create a span with the name `interopio.api.application.close` when
@@ -1813,6 +2011,12 @@ export namespace IOInsights {
1813
2011
  * cross-origin ones - use it in filters whose `context.url` matches origins
1814
2012
  * known to accept the headers (e.g. via Access-Control-Allow-Headers).
1815
2013
  *
2014
+ * Applies to the fetch/XHR instrumentation and to the platform's Electron
2015
+ * net.request instrumentation. Note the main process has no origin, so
2016
+ * `"same-origin"` never matches there - opt platform backends in with
2017
+ * `"all-origins"` filters scoped by `context.url` (there is no CORS preflight
2018
+ * risk for main-process requests).
2019
+ *
1816
2020
  * @default false
1817
2021
  */
1818
2022
  injectOTELHeaders?: false | "same-origin" | "all-origins";
@@ -1918,12 +2122,79 @@ export namespace IOInsights {
1918
2122
  nestEventHandlersEagerly?: boolean;
1919
2123
  }
1920
2124
 
2125
+ export interface ErrorInstrumentationConfig {
2126
+ /**
2127
+ * Whether uncaught errors and unhandled promise rejections are published
2128
+ * as error spans.
2129
+ */
2130
+ enabled: boolean;
2131
+
2132
+ /**
2133
+ * Unless `false`, the pre-init recorder (installEarlyInstrumentation from
2134
+ * @interopio/insights-traces - installed by a window preload script or an
2135
+ * inline snippet before the SDK loads) also captures uncaught errors and
2136
+ * unhandled promise rejections from page start while this instrumentation
2137
+ * is enabled. The recorder reads this configuration from
2138
+ * glue42gd.insights; the buffered records are drained into this
2139
+ * instrumentation's retroactive error spans (with their real timestamps)
2140
+ * at initialization.
2141
+ *
2142
+ * @default true
2143
+ */
2144
+ preInit?: boolean;
2145
+ }
2146
+
1921
2147
  export interface RequestTraceConfig {
1922
2148
  /**
1923
2149
  * Whether fetch and XHR requests will be instrumented with traces automatically.
1924
2150
  */
1925
2151
  enabled: boolean;
1926
2152
 
2153
+ /**
2154
+ * If `true`, the io.Connect Desktop platform also instruments its OWN
2155
+ * main-process HTTP traffic - Electron's net module (net.request and
2156
+ * net.fetch) - at bootstrap, publishing through the platform's io.Insights
2157
+ * instance with the same span and metric shapes as the renderer fetch/XHR
2158
+ * instrumentation (spans under "interopio.api.instrumentation.electronNet").
2159
+ * Read by the platform's bootstrap, which guards its call to
2160
+ * TracesManager.instrumentElectronNet with it; has no effect outside the
2161
+ * platform process.
2162
+ *
2163
+ * @default false
2164
+ */
2165
+ platform?: boolean;
2166
+
2167
+ /**
2168
+ * Unless `false`, the pre-init recorder (installEarlyInstrumentation from
2169
+ * @interopio/insights-traces - installed by a window preload script or an
2170
+ * inline snippet before the SDK loads) also patches fetch and
2171
+ * XMLHttpRequest, so requests issued before the SDK initializes are
2172
+ * recorded and drained into retroactive spans and metric samples at
2173
+ * initialization, while this instrumentation is enabled. The recorder
2174
+ * reads this configuration from glue42gd.insights and derives its
2175
+ * measurement settings from it - request body sizing from
2176
+ * requestBytesMetric, responseBytesMeasurement, download-completion
2177
+ * observation from the total/download duration metrics - so pre-init and
2178
+ * live records measure identically.
2179
+ *
2180
+ * @default true
2181
+ */
2182
+ preInit?: boolean;
2183
+
2184
+ /**
2185
+ * If `false`, no request spans are published - metrics-only mode. The whole
2186
+ * instrumentation flow otherwise runs unchanged: measurement, the duration/size
2187
+ * metrics, error classification, and the pre-init drain (which then produces
2188
+ * metric samples but no retroactive spans). Applies to fetch, XHR, and the
2189
+ * platform's Electron net instrumentation alike. Note that trace header
2190
+ * injection requires a span context, so injectOTELHeaders has no effect in
2191
+ * metrics-only mode. This is a hard switch - span filters cannot re-enable
2192
+ * the spans.
2193
+ *
2194
+ * @default true
2195
+ */
2196
+ trace?: boolean;
2197
+
1927
2198
  /**
1928
2199
  * Whether request instrumentation spans can be root spans of new traces. This allows you
1929
2200
  * to trace requests without any instrumentation in your own code, but may create a large
@@ -2042,6 +2313,31 @@ export namespace IOInsights {
2042
2313
  */
2043
2314
  requestBodyDownloadDurationMetricBuckets?: number[];
2044
2315
 
2316
+ /**
2317
+ * If `true` or a string, effective download throughput (response body bytes over
2318
+ * the download window, in bytes per second) is published as a histogram metric.
2319
+ * If a string value is specified, this will be the name of the metric. Otherwise,
2320
+ * the default "io.insights.http.client.response.download.throughput" is used.
2321
+ *
2322
+ * Derived from the same observation as requestBodyDownloadDurationMetric (same
2323
+ * population and cost caveats), so it contributes samples only for successful
2324
+ * requests with an observable body completion - and only bodies of at least 32KB:
2325
+ * smaller transfers complete within the initial congestion window and would
2326
+ * measure round-trip time, not bandwidth. Per-stream effective throughput:
2327
+ * concurrent transfers share the link.
2328
+ *
2329
+ * @default false
2330
+ */
2331
+ requestBodyDownloadThroughputMetric?: boolean | string;
2332
+
2333
+ /**
2334
+ * Explicit histogram bucket boundaries for requestBodyDownloadThroughputMetric, in
2335
+ * bytes per second, ascending.
2336
+ *
2337
+ * @default [65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456]
2338
+ */
2339
+ requestBodyDownloadThroughputMetricBuckets?: number[];
2340
+
2045
2341
  /**
2046
2342
  * If `true` or a string, the request size in bytes will be published as a histogram metric.
2047
2343
  * If a string value is specified, this will be the name of the metric. Otherwise, the
@@ -2100,6 +2396,464 @@ export namespace IOInsights {
2100
2396
  responseBytesMeasurement?: "content-length" | "raw" | "both";
2101
2397
  }
2102
2398
 
2399
+ /**
2400
+ * Configuration for the event loop responsiveness instrumentation.
2401
+ *
2402
+ * Both measurements are event-driven (no polling): samples record only when the
2403
+ * browser delivers a performance entry, so an idle or smooth application produces
2404
+ * none. Metric export follows the meter's publish interval as usual.
2405
+ */
2406
+ export interface EventLoopInstrumentationConfig {
2407
+ /**
2408
+ * Whether the event loop instrumentation is enabled.
2409
+ */
2410
+ enabled: boolean;
2411
+
2412
+ /**
2413
+ * If `false`, no spans are published - metrics-only mode: the input-delay
2414
+ * and blocking histograms keep reporting. The master switch over
2415
+ * inputDelaySpans/eventLoopBlockingSpans, which refine it per kind.
2416
+ *
2417
+ * @default true
2418
+ */
2419
+ trace?: boolean;
2420
+
2421
+ /**
2422
+ * If `true`, slow input events are published as spans
2423
+ * ("interopio.api.instrumentation.inputDelay") spanning the event's timestamp until
2424
+ * its next paint, with the input delay / processing / presentation phases and the
2425
+ * same element-describing attributes as the clickstream spans (elementIdOrPath,
2426
+ * elementSelectorString, ...).
2427
+ *
2428
+ * @default true
2429
+ */
2430
+ inputDelaySpans?: boolean;
2431
+
2432
+ /**
2433
+ * If `true` or a string, the input event queueing delay (event timestamp until its
2434
+ * handlers started running - the event loop latency a user experienced) is published
2435
+ * as a histogram metric. If a string value is specified, this will be the name of the
2436
+ * metric. Otherwise, the default "io.insights.event_loop.input.delay" is used (no
2437
+ * semantic convention exists for this metric).
2438
+ *
2439
+ * Only events whose total duration reaches inputDelayDurationThresholdMs are surfaced
2440
+ * by the browser, so the distribution describes slow-ish interactions, not all input.
2441
+ *
2442
+ * @default false
2443
+ */
2444
+ inputDelayMetric?: boolean | string;
2445
+
2446
+ /**
2447
+ * Explicit histogram bucket boundaries for inputDelayMetric, in seconds, ascending.
2448
+ * The default brackets the INP "good" (0.2s) and "poor" (0.5s) thresholds.
2449
+ *
2450
+ * @default [0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1]
2451
+ */
2452
+ inputDelayMetricBuckets?: number[];
2453
+
2454
+ /**
2455
+ * The Event Timing API durationThreshold, in milliseconds: only input events whose
2456
+ * total duration (event timestamp until next paint) reaches this value are observed.
2457
+ * The browser floor is 16ms.
2458
+ *
2459
+ * @default 16
2460
+ */
2461
+ inputDelayDurationThresholdMs?: number;
2462
+
2463
+ /**
2464
+ * If `true`, only interaction-eligible events (Event Timing entries with a non-zero
2465
+ * interactionId - discrete interactions like clicks and key presses, the population
2466
+ * INP is computed over) are observed. Disabling it also surfaces continuous events
2467
+ * (pointermoves etc.) that meet the duration threshold.
2468
+ *
2469
+ * @default true
2470
+ */
2471
+ inputDelayInteractionsOnly?: boolean;
2472
+
2473
+ /**
2474
+ * If `true`, main-thread-blocking long frames are published as spans
2475
+ * ("interopio.api.instrumentation.eventLoopBlocking") spanning the frame, with the
2476
+ * blocking duration and (where the Long Animation Frames API is available) the
2477
+ * attribution of the longest script in the frame.
2478
+ *
2479
+ * @default true
2480
+ */
2481
+ eventLoopBlockingSpans?: boolean;
2482
+
2483
+ /**
2484
+ * If `true` or a string, the main-thread blocking time per long frame (the time
2485
+ * beyond the 50ms threshold, per the Long Animation Frames API's blockingDuration;
2486
+ * where only Long Tasks are available, task duration minus 50ms) is published as a
2487
+ * histogram metric. If a string value is specified, this will be the name of the
2488
+ * metric. Otherwise, the default "io.insights.event_loop.blocking.duration" is used
2489
+ * (no semantic convention exists for this metric). Zero-blocking frames contribute
2490
+ * no sample. The "measurement" attribute says which API produced each sample.
2491
+ *
2492
+ * @default false
2493
+ */
2494
+ eventLoopBlockingMetric?: boolean | string;
2495
+
2496
+ /**
2497
+ * Explicit histogram bucket boundaries for eventLoopBlockingMetric, in seconds,
2498
+ * ascending.
2499
+ *
2500
+ * @default [0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5]
2501
+ */
2502
+ eventLoopBlockingMetricBuckets?: number[];
2503
+ }
2504
+
2505
+ /**
2506
+ * Configuration for the resource load instrumentation.
2507
+ *
2508
+ * The phase metrics record nonzero samples only: with connection reuse most
2509
+ * requests have no DNS/TCP/TLS phase at all, and recording those zeros would
2510
+ * drown the distributions. Each histogram therefore answers "when this phase
2511
+ * happened, what did it cost". Cross-origin resources without a
2512
+ * Timing-Allow-Origin header withhold the detailed timings and sizes and
2513
+ * contribute no phase/throughput samples.
2514
+ */
2515
+ export interface ResourceInstrumentationConfig {
2516
+ /**
2517
+ * Whether the resource instrumentation is enabled.
2518
+ */
2519
+ enabled: boolean;
2520
+
2521
+ /**
2522
+ * If `true`, resource timing entries produced by fetch/XMLHttpRequest are
2523
+ * skipped entirely (the request instrumentation covers those requests in more
2524
+ * detail). Set to `false` to also publish resource spans and metric samples
2525
+ * for them - e.g. to include API backends in the connection-phase and
2526
+ * throughput metrics. Beacon entries and telemetry uploads are always skipped.
2527
+ *
2528
+ * @default true
2529
+ */
2530
+ skipRequests?: boolean;
2531
+
2532
+ /**
2533
+ * If `false`, no resource spans are published - metrics-only mode: the
2534
+ * phase/TTFB/throughput histograms and the cache-state counter keep reporting.
2535
+ *
2536
+ * @default true
2537
+ */
2538
+ trace?: boolean;
2539
+
2540
+ /**
2541
+ * If `true` or a string, DNS lookup durations are published as a histogram
2542
+ * metric ("io.insights.resource.dns.duration" unless a string names it).
2543
+ * Nonzero lookups only. Tagged with server.address/server.port and the ALPN protocol.
2544
+ *
2545
+ * @default false
2546
+ */
2547
+ dnsDurationMetric?: boolean | string;
2548
+
2549
+ /**
2550
+ * Explicit histogram bucket boundaries for dnsDurationMetric, in seconds, ascending.
2551
+ *
2552
+ * @default [0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5]
2553
+ */
2554
+ dnsDurationMetricBuckets?: number[];
2555
+
2556
+ /**
2557
+ * If `true` or a string, connection establishment durations (connectStart until
2558
+ * connectEnd - includes the TLS handshake when one happened) are published as a
2559
+ * histogram metric ("io.insights.resource.connect.duration" unless a string
2560
+ * names it). Nonzero connects only.
2561
+ *
2562
+ * @default false
2563
+ */
2564
+ connectDurationMetric?: boolean | string;
2565
+
2566
+ /**
2567
+ * Explicit histogram bucket boundaries for connectDurationMetric, in seconds, ascending.
2568
+ *
2569
+ * @default [0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5]
2570
+ */
2571
+ connectDurationMetricBuckets?: number[];
2572
+
2573
+ /**
2574
+ * If `true` or a string, TLS handshake durations (secureConnectionStart until
2575
+ * connectEnd - a subset of the connect duration) are published as a histogram
2576
+ * metric ("io.insights.resource.tls.duration" unless a string names it).
2577
+ * Secure connections only.
2578
+ *
2579
+ * @default false
2580
+ */
2581
+ tlsDurationMetric?: boolean | string;
2582
+
2583
+ /**
2584
+ * Explicit histogram bucket boundaries for tlsDurationMetric, in seconds, ascending.
2585
+ *
2586
+ * @default [0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5]
2587
+ */
2588
+ tlsDurationMetricBuckets?: number[];
2589
+
2590
+ /**
2591
+ * If `true` or a string, resource time-to-first-byte (requestStart until
2592
+ * responseStart) is published as a histogram metric
2593
+ * ("io.insights.resource.ttfb.duration" unless a string names it). Measures the
2594
+ * asset-serving infrastructure, distinct from the request instrumentation's TTFB
2595
+ * metric which covers fetch/XHR API traffic. Samples only resources that
2596
+ * actually hit the network ("network" and "revalidated" cache states) - cache
2597
+ * hits would contribute disk latency, not server latency.
2598
+ *
2599
+ * @default false
2600
+ */
2601
+ firstByteDurationMetric?: boolean | string;
2602
+
2603
+ /**
2604
+ * Explicit histogram bucket boundaries for firstByteDurationMetric, in seconds, ascending.
2605
+ *
2606
+ * @default [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10]
2607
+ */
2608
+ firstByteDurationMetricBuckets?: number[];
2609
+
2610
+ /**
2611
+ * If `true` or a string, effective download throughput (encodedBodySize over the
2612
+ * responseStart-responseEnd window, in bytes per second) is published as a
2613
+ * histogram metric ("io.insights.resource.download.throughput" unless a string
2614
+ * names it). "network" cache state only, and only bodies of at least
2615
+ * downloadThroughputMinBytes - smaller transfers complete within the initial
2616
+ * congestion window and would measure round-trip time, not bandwidth. Note this
2617
+ * is per-stream effective throughput: concurrent downloads share the link, so it
2618
+ * reflects what a transfer experienced, not link capacity. For a byte-weighted
2619
+ * aggregate, sum sizes and durations at query time instead of averaging rates.
2620
+ *
2621
+ * @default false
2622
+ */
2623
+ downloadThroughputMetric?: boolean | string;
2624
+
2625
+ /**
2626
+ * Explicit histogram bucket boundaries for downloadThroughputMetric, in bytes
2627
+ * per second, ascending.
2628
+ *
2629
+ * @default [65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456]
2630
+ */
2631
+ downloadThroughputMetricBuckets?: number[];
2632
+
2633
+ /**
2634
+ * Minimum encodedBodySize, in bytes, for a resource to contribute a
2635
+ * downloadThroughputMetric sample.
2636
+ *
2637
+ * @default 32768
2638
+ */
2639
+ downloadThroughputMinBytes?: number;
2640
+
2641
+ /**
2642
+ * If `true` or a string, a counter of observed resource loads by cache state is
2643
+ * published ("io.insights.resource.cache.state" unless a string names it),
2644
+ * tagged with cacheState ("hit" / "revalidated" / "network" / "unknown") and
2645
+ * server.address/server.port - the cache hit ratio falls out at query time.
2646
+ *
2647
+ * @default false
2648
+ */
2649
+ cacheStateMetric?: boolean | string;
2650
+ }
2651
+
2652
+ /**
2653
+ * Configuration for the WebSocket instrumentation.
2654
+ */
2655
+ export interface WebSocketInstrumentationConfig {
2656
+ /**
2657
+ * Whether the WebSocket instrumentation is enabled.
2658
+ */
2659
+ enabled: boolean;
2660
+
2661
+ /**
2662
+ * If `true`, the io.Connect Desktop platform also tracks its OWN main-process
2663
+ * WebSocket connections - most importantly its gateway connection, which is
2664
+ * created before the platform's io.Insights initializes: the platform's
2665
+ * bootstrap installs the pre-init recorder (with WebSocket tracking enabled)
2666
+ * early enough that the connection is observed from construction, and the
2667
+ * platform's io.Insights instance adopts it at initialization. Read by the
2668
+ * platform's bootstrap; has no effect outside the platform process.
2669
+ *
2670
+ * @default false
2671
+ */
2672
+ platform?: boolean;
2673
+
2674
+ /**
2675
+ * Unless `false`, the pre-init recorder (installEarlyInstrumentation from
2676
+ * @interopio/insights-traces - installed by a window preload script or an
2677
+ * inline snippet before the SDK loads) tracks WebSocket connections from
2678
+ * page start while this instrumentation is enabled: connections closed
2679
+ * before initialization become retroactive spans, still-open ones are
2680
+ * adopted with spans starting at their true construction time. Opting out
2681
+ * restricts the instrumentation to sockets constructed after
2682
+ * initialization - a socket opened pre-init (the io.Connect gateway
2683
+ * connection, bootstrap-time data feeds) is then unobservable for its
2684
+ * whole lifetime, since WebSockets can only be intercepted at
2685
+ * construction.
2686
+ *
2687
+ * @default true
2688
+ */
2689
+ preInit?: boolean;
2690
+
2691
+ /**
2692
+ * If `true` (the default), each WebSocket connection is published as a span
2693
+ * ("interopio.api.instrumentation.webSocket") covering construction until close,
2694
+ * with connectMs, the negotiated protocol, close code/reason/wasClean, message
2695
+ * and byte totals in both directions, and the connection duration. Abnormal
2696
+ * closures (1006) and connection failures mark the span as ERROR.
2697
+ *
2698
+ * If `false`, no connection spans are published - metrics-only mode: the
2699
+ * message/byte counters and the connect-duration histogram keep reporting.
2700
+ *
2701
+ * @default true
2702
+ */
2703
+ trace?: boolean;
2704
+
2705
+ /**
2706
+ * If `true`, the io.Connect gateway connection is excluded from instrumentation.
2707
+ * By default the gateway socket IS tracked: its connection lifecycle (connects,
2708
+ * drops, close codes, reconnect attempts) is core platform-health telemetry. The
2709
+ * gateway is recognized via the platform-provided connection URL
2710
+ * (window.glue42gd.gwURL, compared by origin and path); where that is unavailable
2711
+ * the flag has no effect - use ignorePattern to exclude infrastructure sockets
2712
+ * explicitly.
2713
+ *
2714
+ * Cost note: with the message/byte metrics enabled, the gateway socket
2715
+ * contributes a sample per gateway message - volume that describes io.Connect
2716
+ * itself rather than the application. Enable those metrics deliberately, or set
2717
+ * this flag to exclude the gateway.
2718
+ *
2719
+ * Sockets explicitly handed to the pre-init recorder via its trackWebSocket hook
2720
+ * (e.g. the core-js gateway transport handing over its own connection) bypass
2721
+ * this flag even when set - explicit handover is a deliberate opt-in.
2722
+ * ignorePattern still applies to them and remains the veto.
2723
+ *
2724
+ * @default false
2725
+ */
2726
+ ignoreGateway?: boolean;
2727
+
2728
+ /**
2729
+ * Optional regex pattern for WebSocket URLs that should be excluded from
2730
+ * instrumentation - e.g. infrastructure sockets beyond the gateway connection
2731
+ * (which can be excluded using ignoreGateway).
2732
+ */
2733
+ ignorePattern?: string;
2734
+
2735
+ /**
2736
+ * Optional regex pattern; if specified, only matching WebSocket URLs are
2737
+ * instrumented.
2738
+ */
2739
+ matchPattern?: string;
2740
+
2741
+ /**
2742
+ * If `true` or a string, a counter of WebSocket messages is published
2743
+ * ("io.insights.websocket.messages" unless a string names it), tagged with
2744
+ * direction ("send" / "receive") and server.address/server.port.
2745
+ *
2746
+ * @default false
2747
+ */
2748
+ messagesMetric?: boolean | string;
2749
+
2750
+ /**
2751
+ * If `true` or a string, a counter summing WebSocket payload bytes is published
2752
+ * ("io.insights.websocket.bytes" unless a string names it), tagged with
2753
+ * direction ("send" / "receive") and server.address/server.port.
2754
+ *
2755
+ * @default false
2756
+ */
2757
+ bytesMetric?: boolean | string;
2758
+
2759
+ /**
2760
+ * If `true` or a string, the connection establishment time (construction until
2761
+ * the open event) is published as a histogram metric
2762
+ * ("io.insights.websocket.connect.duration" unless a string names it).
2763
+ * Successful connections only.
2764
+ *
2765
+ * @default false
2766
+ */
2767
+ connectDurationMetric?: boolean | string;
2768
+
2769
+ /**
2770
+ * Explicit histogram bucket boundaries for connectDurationMetric, in seconds, ascending.
2771
+ *
2772
+ * @default [0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10]
2773
+ */
2774
+ connectDurationMetricBuckets?: number[];
2775
+ }
2776
+
2777
+ /**
2778
+ * Configuration for the session-level Web Vitals instrumentation.
2779
+ *
2780
+ * Values are reported when the page becomes hidden: a span with the current
2781
+ * values on each hidden transition where they changed, and (for the metrics)
2782
+ * one terminal sample per page at pagehide - so each session contributes a
2783
+ * single sample per histogram.
2784
+ */
2785
+ export interface WebVitalsInstrumentationConfig {
2786
+ /**
2787
+ * Whether the Web Vitals instrumentation is enabled.
2788
+ */
2789
+ enabled: boolean;
2790
+
2791
+ /**
2792
+ * If `true` (the default), a "interopio.api.instrumentation.webVitals" span
2793
+ * carrying the current CLS/INP/LCP values and the interaction count is published
2794
+ * on each transition to hidden where the values changed since the last report.
2795
+ *
2796
+ * If `false`, no webVitals spans are published - metrics-only mode: the
2797
+ * terminal CLS/INP/LCP samples at pagehide keep reporting.
2798
+ *
2799
+ * @default true
2800
+ */
2801
+ trace?: boolean;
2802
+
2803
+ /**
2804
+ * If `true` or a string, the session's cumulative layout shift is published as a
2805
+ * histogram metric ("io.insights.web_vitals.cls" unless a string names it).
2806
+ * Unitless score, session-window algorithm (shifts without recent input,
2807
+ * windowed at 5s max / 1s gap, the worst window wins).
2808
+ *
2809
+ * @default false
2810
+ */
2811
+ clsMetric?: boolean | string;
2812
+
2813
+ /**
2814
+ * Explicit histogram bucket boundaries for clsMetric (unitless score), ascending.
2815
+ * The default brackets the CLS "good" (0.1) and "poor" (0.25) thresholds.
2816
+ *
2817
+ * @default [0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5]
2818
+ */
2819
+ clsMetricBuckets?: number[];
2820
+
2821
+ /**
2822
+ * If `true` or a string, the session's INP (interaction to next paint) is
2823
+ * published as a histogram metric ("io.insights.web_vitals.inp" unless a string
2824
+ * names it) - the worst interaction latency, moving to a high percentile as the
2825
+ * interaction count grows, per the web-vitals estimation.
2826
+ *
2827
+ * @default false
2828
+ */
2829
+ inpMetric?: boolean | string;
2830
+
2831
+ /**
2832
+ * Explicit histogram bucket boundaries for inpMetric, in seconds, ascending.
2833
+ * The default brackets the INP "good" (0.2s) and "poor" (0.5s) thresholds.
2834
+ *
2835
+ * @default [0.04, 0.1, 0.2, 0.3, 0.5, 0.75, 1, 2.5, 5]
2836
+ */
2837
+ inpMetricBuckets?: number[];
2838
+
2839
+ /**
2840
+ * If `true` or a string, the final largest contentful paint is published as a
2841
+ * histogram metric ("io.insights.web_vitals.lcp" unless a string names it), in
2842
+ * seconds from navigation start.
2843
+ *
2844
+ * @default false
2845
+ */
2846
+ lcpMetric?: boolean | string;
2847
+
2848
+ /**
2849
+ * Explicit histogram bucket boundaries for lcpMetric, in seconds, ascending.
2850
+ * The default brackets the LCP "good" (2.5s) and "poor" (4s) thresholds.
2851
+ *
2852
+ * @default [0.5, 1, 1.5, 2, 2.5, 4, 5, 7.5, 10, 15]
2853
+ */
2854
+ lcpMetricBuckets?: number[];
2855
+ }
2856
+
2103
2857
  /**
2104
2858
  * Configuration for User Journey trace behavior.
2105
2859
  * Controls how significant User Journey milestones are tracked throughout the platform session.
@@ -2256,11 +3010,11 @@ export namespace IOInsights {
2256
3010
  */
2257
3011
  levelCountMetric?: string;
2258
3012
 
2259
- /**
2260
- * How long after application startup will any log entries
2261
- * automatically be associated with the application startup trace.
2262
- */
2263
- startupTraceAssociationTimeoutMs?: number;
3013
+ // /**
3014
+ // * How long after application startup will any log entries
3015
+ // * automatically be associated with the application startup trace.
3016
+ // */
3017
+ // startupTraceAssociationTimeoutMs?: number;
2264
3018
 
2265
3019
  /**
2266
3020
  * If true, use a predefined list of filters for well-known
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/otel",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "io.Insights observability library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",