@interopio/otel 0.0.220 → 0.0.221

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 +63 -35
  2. package/package.json +1 -1
package/insights.d.ts CHANGED
@@ -48,6 +48,9 @@ import { deprecate } from "util";
48
48
  * io.Insights API.
49
49
  */
50
50
  export namespace IOInsights {
51
+ /**
52
+ * Entry point into the io.Insights API
53
+ */
51
54
  export interface API extends Manager<Settings> {
52
55
  /**
53
56
  * io.insights Metrics API, often accessible as io.insights.metrics
@@ -63,10 +66,15 @@ export namespace IOInsights {
63
66
  * io.insights Logs API, often accessible as io.insights.logs
64
67
  */
65
68
  logs: LogsManager;
69
+
70
+ /**
71
+ * io.Insights settings
72
+ */
73
+ settings: Settings;
66
74
  }
67
75
 
68
76
  /**
69
- * Builder interface for constructing the IO.Insights API.
77
+ * Builder interface for constructing the io.Insights API.
70
78
  */
71
79
  export interface APIBuilder {
72
80
  /**
@@ -126,6 +134,10 @@ export namespace IOInsights {
126
134
  * Metrics API.
127
135
  */
128
136
  export interface MetricsManager extends Manager<MetricsSettings> {
137
+ /**
138
+ * Metrics settings.
139
+ */
140
+ settings: MetricsSettings;
129
141
  /**
130
142
  * Creates or retrieves a metric by name.
131
143
  *
@@ -358,6 +370,9 @@ export namespace IOInsights {
358
370
  exporterSettings?: (OTLPExporterNodeConfigBase & OTLPMetricExporterOptions);
359
371
  }
360
372
 
373
+ /**
374
+ * Settings describing a metric.
375
+ */
361
376
  export interface MetricSettings {
362
377
  enabled: boolean;
363
378
  type: MetricType;
@@ -530,7 +545,7 @@ export namespace IOInsights {
530
545
  * Indicates whether the metric includes the time to create and load the Workspace Frame App when the workspace is opened in a new frame.
531
546
  */
532
547
  includesFrameCreation?: boolean;
533
- };
548
+ } & Record<string, any>;
534
549
  /**
535
550
  * Whether or not the value for the matching metric will be published.
536
551
  */
@@ -844,6 +859,10 @@ export namespace IOInsights {
844
859
  * Traces API.
845
860
  */
846
861
  export interface TracesManager extends Manager<TracesSettings> {
862
+ /**
863
+ * Traces settings.
864
+ */
865
+ settings: TracesSettings;
847
866
  /**
848
867
  * The tracing state representing the currently active trace and span, if any.
849
868
  */
@@ -1161,19 +1180,19 @@ export namespace IOInsights {
1161
1180
  /**
1162
1181
  * Name of span hit counter metric, set to null to disable.
1163
1182
  *
1164
- * Defaults to 'insights_trace_count'.
1183
+ * @default insights_trace_count
1165
1184
  */
1166
1185
  countMetric?: string;
1167
1186
  /**
1168
1187
  * Name of span duration histogram metric, set to null to disable.
1169
1188
  *
1170
- * Defaults to 'insights_trace_duration'.
1189
+ * @default insights_trace_duration
1171
1190
  */
1172
1191
  durationMetric?: string;
1173
1192
  /**
1174
1193
  * Name of span result counter metric, set to null to disable.
1175
1194
  *
1176
- * Defaults to 'insights_trace_result'.
1195
+ * @default insights_trace_result
1177
1196
  */
1178
1197
  resultMetric?: string;
1179
1198
 
@@ -1354,12 +1373,6 @@ export namespace IOInsights {
1354
1373
  */
1355
1374
  processorSettings?: BatchSpanProcessorBrowserConfig;
1356
1375
 
1357
- /**
1358
- * Configuration for automatic instrumentation of common browser operations.
1359
- * Enables automatic tracing of document load, user interactions, fetch requests, and XHR calls.
1360
- */
1361
- autoInstrumentations?: AutoInstrumentationOptions;
1362
-
1363
1376
  /**
1364
1377
  * Maximum length for parent operation names in span hierarchies.
1365
1378
  */
@@ -1464,6 +1477,7 @@ export namespace IOInsights {
1464
1477
  __interopIOTracePropagationInfo?: PropagationInfo;
1465
1478
  }
1466
1479
 
1480
+ /** @ignore */
1467
1481
  export type PropagationInfoCallback = (
1468
1482
  source: string,
1469
1483
  fullFilteringContext: FilteringContext
@@ -1508,7 +1522,7 @@ export namespace IOInsights {
1508
1522
  /**
1509
1523
  * Whether the span will be created or will be a no-op. See 'Filter'.
1510
1524
  *
1511
- * Defaults to 'true'.
1525
+ * @default true
1512
1526
  */
1513
1527
  enabled?: boolean;
1514
1528
  /**
@@ -1519,34 +1533,34 @@ export namespace IOInsights {
1519
1533
  /**
1520
1534
  * Default span attribute verbosity level. See 'Filter'.
1521
1535
  *
1522
- * Defaults to 'INFO'.
1536
+ * @default INFO
1523
1537
  */
1524
1538
  level?: keyof typeof SpanVerbosity;
1525
1539
  /**
1526
1540
  * Whether the filtering context will be added as span attributes
1527
1541
  * to the span. See 'Filter'.
1528
1542
  *
1529
- * Defaults to 'true'.
1543
+ * @default true
1530
1544
  */
1531
1545
  addContextToTrace?: boolean;
1532
1546
  /**
1533
1547
  * Whether the span's status will be set to OK on completion, if
1534
1548
  * it's still UNSET. See 'Filter'.
1535
1549
  *
1536
- * Defaults to 'false'.
1550
+ * @default false
1537
1551
  */
1538
1552
  autoSetSuccessStatus?: boolean;
1539
1553
  /**
1540
1554
  * Default sampling setting/probability. See 'SamplingSettings'.
1541
1555
  *
1542
- * Defaults to 'true'.
1556
+ * @default true
1543
1557
  */
1544
1558
  sample?: number | boolean;
1545
1559
  /**
1546
1560
  * Whether the span will not inject its propagation info into data
1547
1561
  * transfer objects for span nesting across system boundaries.
1548
1562
  *
1549
- * Defaults to 'false'.
1563
+ * @default false
1550
1564
  */
1551
1565
  disablePropagation?: boolean;
1552
1566
  /**
@@ -1569,7 +1583,7 @@ export namespace IOInsights {
1569
1583
  /**
1570
1584
  * Whether the span will be counted in the insights_trace_count metric. See TracesSettings.countMetric.
1571
1585
  *
1572
- * Defaults to 'false'.
1586
+ * @default false
1573
1587
  */
1574
1588
  countMetric?: boolean;
1575
1589
  /**
@@ -1579,7 +1593,7 @@ export namespace IOInsights {
1579
1593
  /**
1580
1594
  * Whether the span will be counted in the insights_trace_result metric. See TracesSettings.resultMetric.
1581
1595
  *
1582
- * Defaults to 'false'.
1596
+ * @default false
1583
1597
  */
1584
1598
  resultMetric?: boolean;
1585
1599
  /**
@@ -1589,7 +1603,7 @@ export namespace IOInsights {
1589
1603
  /**
1590
1604
  * Whether the span will be counted in the insights_trace_duration metric. See TracesSettings.durationtMetric.
1591
1605
  *
1592
- * Defaults to 'false'.
1606
+ * @default false
1593
1607
  */
1594
1608
  durationMetric?: boolean;
1595
1609
  /**
@@ -1600,7 +1614,7 @@ export namespace IOInsights {
1600
1614
  * Whether the span will be able to start a new trace. If false, it will only
1601
1615
  * be able to be added to an existing trace.
1602
1616
  *
1603
- * Defaults to 'true'.
1617
+ * @default true
1604
1618
  */
1605
1619
  canBeRoot?: boolean;
1606
1620
  /**
@@ -1615,7 +1629,7 @@ export namespace IOInsights {
1615
1629
  * will be forced to be traced, even if their span filter configuration
1616
1630
  * is set to not enabled.
1617
1631
  *
1618
- * Defaults to 'false'.
1632
+ * @default false
1619
1633
  */
1620
1634
  forceChildTracing?: boolean;
1621
1635
  /**
@@ -1669,17 +1683,6 @@ export namespace IOInsights {
1669
1683
  };
1670
1684
  }
1671
1685
 
1672
- // /**
1673
- // * Configuration for automatic instrumentation of common browser operations.
1674
- // * Enables automatic tracing of document load, user interactions, fetch requests, and XHR calls.
1675
- // */
1676
- // export interface AutoInstrumentationOptions {
1677
- // documentLoad?: boolean | DocumentLoadInstrumentationConfig;
1678
- // userInteraction?: boolean | UserInteractionInstrumentationConfig;
1679
- // fetch?: boolean | FetchInstrumentationConfig;
1680
- // xhr?: boolean | XMLHttpRequestInstrumentationConfig;
1681
- // ignoreObservabilityUrls?: boolean;
1682
- // }
1683
1686
  /**
1684
1687
  * Settings used to control the sampling probability of spans.
1685
1688
  */
@@ -1840,6 +1843,14 @@ export namespace IOInsights {
1840
1843
  * Logs API.
1841
1844
  */
1842
1845
  export interface LogsManager extends Manager<LogsSettings> {
1846
+ /**
1847
+ * Logs settings.
1848
+ */
1849
+ settings: LogsSettings;
1850
+
1851
+ /**
1852
+ * Publishes an OTEL log record.
1853
+ */
1843
1854
  emit(logRecord: LogRecord): Promise<void> | null;
1844
1855
  }
1845
1856
  /**
@@ -1929,7 +1940,7 @@ export namespace IOInsights {
1929
1940
  /**
1930
1941
  * Name of log level counter metric, set to null to disable.
1931
1942
  *
1932
- * Defaults to 'insights_log_level_count'.
1943
+ * @default insights_log_level_count
1933
1944
  */
1934
1945
  levelCountMetric?: string;
1935
1946
 
@@ -2077,11 +2088,28 @@ export namespace IOInsights {
2077
2088
  }
2078
2089
 
2079
2090
  export interface Manager<TSettings> {
2091
+ /**
2092
+ * io.Insights settings.
2093
+ */
2080
2094
  settings: TSettings;
2095
+ /**
2096
+ * Whether or not this instance is started.
2097
+ */
2081
2098
  started: boolean;
2082
-
2099
+ /**
2100
+ * Starts publishing data.
2101
+ */
2083
2102
  start(): Promise<void>;
2103
+ /**
2104
+ * Stops publishing data.
2105
+ */
2084
2106
  stop(): Promise<void>;
2107
+
2108
+ /**
2109
+ * Waits for any pending data to be published, with the option to specify a timeout.
2110
+ *
2111
+ * @param timeoutMs maximum time to wait for export
2112
+ */
2085
2113
  waitForFinalExport(timeoutMs?: number): Promise<void>;
2086
2114
  }
2087
2115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/otel",
3
- "version": "0.0.220",
3
+ "version": "0.0.221",
4
4
  "description": "io.Insights observability library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",