@atrim/instrument-node 0.7.0-b9eaf74-20260108193056 → 0.7.1-dev.14fdea7.20260108220010
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/package.json +1 -1
- package/target/dist/index.cjs +24 -1
- package/target/dist/index.cjs.map +1 -1
- package/target/dist/index.js +24 -1
- package/target/dist/index.js.map +1 -1
- package/target/dist/integrations/effect/auto/index.cjs +203 -9
- package/target/dist/integrations/effect/auto/index.cjs.map +1 -1
- package/target/dist/integrations/effect/auto/index.d.cts +83 -2
- package/target/dist/integrations/effect/auto/index.d.ts +83 -2
- package/target/dist/integrations/effect/auto/index.js +201 -10
- package/target/dist/integrations/effect/auto/index.js.map +1 -1
- package/target/dist/integrations/effect/index.cjs +24 -1
- package/target/dist/integrations/effect/index.cjs.map +1 -1
- package/target/dist/integrations/effect/index.js +24 -1
- package/target/dist/integrations/effect/index.js.map +1 -1
package/target/dist/index.js
CHANGED
|
@@ -136,6 +136,27 @@ var HttpFilteringConfigSchema = z.object({
|
|
|
136
136
|
include_urls: z.array(z.string()).optional()
|
|
137
137
|
}).optional()
|
|
138
138
|
});
|
|
139
|
+
var ExporterConfigSchema = z.object({
|
|
140
|
+
// Exporter type: 'otlp' | 'console' | 'none'
|
|
141
|
+
// - 'otlp': Export to OTLP endpoint (production)
|
|
142
|
+
// - 'console': Log spans to console (development)
|
|
143
|
+
// - 'none': No export (disable tracing)
|
|
144
|
+
type: z.enum(["otlp", "console", "none"]).default("otlp"),
|
|
145
|
+
// OTLP endpoint URL (for type: otlp)
|
|
146
|
+
// Defaults to OTEL_EXPORTER_OTLP_ENDPOINT env var or http://localhost:4318
|
|
147
|
+
endpoint: z.string().optional(),
|
|
148
|
+
// Span processor type
|
|
149
|
+
// - 'batch': Batch spans for export (production, lower overhead)
|
|
150
|
+
// - 'simple': Export immediately (development, no batching delay)
|
|
151
|
+
processor: z.enum(["batch", "simple"]).default("batch"),
|
|
152
|
+
// Batch processor settings (for processor: batch)
|
|
153
|
+
batch: z.object({
|
|
154
|
+
// Max time to wait before exporting (milliseconds)
|
|
155
|
+
scheduled_delay_millis: z.number().default(1e3),
|
|
156
|
+
// Max batch size
|
|
157
|
+
max_export_batch_size: z.number().default(100)
|
|
158
|
+
}).optional()
|
|
159
|
+
});
|
|
139
160
|
var InstrumentationConfigSchema = z.object({
|
|
140
161
|
version: z.string(),
|
|
141
162
|
instrumentation: z.object({
|
|
@@ -149,10 +170,12 @@ var InstrumentationConfigSchema = z.object({
|
|
|
149
170
|
// Enable/disable Effect tracing entirely
|
|
150
171
|
// When false, EffectInstrumentationLive returns Layer.empty
|
|
151
172
|
enabled: z.boolean().default(true),
|
|
152
|
-
// Exporter mode:
|
|
173
|
+
// Exporter mode (legacy - use exporter.type instead):
|
|
153
174
|
// - "unified": Use global TracerProvider from Node SDK (recommended, enables filtering)
|
|
154
175
|
// - "standalone": Use Effect's own OTLP exporter (bypasses Node SDK filtering)
|
|
155
176
|
exporter: z.enum(["unified", "standalone"]).default("unified"),
|
|
177
|
+
// Exporter configuration (for auto-instrumentation)
|
|
178
|
+
exporter_config: ExporterConfigSchema.optional(),
|
|
156
179
|
auto_extract_metadata: z.boolean(),
|
|
157
180
|
auto_isolation: AutoIsolationConfigSchema.optional(),
|
|
158
181
|
// Auto-instrumentation: automatic tracing of all Effect fibers
|