@interopio/otel 0.0.180 → 0.0.182

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/builder.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Container } from "./container";
2
2
  import { IOInsights } from "../insights";
3
- export declare class Builder {
3
+ export declare class Builder implements IOInsights.APIBuilder {
4
4
  logger: IOInsights.Logger;
5
5
  settings?: Partial<IOInsights.Settings>;
6
6
  metricsBuilder?: IOInsights.MetricsManagerBuilder;
package/dist/index.d.ts CHANGED
@@ -142,9 +142,3 @@ declare enum SpanStatusCode {
142
142
  ERROR = 2
143
143
  }
144
144
  export { SpanStatusCode };
145
- export interface SpanStatus {
146
- /** The status code of this message. */
147
- code: SpanStatusCode;
148
- /** A developer-facing error message. */
149
- message?: string;
150
- }
package/insights.d.ts CHANGED
@@ -38,7 +38,6 @@ import {
38
38
  } from "@opentelemetry/sdk-logs";
39
39
  import { type MetricReader, type PeriodicExportingMetricReaderOptions, type PushMetricExporter } from "@opentelemetry/sdk-metrics";
40
40
  import { type OTLPMetricExporterOptions } from "@opentelemetry/exporter-metrics-otlp-http";
41
- import { SpanStatus } from "./src";
42
41
 
43
42
  /**
44
43
  * @docname Insights
@@ -64,6 +63,63 @@ export namespace IOInsights {
64
63
  logs: LogsManager;
65
64
  }
66
65
 
66
+ /**
67
+ * Builder interface for constructing the IO.Insights API.
68
+ */
69
+ export interface APIBuilder {
70
+ /**
71
+ * Logger instance used by the builder and child managers.
72
+ */
73
+ logger: Logger;
74
+
75
+ /**
76
+ * Settings configuration for the API.
77
+ */
78
+ settings?: Partial<Settings>;
79
+
80
+ /**
81
+ * Metrics manager builder instance.
82
+ */
83
+ metricsBuilder?: MetricsManagerBuilder;
84
+
85
+ /**
86
+ * Traces manager builder instance.
87
+ */
88
+ tracesBuilder?: TracesManagerBuilder;
89
+
90
+ /**
91
+ * Sets the logger to be used by the observability system.
92
+ * @param logger - The logger implementation to use
93
+ * @returns The builder instance for method chaining
94
+ */
95
+ withLogger(logger: Logger): this;
96
+
97
+ /**
98
+ * Sets the configuration settings for the observability system.
99
+ * @param settings - The settings to apply
100
+ * @returns The builder instance for method chaining
101
+ */
102
+ withSettings(settings: Partial<Settings>): this;
103
+
104
+ /**
105
+ * Initializes the metrics manager builder.
106
+ * @returns The metrics manager builder for further configuration
107
+ */
108
+ withMetrics(): MetricsManagerBuilder;
109
+
110
+ /**
111
+ * Initializes the traces manager builder.
112
+ * @returns The traces manager builder for further configuration
113
+ */
114
+ withTraces(): TracesManagerBuilder;
115
+
116
+ /**
117
+ * Builds and returns the configured API container.
118
+ * @returns The fully configured API container
119
+ */
120
+ build(): API;
121
+ }
122
+
67
123
  /**
68
124
  * Metrics API.
69
125
  */
@@ -1682,4 +1738,27 @@ export namespace IOInsights {
1682
1738
  metrics?: MetricsSettings;
1683
1739
  logs?: LogsSettings;
1684
1740
  }
1741
+
1742
+ export enum SpanStatusCode {
1743
+ /**
1744
+ * The default status.
1745
+ */
1746
+ UNSET = 0,
1747
+ /**
1748
+ * The operation has been validated by an Application developer or
1749
+ * Operator to have completed successfully.
1750
+ */
1751
+ OK = 1,
1752
+ /**
1753
+ * The operation contains an error.
1754
+ */
1755
+ ERROR = 2
1756
+ }
1757
+
1758
+ export interface SpanStatus {
1759
+ /** The status code of this message. */
1760
+ code: SpanStatusCode;
1761
+ /** A developer-facing error message. */
1762
+ message?: string;
1763
+ }
1685
1764
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/otel",
3
- "version": "0.0.180",
3
+ "version": "0.0.182",
4
4
  "description": "io.Insights observability library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",