@atrim/instrument-node 0.5.2-dev.ac2fbfe.20251221205322 → 0.7.0-14fdea7-20260108225522

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.
@@ -0,0 +1,1136 @@
1
+ import { Data, Context, Effect, Layer, FiberRef, Option, Supervisor, FiberRefs, Exit } from 'effect';
2
+ import { NodeSdk } from '@effect/opentelemetry';
3
+ import { SimpleSpanProcessor, ConsoleSpanExporter, BatchSpanProcessor, BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
4
+ import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
5
+ import { FileSystem } from '@effect/platform/FileSystem';
6
+ import * as HttpClient from '@effect/platform/HttpClient';
7
+ import * as HttpClientRequest from '@effect/platform/HttpClientRequest';
8
+ import { parse } from 'yaml';
9
+ import { z } from 'zod';
10
+ import * as OtelApi from '@opentelemetry/api';
11
+ import { resourceFromAttributes } from '@opentelemetry/resources';
12
+ import { ATTR_SERVICE_VERSION, ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
13
+ import * as path from 'path';
14
+
15
+ var __defProp = Object.defineProperty;
16
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
18
+ var __defProp2 = Object.defineProperty;
19
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
+ var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
21
+ var PatternConfigSchema = z.object({
22
+ pattern: z.string(),
23
+ enabled: z.boolean().optional(),
24
+ description: z.string().optional()
25
+ });
26
+ var AutoIsolationConfigSchema = z.object({
27
+ // Global enable/disable for auto-isolation
28
+ enabled: z.boolean().default(false),
29
+ // Which operators to auto-isolate
30
+ operators: z.object({
31
+ fiberset_run: z.boolean().default(true),
32
+ effect_fork: z.boolean().default(true),
33
+ effect_fork_daemon: z.boolean().default(true),
34
+ effect_fork_in: z.boolean().default(false)
35
+ }).default({}),
36
+ // Virtual parent tracking configuration
37
+ tracking: z.object({
38
+ use_span_links: z.boolean().default(true),
39
+ use_attributes: z.boolean().default(true),
40
+ capture_logical_parent: z.boolean().default(true)
41
+ }).default({}),
42
+ // Span categorization
43
+ attributes: z.object({
44
+ category: z.string().default("background_task"),
45
+ add_metadata: z.boolean().default(true)
46
+ }).default({})
47
+ });
48
+ var SpanNamingRuleSchema = z.object({
49
+ // Match criteria (all specified criteria must match)
50
+ match: z.object({
51
+ // Regex pattern to match file path
52
+ file: z.string().optional(),
53
+ // Regex pattern to match function name
54
+ function: z.string().optional(),
55
+ // Regex pattern to match module name
56
+ module: z.string().optional()
57
+ }),
58
+ // Span name template with variables:
59
+ // {fiber_id} - Fiber ID
60
+ // {function} - Function name
61
+ // {module} - Module name
62
+ // {file} - File path
63
+ // {line} - Line number
64
+ // {operator} - Effect operator (gen, all, forEach, etc.)
65
+ // {match:field:N} - Captured regex group from match
66
+ name: z.string()
67
+ });
68
+ var AutoInstrumentationConfigSchema = z.object({
69
+ // Enable/disable auto-instrumentation
70
+ enabled: z.boolean().default(false),
71
+ // Tracing granularity
72
+ // - 'fiber': Trace at fiber creation (recommended, lower overhead)
73
+ // - 'operator': Trace each Effect operator (higher granularity, more overhead)
74
+ granularity: z.enum(["fiber", "operator"]).default("fiber"),
75
+ // Smart span naming configuration
76
+ span_naming: z.object({
77
+ // Default span name template when no rules match
78
+ default: z.string().default("effect.fiber.{fiber_id}"),
79
+ // Infer span names from source code (requires stack trace parsing)
80
+ // Adds ~50-100μs overhead per fiber
81
+ infer_from_source: z.boolean().default(true),
82
+ // Naming rules (first match wins)
83
+ rules: z.array(SpanNamingRuleSchema).default([])
84
+ }).default({}),
85
+ // Pattern-based filtering
86
+ filter: z.object({
87
+ // Only trace spans matching these patterns (empty = trace all)
88
+ include: z.array(z.string()).default([]),
89
+ // Never trace spans matching these patterns
90
+ exclude: z.array(z.string()).default([])
91
+ }).default({}),
92
+ // Performance controls
93
+ performance: z.object({
94
+ // Sample rate (0.0 - 1.0)
95
+ sampling_rate: z.number().min(0).max(1).default(1),
96
+ // Skip fibers shorter than this duration (e.g., "10ms", "100 millis")
97
+ min_duration: z.string().default("0ms"),
98
+ // Maximum concurrent traced fibers (0 = unlimited)
99
+ max_concurrent: z.number().default(0)
100
+ }).default({}),
101
+ // Automatic metadata extraction
102
+ metadata: z.object({
103
+ // Extract Effect fiber information
104
+ fiber_info: z.boolean().default(true),
105
+ // Extract source location (file:line)
106
+ source_location: z.boolean().default(true),
107
+ // Extract parent fiber information
108
+ parent_fiber: z.boolean().default(true)
109
+ }).default({})
110
+ });
111
+ var HttpFilteringConfigSchema = z.object({
112
+ // Patterns to ignore for outgoing HTTP requests (string patterns only in YAML)
113
+ ignore_outgoing_urls: z.array(z.string()).optional(),
114
+ // Patterns to ignore for incoming HTTP requests (string patterns only in YAML)
115
+ ignore_incoming_paths: z.array(z.string()).optional(),
116
+ // Require parent span for outgoing requests (prevents root spans for HTTP calls)
117
+ require_parent_for_outgoing_spans: z.boolean().optional(),
118
+ // Trace context propagation configuration
119
+ // Controls which cross-origin requests receive W3C Trace Context headers (traceparent, tracestate)
120
+ propagate_trace_context: z.object({
121
+ // Strategy for trace propagation
122
+ // - "all": Propagate to all cross-origin requests (may cause CORS errors)
123
+ // - "none": Never propagate trace headers
124
+ // - "same-origin": Only propagate to same-origin requests (default, safe)
125
+ // - "patterns": Propagate based on include_urls patterns
126
+ strategy: z.enum(["all", "none", "same-origin", "patterns"]).default("same-origin"),
127
+ // URL patterns to include when strategy is "patterns"
128
+ // Supports regex patterns (e.g., "^https://api\\.myapp\\.com")
129
+ include_urls: z.array(z.string()).optional()
130
+ }).optional()
131
+ });
132
+ var ExporterConfigSchema = z.object({
133
+ // Exporter type: 'otlp' | 'console' | 'none'
134
+ // - 'otlp': Export to OTLP endpoint (production)
135
+ // - 'console': Log spans to console (development)
136
+ // - 'none': No export (disable tracing)
137
+ type: z.enum(["otlp", "console", "none"]).default("otlp"),
138
+ // OTLP endpoint URL (for type: otlp)
139
+ // Defaults to OTEL_EXPORTER_OTLP_ENDPOINT env var or http://localhost:4318
140
+ endpoint: z.string().optional(),
141
+ // Custom headers to send with OTLP requests (for type: otlp)
142
+ // Useful for authentication (x-api-key, Authorization, etc.)
143
+ headers: z.record(z.string()).optional(),
144
+ // Span processor type
145
+ // - 'batch': Batch spans for export (production, lower overhead)
146
+ // - 'simple': Export immediately (development, no batching delay)
147
+ processor: z.enum(["batch", "simple"]).default("batch"),
148
+ // Batch processor settings (for processor: batch)
149
+ batch: z.object({
150
+ // Max time to wait before exporting (milliseconds)
151
+ scheduled_delay_millis: z.number().default(1e3),
152
+ // Max batch size
153
+ max_export_batch_size: z.number().default(100)
154
+ }).optional()
155
+ });
156
+ var InstrumentationConfigSchema = z.object({
157
+ version: z.string(),
158
+ instrumentation: z.object({
159
+ enabled: z.boolean(),
160
+ description: z.string().optional(),
161
+ logging: z.enum(["on", "off", "minimal"]).optional().default("on"),
162
+ instrument_patterns: z.array(PatternConfigSchema),
163
+ ignore_patterns: z.array(PatternConfigSchema)
164
+ }),
165
+ effect: z.object({
166
+ // Enable/disable Effect tracing entirely
167
+ // When false, EffectInstrumentationLive returns Layer.empty
168
+ enabled: z.boolean().default(true),
169
+ // Exporter mode (legacy - use exporter.type instead):
170
+ // - "unified": Use global TracerProvider from Node SDK (recommended, enables filtering)
171
+ // - "standalone": Use Effect's own OTLP exporter (bypasses Node SDK filtering)
172
+ exporter: z.enum(["unified", "standalone"]).default("unified"),
173
+ // Exporter configuration (for auto-instrumentation)
174
+ exporter_config: ExporterConfigSchema.optional(),
175
+ auto_extract_metadata: z.boolean(),
176
+ auto_isolation: AutoIsolationConfigSchema.optional(),
177
+ // Auto-instrumentation: automatic tracing of all Effect fibers
178
+ auto_instrumentation: AutoInstrumentationConfigSchema.optional()
179
+ }).optional(),
180
+ http: HttpFilteringConfigSchema.optional()
181
+ });
182
+ var defaultConfig = {
183
+ version: "1.0",
184
+ instrumentation: {
185
+ enabled: true,
186
+ logging: "on",
187
+ description: "Default instrumentation configuration",
188
+ instrument_patterns: [
189
+ { pattern: "^app\\.", enabled: true, description: "Application operations" },
190
+ { pattern: "^http\\.server\\.", enabled: true, description: "HTTP server operations" },
191
+ { pattern: "^http\\.client\\.", enabled: true, description: "HTTP client operations" }
192
+ ],
193
+ ignore_patterns: [
194
+ { pattern: "^test\\.", description: "Test utilities" },
195
+ { pattern: "^internal\\.", description: "Internal operations" },
196
+ { pattern: "^health\\.", description: "Health checks" }
197
+ ]
198
+ },
199
+ effect: {
200
+ enabled: true,
201
+ exporter: "unified",
202
+ auto_extract_metadata: true
203
+ }
204
+ };
205
+ function parseAndValidateConfig(content) {
206
+ let parsed;
207
+ if (typeof content === "string") {
208
+ parsed = parse(content);
209
+ } else {
210
+ parsed = content;
211
+ }
212
+ return InstrumentationConfigSchema.parse(parsed);
213
+ }
214
+ (class extends Data.TaggedError("ConfigError") {
215
+ get message() {
216
+ return this.reason;
217
+ }
218
+ });
219
+ var ConfigUrlError = class extends Data.TaggedError("ConfigUrlError") {
220
+ get message() {
221
+ return this.reason;
222
+ }
223
+ };
224
+ var ConfigValidationError = class extends Data.TaggedError("ConfigValidationError") {
225
+ get message() {
226
+ return this.reason;
227
+ }
228
+ };
229
+ var ConfigFileError = class extends Data.TaggedError("ConfigFileError") {
230
+ get message() {
231
+ return this.reason;
232
+ }
233
+ };
234
+ (class extends Data.TaggedError("ServiceDetectionError") {
235
+ get message() {
236
+ return this.reason;
237
+ }
238
+ });
239
+ (class extends Data.TaggedError("InitializationError") {
240
+ get message() {
241
+ return this.reason;
242
+ }
243
+ });
244
+ (class extends Data.TaggedError("ExportError") {
245
+ get message() {
246
+ return this.reason;
247
+ }
248
+ });
249
+ (class extends Data.TaggedError("ShutdownError") {
250
+ get message() {
251
+ return this.reason;
252
+ }
253
+ });
254
+ var SECURITY_DEFAULTS = {
255
+ maxConfigSize: 1e6,
256
+ // 1MB
257
+ requestTimeout: 5e3
258
+ // 5 seconds
259
+ };
260
+ var ConfigLoader = class extends Context.Tag("ConfigLoader")() {
261
+ };
262
+ var parseYamlContent = (content, uri) => Effect.gen(function* () {
263
+ const parsed = yield* Effect.try({
264
+ try: () => parse(content),
265
+ catch: (error) => new ConfigValidationError({
266
+ reason: uri ? `Failed to parse YAML from ${uri}` : "Failed to parse YAML",
267
+ cause: error
268
+ })
269
+ });
270
+ return yield* Effect.try({
271
+ try: () => InstrumentationConfigSchema.parse(parsed),
272
+ catch: (error) => new ConfigValidationError({
273
+ reason: uri ? `Invalid configuration schema from ${uri}` : "Invalid configuration schema",
274
+ cause: error
275
+ })
276
+ });
277
+ });
278
+ var loadFromFileWithFs = (fs, path2, uri) => Effect.gen(function* () {
279
+ const content = yield* fs.readFileString(path2).pipe(
280
+ Effect.mapError(
281
+ (error) => new ConfigFileError({
282
+ reason: `Failed to read config file at ${uri}`,
283
+ cause: error
284
+ })
285
+ )
286
+ );
287
+ if (content.length > SECURITY_DEFAULTS.maxConfigSize) {
288
+ return yield* Effect.fail(
289
+ new ConfigFileError({
290
+ reason: `Config file exceeds maximum size of ${SECURITY_DEFAULTS.maxConfigSize} bytes`
291
+ })
292
+ );
293
+ }
294
+ return yield* parseYamlContent(content, uri);
295
+ });
296
+ var loadFromHttpWithClient = (client, url) => Effect.scoped(
297
+ Effect.gen(function* () {
298
+ if (url.startsWith("http://")) {
299
+ return yield* Effect.fail(
300
+ new ConfigUrlError({
301
+ reason: "Insecure protocol: only HTTPS URLs are allowed"
302
+ })
303
+ );
304
+ }
305
+ const request = HttpClientRequest.get(url).pipe(
306
+ HttpClientRequest.setHeaders({
307
+ Accept: "application/yaml, text/yaml, application/x-yaml"
308
+ })
309
+ );
310
+ const response = yield* client.execute(request).pipe(
311
+ Effect.timeout(`${SECURITY_DEFAULTS.requestTimeout} millis`),
312
+ Effect.mapError((error) => {
313
+ if (error._tag === "TimeoutException") {
314
+ return new ConfigUrlError({
315
+ reason: `Config fetch timeout after ${SECURITY_DEFAULTS.requestTimeout}ms from ${url}`
316
+ });
317
+ }
318
+ return new ConfigUrlError({
319
+ reason: `Failed to load config from URL: ${url}`,
320
+ cause: error
321
+ });
322
+ })
323
+ );
324
+ if (response.status >= 400) {
325
+ return yield* Effect.fail(
326
+ new ConfigUrlError({
327
+ reason: `HTTP ${response.status} from ${url}`
328
+ })
329
+ );
330
+ }
331
+ const text = yield* response.text.pipe(
332
+ Effect.mapError(
333
+ (error) => new ConfigUrlError({
334
+ reason: `Failed to read response body from ${url}`,
335
+ cause: error
336
+ })
337
+ )
338
+ );
339
+ if (text.length > SECURITY_DEFAULTS.maxConfigSize) {
340
+ return yield* Effect.fail(
341
+ new ConfigUrlError({
342
+ reason: `Config exceeds maximum size of ${SECURITY_DEFAULTS.maxConfigSize} bytes`
343
+ })
344
+ );
345
+ }
346
+ return yield* parseYamlContent(text, url);
347
+ })
348
+ );
349
+ var makeConfigLoader = Effect.gen(function* () {
350
+ const fs = yield* Effect.serviceOption(FileSystem);
351
+ const http = yield* HttpClient.HttpClient;
352
+ const loadFromUriUncached = (uri) => Effect.gen(function* () {
353
+ if (uri.startsWith("file://")) {
354
+ const path2 = uri.slice(7);
355
+ if (fs._tag === "None") {
356
+ return yield* Effect.fail(
357
+ new ConfigFileError({
358
+ reason: "FileSystem not available (browser environment?)",
359
+ cause: { uri }
360
+ })
361
+ );
362
+ }
363
+ return yield* loadFromFileWithFs(fs.value, path2, uri);
364
+ }
365
+ if (uri.startsWith("http://") || uri.startsWith("https://")) {
366
+ return yield* loadFromHttpWithClient(http, uri);
367
+ }
368
+ if (fs._tag === "Some") {
369
+ return yield* loadFromFileWithFs(fs.value, uri, uri);
370
+ } else {
371
+ return yield* loadFromHttpWithClient(http, uri);
372
+ }
373
+ });
374
+ const loadFromUriCached = yield* Effect.cachedFunction(loadFromUriUncached);
375
+ return ConfigLoader.of({
376
+ loadFromUri: loadFromUriCached,
377
+ loadFromInline: (content) => Effect.gen(function* () {
378
+ if (typeof content === "string") {
379
+ return yield* parseYamlContent(content);
380
+ }
381
+ return yield* Effect.try({
382
+ try: () => InstrumentationConfigSchema.parse(content),
383
+ catch: (error) => new ConfigValidationError({
384
+ reason: "Invalid configuration schema",
385
+ cause: error
386
+ })
387
+ });
388
+ })
389
+ });
390
+ });
391
+ Layer.effect(ConfigLoader, makeConfigLoader);
392
+ var Logger = class {
393
+ constructor() {
394
+ __publicField2(this, "level", "on");
395
+ __publicField2(this, "hasLoggedMinimal", false);
396
+ }
397
+ /**
398
+ * Set the logging level
399
+ */
400
+ setLevel(level) {
401
+ this.level = level;
402
+ this.hasLoggedMinimal = false;
403
+ }
404
+ /**
405
+ * Get the current logging level
406
+ */
407
+ getLevel() {
408
+ return this.level;
409
+ }
410
+ /**
411
+ * Log a minimal initialization message (only shown once in minimal mode)
412
+ */
413
+ minimal(message) {
414
+ if (this.level === "off") {
415
+ return;
416
+ }
417
+ if (this.level === "minimal" && !this.hasLoggedMinimal) {
418
+ console.log(message);
419
+ this.hasLoggedMinimal = true;
420
+ return;
421
+ }
422
+ if (this.level === "on") {
423
+ console.log(message);
424
+ }
425
+ }
426
+ /**
427
+ * Log an informational message
428
+ */
429
+ log(...args) {
430
+ if (this.level === "on") {
431
+ console.log(...args);
432
+ }
433
+ }
434
+ /**
435
+ * Log a warning message (shown in minimal mode)
436
+ */
437
+ warn(...args) {
438
+ if (this.level !== "off") {
439
+ console.warn(...args);
440
+ }
441
+ }
442
+ /**
443
+ * Log an error message (shown in minimal mode)
444
+ */
445
+ error(...args) {
446
+ if (this.level !== "off") {
447
+ console.error(...args);
448
+ }
449
+ }
450
+ /**
451
+ * Check if full logging is enabled
452
+ */
453
+ isEnabled() {
454
+ return this.level === "on";
455
+ }
456
+ /**
457
+ * Check if minimal logging is enabled
458
+ */
459
+ isMinimal() {
460
+ return this.level === "minimal";
461
+ }
462
+ /**
463
+ * Check if logging is completely disabled
464
+ */
465
+ isDisabled() {
466
+ return this.level === "off";
467
+ }
468
+ };
469
+ var logger = new Logger();
470
+ async function loadFromFile(filePath) {
471
+ const { readFile } = await import('fs/promises');
472
+ const content = await readFile(filePath, "utf-8");
473
+ return parseAndValidateConfig(content);
474
+ }
475
+ async function loadFromUrl(url) {
476
+ const response = await fetch(url);
477
+ if (!response.ok) {
478
+ throw new Error(`Failed to fetch config from ${url}: ${response.statusText}`);
479
+ }
480
+ const content = await response.text();
481
+ return parseAndValidateConfig(content);
482
+ }
483
+ async function loadConfig(uri, _options) {
484
+ if (uri.startsWith("http://") || uri.startsWith("https://")) {
485
+ return loadFromUrl(uri);
486
+ }
487
+ if (uri.startsWith("file://")) {
488
+ const filePath = uri.slice(7);
489
+ return loadFromFile(filePath);
490
+ }
491
+ return loadFromFile(uri);
492
+ }
493
+ async function loadConfigFromInline(content) {
494
+ return parseAndValidateConfig(content);
495
+ }
496
+ async function loadConfigWithOptions(options = {}) {
497
+ if (options.config) {
498
+ return loadConfigFromInline(options.config);
499
+ }
500
+ const envConfigPath = process.env.ATRIM_INSTRUMENTATION_CONFIG;
501
+ if (envConfigPath) {
502
+ return loadConfig(envConfigPath);
503
+ }
504
+ if (options.configUrl) {
505
+ return loadConfig(options.configUrl);
506
+ }
507
+ if (options.configPath) {
508
+ return loadConfig(options.configPath);
509
+ }
510
+ const { existsSync } = await import('fs');
511
+ const { join } = await import('path');
512
+ const defaultPath = join(process.cwd(), "instrumentation.yaml");
513
+ if (existsSync(defaultPath)) {
514
+ return loadConfig(defaultPath);
515
+ }
516
+ return defaultConfig;
517
+ }
518
+
519
+ // src/integrations/effect/auto/config.ts
520
+ var defaultAutoTracingConfig = {
521
+ enabled: false,
522
+ granularity: "fiber",
523
+ span_naming: {
524
+ default: "effect.fiber.{fiber_id}",
525
+ infer_from_source: true,
526
+ rules: []
527
+ },
528
+ filter: {
529
+ include: [],
530
+ exclude: []
531
+ },
532
+ performance: {
533
+ sampling_rate: 1,
534
+ min_duration: "0ms",
535
+ max_concurrent: 0
536
+ },
537
+ metadata: {
538
+ fiber_info: true,
539
+ source_location: true,
540
+ parent_fiber: true
541
+ }
542
+ };
543
+ var AutoTracingConfig = class extends Context.Tag("AutoTracingConfig")() {
544
+ };
545
+ var loadAutoTracingConfig = (options) => Effect.gen(function* () {
546
+ const config = yield* Effect.tryPromise({
547
+ try: () => loadConfigWithOptions(options),
548
+ catch: (error) => {
549
+ logger.log(`@atrim/auto-trace: Failed to load config: ${error}`);
550
+ return error;
551
+ }
552
+ }).pipe(Effect.catchAll(() => Effect.succeed(null)));
553
+ if (!config) {
554
+ logger.log("@atrim/auto-trace: No config found, using defaults");
555
+ return defaultAutoTracingConfig;
556
+ }
557
+ const autoConfig = config.effect?.auto_instrumentation;
558
+ if (!autoConfig) {
559
+ logger.log("@atrim/auto-trace: No auto_instrumentation config, using defaults");
560
+ return defaultAutoTracingConfig;
561
+ }
562
+ const parsed = AutoInstrumentationConfigSchema.safeParse(autoConfig);
563
+ if (!parsed.success) {
564
+ logger.log(`@atrim/auto-trace: Invalid config, using defaults: ${parsed.error.message}`);
565
+ return defaultAutoTracingConfig;
566
+ }
567
+ logger.log("@atrim/auto-trace: Loaded config from instrumentation.yaml");
568
+ return parsed.data;
569
+ });
570
+ var loadAutoTracingConfigSync = () => {
571
+ return defaultAutoTracingConfig;
572
+ };
573
+ var AutoTracingConfigLive = Layer.effect(AutoTracingConfig, loadAutoTracingConfig());
574
+ var AutoTracingConfigLayer = (config) => Layer.succeed(AutoTracingConfig, config);
575
+ var loadFullConfig = (options) => Effect.gen(function* () {
576
+ const config = yield* Effect.tryPromise({
577
+ try: () => loadConfigWithOptions(options),
578
+ catch: (error) => {
579
+ logger.log(`@atrim/auto-trace: Failed to load config: ${error}`);
580
+ return error;
581
+ }
582
+ }).pipe(Effect.catchAll(() => Effect.succeed(null)));
583
+ if (!config) {
584
+ logger.log("@atrim/auto-trace: No config found, using defaults");
585
+ return defaultConfig;
586
+ }
587
+ return config;
588
+ });
589
+
590
+ // src/integrations/effect/auto/effect-tracing.ts
591
+ var createEffectTracingLayer = () => {
592
+ return Layer.unwrapEffect(
593
+ Effect.gen(function* () {
594
+ const config = yield* loadFullConfig();
595
+ const serviceName = process.env.OTEL_SERVICE_NAME || "effect-service";
596
+ const serviceVersion = process.env.npm_package_version || "1.0.0";
597
+ const exporterConfig = config.effect?.exporter_config ?? {
598
+ type: "otlp",
599
+ processor: "batch"
600
+ };
601
+ logger.log("@atrim/auto-trace: Effect-native tracing enabled");
602
+ logger.log(` Service: ${serviceName}`);
603
+ logger.log(` Exporter: ${exporterConfig.type}`);
604
+ if (exporterConfig.type === "none") {
605
+ logger.log('@atrim/auto-trace: Exporter type is "none", using empty layer');
606
+ return Layer.empty;
607
+ }
608
+ const createSpanProcessor = () => {
609
+ if (exporterConfig.type === "console") {
610
+ logger.log("@atrim/auto-trace: Using ConsoleSpanExporter with SimpleSpanProcessor");
611
+ return new SimpleSpanProcessor(new ConsoleSpanExporter());
612
+ }
613
+ const endpoint = exporterConfig.endpoint || process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4318";
614
+ logger.log(`@atrim/auto-trace: Using OTLPTraceExporter (${endpoint})`);
615
+ const otlpConfig = {
616
+ url: `${endpoint}/v1/traces`
617
+ };
618
+ if (exporterConfig.headers) {
619
+ otlpConfig.headers = exporterConfig.headers;
620
+ logger.log(`@atrim/auto-trace: Using custom headers: ${Object.keys(exporterConfig.headers).join(", ")}`);
621
+ }
622
+ const exporter = new OTLPTraceExporter(otlpConfig);
623
+ if (exporterConfig.processor === "simple") {
624
+ logger.log("@atrim/auto-trace: Using SimpleSpanProcessor");
625
+ return new SimpleSpanProcessor(exporter);
626
+ }
627
+ const batchConfig = exporterConfig.batch ?? {
628
+ scheduled_delay_millis: 1e3,
629
+ max_export_batch_size: 100
630
+ };
631
+ logger.log("@atrim/auto-trace: Using BatchSpanProcessor");
632
+ return new BatchSpanProcessor(exporter, {
633
+ scheduledDelayMillis: batchConfig.scheduled_delay_millis,
634
+ maxExportBatchSize: batchConfig.max_export_batch_size
635
+ });
636
+ };
637
+ const sdkLayer = NodeSdk.layer(() => ({
638
+ resource: {
639
+ serviceName,
640
+ serviceVersion
641
+ },
642
+ spanProcessor: createSpanProcessor()
643
+ }));
644
+ logger.log("@atrim/auto-trace: NodeSdk layer created - HTTP requests will be auto-traced");
645
+ return Layer.discard(sdkLayer);
646
+ })
647
+ );
648
+ };
649
+ var EffectTracingLive = createEffectTracingLayer();
650
+ var compiledRulesCache = /* @__PURE__ */ new WeakMap();
651
+ function compileNamingRules(rules) {
652
+ const cached = compiledRulesCache.get(rules);
653
+ if (cached) return cached;
654
+ const compiled = rules.map((rule) => ({
655
+ original: rule,
656
+ filePattern: rule.match.file ? new RegExp(rule.match.file) : void 0,
657
+ functionPattern: rule.match.function ? new RegExp(rule.match.function) : void 0,
658
+ modulePattern: rule.match.module ? new RegExp(rule.match.module) : void 0
659
+ }));
660
+ compiledRulesCache.set(rules, compiled);
661
+ return compiled;
662
+ }
663
+ function extractModuleName(filePath) {
664
+ const basename2 = path.basename(filePath, path.extname(filePath));
665
+ return basename2.replace(/\.(service|controller|handler|util|helper|model|repo|repository)$/i, "").replace(/(Service|Controller|Handler|Util|Helper|Model|Repo|Repository)$/i, "");
666
+ }
667
+ function applyTemplate(template, variables, matchGroups) {
668
+ let result = template;
669
+ for (const [key, value] of Object.entries(variables)) {
670
+ result = result.replace(new RegExp(`\\{${key}\\}`, "g"), value);
671
+ }
672
+ if (matchGroups) {
673
+ result = result.replace(
674
+ /\{match:(\w+):(\d+)\}/g,
675
+ (_fullMatch, field, index) => {
676
+ const groups = matchGroups.get(field);
677
+ const idx = parseInt(index, 10);
678
+ if (groups && groups[idx]) {
679
+ return groups[idx];
680
+ }
681
+ return "";
682
+ }
683
+ );
684
+ }
685
+ return result;
686
+ }
687
+ function findMatchingRule(sourceInfo, config) {
688
+ const rules = config.span_naming?.rules;
689
+ if (!rules || rules.length === 0) return void 0;
690
+ const compiledRules = compileNamingRules(rules);
691
+ for (const rule of compiledRules) {
692
+ const matchGroups = /* @__PURE__ */ new Map();
693
+ let allMatched = true;
694
+ if (rule.filePattern) {
695
+ if (sourceInfo?.file) {
696
+ const match = sourceInfo.file.match(rule.filePattern);
697
+ if (match) {
698
+ matchGroups.set("file", match.slice(1));
699
+ } else {
700
+ allMatched = false;
701
+ }
702
+ } else {
703
+ allMatched = false;
704
+ }
705
+ }
706
+ if (rule.functionPattern && allMatched) {
707
+ if (sourceInfo?.function) {
708
+ const match = sourceInfo.function.match(rule.functionPattern);
709
+ if (match) {
710
+ matchGroups.set("function", match.slice(1));
711
+ } else {
712
+ allMatched = false;
713
+ }
714
+ } else {
715
+ allMatched = false;
716
+ }
717
+ }
718
+ if (rule.modulePattern && allMatched) {
719
+ const moduleName = sourceInfo?.file ? extractModuleName(sourceInfo.file) : "";
720
+ if (moduleName) {
721
+ const match = moduleName.match(rule.modulePattern);
722
+ if (match) {
723
+ matchGroups.set("module", match.slice(1));
724
+ } else {
725
+ allMatched = false;
726
+ }
727
+ } else {
728
+ allMatched = false;
729
+ }
730
+ }
731
+ if (allMatched) {
732
+ return { rule, matchGroups };
733
+ }
734
+ }
735
+ return void 0;
736
+ }
737
+ function inferSpanName(fiberId, sourceInfo, config) {
738
+ const variables = {
739
+ fiber_id: String(fiberId),
740
+ function: sourceInfo?.function || "anonymous",
741
+ module: sourceInfo?.file ? extractModuleName(sourceInfo.file) : "unknown",
742
+ file: sourceInfo?.file || "unknown",
743
+ line: sourceInfo?.line ? String(sourceInfo.line) : "0",
744
+ operator: "gen"
745
+ // Default operator, could be enhanced with more context
746
+ };
747
+ const match = findMatchingRule(sourceInfo, config);
748
+ if (match) {
749
+ return applyTemplate(match.rule.original.name, variables, match.matchGroups);
750
+ }
751
+ const defaultTemplate = config.span_naming?.default || "effect.fiber.{fiber_id}";
752
+ return applyTemplate(defaultTemplate, variables);
753
+ }
754
+ function sanitizeSpanName(name) {
755
+ if (!name) return "effect.fiber.unknown";
756
+ let sanitized = name.replace(/[^a-zA-Z0-9._-]/g, "_");
757
+ sanitized = sanitized.replace(/_+/g, "_");
758
+ sanitized = sanitized.replace(/^_+|_+$/g, "");
759
+ if (!sanitized) return "effect.fiber.unknown";
760
+ if (sanitized.length > 256) {
761
+ sanitized = sanitized.substring(0, 256);
762
+ }
763
+ return sanitized;
764
+ }
765
+
766
+ // src/integrations/effect/auto/supervisor.ts
767
+ var AutoTracingEnabled = FiberRef.unsafeMake(true);
768
+ var AutoTracingSpanName = FiberRef.unsafeMake(Option.none());
769
+ var AutoTracingSupervisor = class extends Supervisor.AbstractSupervisor {
770
+ constructor(config) {
771
+ super();
772
+ this.config = config;
773
+ // WeakMap to associate fibers with their OTel spans
774
+ __publicField(this, "fiberSpans", /* @__PURE__ */ new WeakMap());
775
+ // WeakMap for fiber start times (for min_duration filtering)
776
+ __publicField(this, "fiberStartTimes", /* @__PURE__ */ new WeakMap());
777
+ // OpenTelemetry tracer - lazily initialized
778
+ __publicField(this, "_tracer", null);
779
+ // Compiled filter patterns
780
+ __publicField(this, "includePatterns");
781
+ __publicField(this, "excludePatterns");
782
+ // Active fiber count (for max_concurrent limiting)
783
+ __publicField(this, "activeFiberCount", 0);
784
+ // Root span for parent context (set by withAutoTracing)
785
+ __publicField(this, "_rootSpan", null);
786
+ this.includePatterns = (config.filter?.include || []).map((p) => new RegExp(p));
787
+ this.excludePatterns = (config.filter?.exclude || []).map((p) => new RegExp(p));
788
+ logger.log("@atrim/auto-trace: Supervisor initialized");
789
+ logger.log(` Granularity: ${config.granularity || "fiber"}`);
790
+ logger.log(` Sampling rate: ${config.performance?.sampling_rate ?? 1}`);
791
+ logger.log(` Infer from source: ${config.span_naming?.infer_from_source ?? true}`);
792
+ }
793
+ /**
794
+ * Set the root span for parent context propagation
795
+ */
796
+ setRootSpan(span) {
797
+ this._rootSpan = span;
798
+ }
799
+ /**
800
+ * Get the tracer lazily - this allows time for the NodeSdk layer to register the global provider
801
+ */
802
+ get tracer() {
803
+ if (!this._tracer) {
804
+ this._tracer = OtelApi.trace.getTracer("@atrim/auto-trace", "1.0.0");
805
+ }
806
+ return this._tracer;
807
+ }
808
+ /**
809
+ * Returns the current value (void for this supervisor)
810
+ */
811
+ get value() {
812
+ return Effect.void;
813
+ }
814
+ /**
815
+ * Called when a fiber starts executing
816
+ */
817
+ onStart(_context, _effect, parent, fiber) {
818
+ const fiberRefsValue = fiber.getFiberRefs();
819
+ const enabled = FiberRefs.getOrDefault(fiberRefsValue, AutoTracingEnabled);
820
+ if (!enabled) {
821
+ return;
822
+ }
823
+ const samplingRate = this.config.performance?.sampling_rate ?? 1;
824
+ if (samplingRate < 1 && Math.random() > samplingRate) {
825
+ return;
826
+ }
827
+ const maxConcurrent = this.config.performance?.max_concurrent ?? 0;
828
+ if (maxConcurrent > 0 && this.activeFiberCount >= maxConcurrent) {
829
+ return;
830
+ }
831
+ const nameOverride = FiberRefs.getOrDefault(fiberRefsValue, AutoTracingSpanName);
832
+ const sourceInfo = this.config.span_naming?.infer_from_source ? this.parseStackTrace() : void 0;
833
+ let spanName;
834
+ if (Option.isSome(nameOverride)) {
835
+ spanName = nameOverride.value;
836
+ } else {
837
+ spanName = inferSpanName(fiber.id().id, sourceInfo, this.config);
838
+ }
839
+ if (!this.shouldTrace(spanName)) {
840
+ return;
841
+ }
842
+ let parentContext = OtelApi.ROOT_CONTEXT;
843
+ let parentFiberId;
844
+ if (Option.isSome(parent)) {
845
+ parentFiberId = parent.value.id().id;
846
+ const parentSpan = this.fiberSpans.get(parent.value);
847
+ if (parentSpan) {
848
+ parentContext = OtelApi.trace.setSpan(OtelApi.ROOT_CONTEXT, parentSpan);
849
+ } else if (this._rootSpan) {
850
+ parentContext = OtelApi.trace.setSpan(OtelApi.ROOT_CONTEXT, this._rootSpan);
851
+ }
852
+ } else if (this._rootSpan) {
853
+ parentContext = OtelApi.trace.setSpan(OtelApi.ROOT_CONTEXT, this._rootSpan);
854
+ }
855
+ const span = this.tracer.startSpan(
856
+ spanName,
857
+ {
858
+ kind: OtelApi.SpanKind.INTERNAL,
859
+ attributes: this.getInitialAttributes(fiber, sourceInfo, parentFiberId)
860
+ },
861
+ parentContext
862
+ );
863
+ this.fiberSpans.set(fiber, span);
864
+ this.fiberStartTimes.set(fiber, process.hrtime.bigint());
865
+ this.activeFiberCount++;
866
+ }
867
+ /**
868
+ * Called when a fiber completes (success or failure)
869
+ */
870
+ onEnd(exit, fiber) {
871
+ const span = this.fiberSpans.get(fiber);
872
+ if (!span) {
873
+ return;
874
+ }
875
+ const startTime = this.fiberStartTimes.get(fiber);
876
+ if (startTime) {
877
+ const duration = process.hrtime.bigint() - startTime;
878
+ const minDuration = this.parseMinDuration(this.config.performance?.min_duration);
879
+ if (minDuration > 0 && duration < minDuration) {
880
+ this.fiberSpans.delete(fiber);
881
+ this.fiberStartTimes.delete(fiber);
882
+ this.activeFiberCount--;
883
+ return;
884
+ }
885
+ }
886
+ if (Exit.isSuccess(exit)) {
887
+ span.setStatus({ code: OtelApi.SpanStatusCode.OK });
888
+ } else {
889
+ span.setStatus({
890
+ code: OtelApi.SpanStatusCode.ERROR,
891
+ message: "Fiber failed"
892
+ });
893
+ span.setAttribute("effect.fiber.failed", true);
894
+ }
895
+ span.end();
896
+ this.fiberSpans.delete(fiber);
897
+ this.fiberStartTimes.delete(fiber);
898
+ this.activeFiberCount--;
899
+ }
900
+ /**
901
+ * Check if a span name should be traced based on filter patterns
902
+ */
903
+ shouldTrace(spanName) {
904
+ for (const pattern of this.excludePatterns) {
905
+ if (pattern.test(spanName)) {
906
+ return false;
907
+ }
908
+ }
909
+ if (this.includePatterns.length > 0) {
910
+ for (const pattern of this.includePatterns) {
911
+ if (pattern.test(spanName)) {
912
+ return true;
913
+ }
914
+ }
915
+ return false;
916
+ }
917
+ return true;
918
+ }
919
+ /**
920
+ * Get initial span attributes for a fiber
921
+ */
922
+ getInitialAttributes(fiber, sourceInfo, parentFiberId) {
923
+ const attrs = {
924
+ "effect.auto_traced": true
925
+ };
926
+ if (this.config.metadata?.fiber_info !== false) {
927
+ attrs["effect.fiber.id"] = fiber.id().id;
928
+ }
929
+ if (this.config.metadata?.source_location !== false && sourceInfo) {
930
+ attrs["code.function"] = sourceInfo.function;
931
+ attrs["code.filepath"] = sourceInfo.file;
932
+ attrs["code.lineno"] = sourceInfo.line;
933
+ attrs["code.column"] = sourceInfo.column;
934
+ }
935
+ if (this.config.metadata?.parent_fiber !== false && parentFiberId !== void 0) {
936
+ attrs["effect.fiber.parent_id"] = parentFiberId;
937
+ }
938
+ return attrs;
939
+ }
940
+ /**
941
+ * Parse stack trace to get source info
942
+ */
943
+ parseStackTrace() {
944
+ const stack = new Error().stack;
945
+ if (!stack) return void 0;
946
+ const lines = stack.split("\n");
947
+ for (let i = 3; i < lines.length; i++) {
948
+ const line = lines[i];
949
+ if (line === void 0) continue;
950
+ if (!line.includes("node_modules/effect") && !line.includes("@atrim/instrument") && !line.includes("auto/supervisor")) {
951
+ const match = line.match(/at\s+(?:(.+?)\s+)?\(?(.+?):(\d+):(\d+)\)?/);
952
+ if (match) {
953
+ const [, funcName, filePath, lineNum, colNum] = match;
954
+ return {
955
+ function: funcName ?? "anonymous",
956
+ file: filePath ?? "unknown",
957
+ line: parseInt(lineNum ?? "0", 10),
958
+ column: parseInt(colNum ?? "0", 10)
959
+ };
960
+ }
961
+ }
962
+ }
963
+ return void 0;
964
+ }
965
+ /**
966
+ * Parse min_duration string to nanoseconds
967
+ */
968
+ parseMinDuration(duration) {
969
+ if (!duration || duration === "0ms") return BigInt(0);
970
+ const match = duration.match(/^(\d+)\s*(ms|millis|s|sec|seconds|us|micros)?$/i);
971
+ if (!match) return BigInt(0);
972
+ const value = parseInt(match[1] ?? "0", 10);
973
+ const unit = (match[2] ?? "ms").toLowerCase();
974
+ switch (unit) {
975
+ case "us":
976
+ case "micros":
977
+ return BigInt(value) * BigInt(1e3);
978
+ case "ms":
979
+ case "millis":
980
+ return BigInt(value) * BigInt(1e6);
981
+ case "s":
982
+ case "sec":
983
+ case "seconds":
984
+ return BigInt(value) * BigInt(1e9);
985
+ default:
986
+ return BigInt(value) * BigInt(1e6);
987
+ }
988
+ }
989
+ };
990
+ var createAutoTracingSupervisor = (config) => {
991
+ return new AutoTracingSupervisor(config);
992
+ };
993
+ var createAutoTracingLayer = (options) => {
994
+ return Layer.unwrapEffect(
995
+ Effect.gen(function* () {
996
+ const config = options?.config ?? (yield* loadAutoTracingConfig());
997
+ if (!config.enabled) {
998
+ logger.log("@atrim/auto-trace: Auto-tracing disabled via config");
999
+ return Layer.empty;
1000
+ }
1001
+ const supervisor = createAutoTracingSupervisor(config);
1002
+ return Supervisor.addSupervisor(supervisor);
1003
+ })
1004
+ );
1005
+ };
1006
+ var withAutoTracing = (effect, config, mainSpanName) => {
1007
+ if (!config.enabled) {
1008
+ logger.log("@atrim/auto-trace: Auto-tracing disabled via config");
1009
+ return effect;
1010
+ }
1011
+ const supervisor = createAutoTracingSupervisor(config);
1012
+ const tracer = OtelApi.trace.getTracer("@atrim/auto-trace", "1.0.0");
1013
+ const spanName = mainSpanName ?? inferSpanName(0, void 0, config);
1014
+ const mainSpan = tracer.startSpan(spanName, {
1015
+ kind: OtelApi.SpanKind.INTERNAL,
1016
+ attributes: {
1017
+ "effect.auto_traced": true,
1018
+ "effect.fiber.id": 0,
1019
+ // Main fiber
1020
+ "effect.main_fiber": true
1021
+ }
1022
+ });
1023
+ supervisor.setRootSpan(mainSpan);
1024
+ return Effect.acquireUseRelease(
1025
+ // Acquire: return the span (already started)
1026
+ Effect.succeed(mainSpan),
1027
+ // Use: run the supervised effect
1028
+ () => Effect.supervised(supervisor)(effect),
1029
+ // Release: end the span
1030
+ (span, exit) => Effect.sync(() => {
1031
+ if (Exit.isSuccess(exit)) {
1032
+ span.setStatus({ code: OtelApi.SpanStatusCode.OK });
1033
+ } else {
1034
+ span.setStatus({
1035
+ code: OtelApi.SpanStatusCode.ERROR,
1036
+ message: "Effect failed"
1037
+ });
1038
+ }
1039
+ span.end();
1040
+ })
1041
+ );
1042
+ };
1043
+ var AutoTracingLive = createAutoTracingLayer();
1044
+ var withoutAutoTracing = (effect) => effect.pipe(Effect.locally(AutoTracingEnabled, false));
1045
+ var setSpanName = (name) => (effect) => effect.pipe(Effect.locally(AutoTracingSpanName, Option.some(name)));
1046
+ var createExporterLayer = (exporterConfig, serviceName, serviceVersion) => {
1047
+ const config = exporterConfig ?? {
1048
+ type: "otlp",
1049
+ processor: "batch",
1050
+ batch: {
1051
+ scheduled_delay_millis: 1e3,
1052
+ max_export_batch_size: 100
1053
+ }
1054
+ };
1055
+ if (config.type === "none") {
1056
+ logger.log('@atrim/auto-trace: Exporter type is "none", no spans will be exported');
1057
+ return Layer.empty;
1058
+ }
1059
+ const createSpanExporter = () => {
1060
+ if (config.type === "console") {
1061
+ logger.log("@atrim/auto-trace: Using ConsoleSpanExporter");
1062
+ return new ConsoleSpanExporter();
1063
+ }
1064
+ const endpoint = config.endpoint || process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4318";
1065
+ logger.log(`@atrim/auto-trace: Using OTLPTraceExporter (${endpoint})`);
1066
+ const exporterConfig2 = {
1067
+ url: `${endpoint}/v1/traces`
1068
+ };
1069
+ if (config.headers) {
1070
+ exporterConfig2.headers = config.headers;
1071
+ logger.log(`@atrim/auto-trace: Using custom headers: ${Object.keys(config.headers).join(", ")}`);
1072
+ }
1073
+ return new OTLPTraceExporter(exporterConfig2);
1074
+ };
1075
+ const createSpanProcessor = () => {
1076
+ const exporter = createSpanExporter();
1077
+ if (config.processor === "simple" || config.type === "console") {
1078
+ logger.log("@atrim/auto-trace: Using SimpleSpanProcessor");
1079
+ return new SimpleSpanProcessor(exporter);
1080
+ }
1081
+ const batchConfig = config.batch ?? {
1082
+ scheduled_delay_millis: 1e3,
1083
+ max_export_batch_size: 100
1084
+ };
1085
+ logger.log("@atrim/auto-trace: Using BatchSpanProcessor");
1086
+ return new BatchSpanProcessor(exporter, {
1087
+ scheduledDelayMillis: batchConfig.scheduled_delay_millis,
1088
+ maxExportBatchSize: batchConfig.max_export_batch_size
1089
+ });
1090
+ };
1091
+ return Layer.effectDiscard(
1092
+ Effect.sync(() => {
1093
+ const provider = new BasicTracerProvider({
1094
+ resource: resourceFromAttributes({
1095
+ [ATTR_SERVICE_NAME]: serviceName,
1096
+ [ATTR_SERVICE_VERSION]: serviceVersion
1097
+ }),
1098
+ spanProcessors: [createSpanProcessor()]
1099
+ });
1100
+ OtelApi.trace.setGlobalTracerProvider(provider);
1101
+ logger.log("@atrim/auto-trace: Global TracerProvider registered");
1102
+ return () => {
1103
+ provider.shutdown().catch((err) => {
1104
+ logger.log(`@atrim/auto-trace: Error shutting down provider: ${err}`);
1105
+ });
1106
+ };
1107
+ })
1108
+ );
1109
+ };
1110
+ var createFullAutoTracingLayer = () => {
1111
+ return Layer.unwrapEffect(
1112
+ Effect.gen(function* () {
1113
+ const config = yield* loadFullConfig();
1114
+ const serviceName = process.env.OTEL_SERVICE_NAME || "effect-service";
1115
+ const serviceVersion = process.env.npm_package_version || "1.0.0";
1116
+ const autoConfig = config.effect?.auto_instrumentation;
1117
+ if (!autoConfig?.enabled) {
1118
+ logger.log("@atrim/auto-trace: Auto-instrumentation disabled via config");
1119
+ return Layer.empty;
1120
+ }
1121
+ const exporterConfig = config.effect?.exporter_config;
1122
+ logger.log("@atrim/auto-trace: Full auto-instrumentation enabled");
1123
+ logger.log(` Service: ${serviceName}`);
1124
+ logger.log(` Exporter: ${exporterConfig?.type ?? "otlp"}`);
1125
+ const exporterLayer = createExporterLayer(exporterConfig, serviceName, serviceVersion);
1126
+ const supervisor = createAutoTracingSupervisor(autoConfig);
1127
+ const supervisorLayer = Supervisor.addSupervisor(supervisor);
1128
+ return Layer.mergeAll(exporterLayer, supervisorLayer);
1129
+ })
1130
+ );
1131
+ };
1132
+ var FullAutoTracingLive = createFullAutoTracingLayer();
1133
+
1134
+ export { AutoTracingConfig, AutoTracingConfigLayer, AutoTracingConfigLive, AutoTracingEnabled, AutoTracingLive, AutoTracingSpanName, AutoTracingSupervisor, EffectTracingLive, FullAutoTracingLive, createAutoTracingLayer, createAutoTracingSupervisor, createEffectTracingLayer, createFullAutoTracingLayer, defaultAutoTracingConfig, inferSpanName, loadAutoTracingConfig, loadAutoTracingConfigSync, sanitizeSpanName, setSpanName, withAutoTracing, withoutAutoTracing };
1135
+ //# sourceMappingURL=index.js.map
1136
+ //# sourceMappingURL=index.js.map