@interopio/otel 0.0.181 → 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/insights.d.ts CHANGED
@@ -63,6 +63,63 @@ export namespace IOInsights {
63
63
  logs: LogsManager;
64
64
  }
65
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
+
66
123
  /**
67
124
  * Metrics API.
68
125
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interopio/otel",
3
- "version": "0.0.181",
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",