@atrim/instrument-node 0.5.0-c05e3a1-20251119131235 → 0.5.1-1451fcf-20260105212505

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.
@@ -1,15 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  var effect = require('effect');
4
+ var OtelTracer = require('@effect/opentelemetry/Tracer');
5
+ var Resource = require('@effect/opentelemetry/Resource');
4
6
  var Otlp = require('@effect/opentelemetry/Otlp');
5
7
  var platform = require('@effect/platform');
6
8
  var api = require('@opentelemetry/api');
9
+ var semanticConventions = require('@opentelemetry/semantic-conventions');
7
10
  var FileSystem = require('@effect/platform/FileSystem');
8
11
  var HttpClient = require('@effect/platform/HttpClient');
9
12
  var HttpClientRequest = require('@effect/platform/HttpClientRequest');
10
13
  var yaml = require('yaml');
11
14
  var zod = require('zod');
12
- var platformNode = require('@effect/platform-node');
13
15
 
14
16
  function _interopNamespace(e) {
15
17
  if (e && e.__esModule) return e;
@@ -29,6 +31,8 @@ function _interopNamespace(e) {
29
31
  return Object.freeze(n);
30
32
  }
31
33
 
34
+ var OtelTracer__namespace = /*#__PURE__*/_interopNamespace(OtelTracer);
35
+ var Resource__namespace = /*#__PURE__*/_interopNamespace(Resource);
32
36
  var Otlp__namespace = /*#__PURE__*/_interopNamespace(Otlp);
33
37
  var HttpClient__namespace = /*#__PURE__*/_interopNamespace(HttpClient);
34
38
  var HttpClientRequest__namespace = /*#__PURE__*/_interopNamespace(HttpClientRequest);
@@ -95,11 +99,50 @@ var InstrumentationConfigSchema = zod.z.object({
95
99
  ignore_patterns: zod.z.array(PatternConfigSchema)
96
100
  }),
97
101
  effect: zod.z.object({
102
+ // Enable/disable Effect tracing entirely
103
+ // When false, EffectInstrumentationLive returns Layer.empty
104
+ enabled: zod.z.boolean().default(true),
105
+ // Exporter mode:
106
+ // - "unified": Use global TracerProvider from Node SDK (recommended, enables filtering)
107
+ // - "standalone": Use Effect's own OTLP exporter (bypasses Node SDK filtering)
108
+ exporter: zod.z.enum(["unified", "standalone"]).default("unified"),
98
109
  auto_extract_metadata: zod.z.boolean(),
99
110
  auto_isolation: AutoIsolationConfigSchema.optional()
100
111
  }).optional(),
101
112
  http: HttpFilteringConfigSchema.optional()
102
113
  });
114
+ var defaultConfig = {
115
+ version: "1.0",
116
+ instrumentation: {
117
+ enabled: true,
118
+ logging: "on",
119
+ description: "Default instrumentation configuration",
120
+ instrument_patterns: [
121
+ { pattern: "^app\\.", enabled: true, description: "Application operations" },
122
+ { pattern: "^http\\.server\\.", enabled: true, description: "HTTP server operations" },
123
+ { pattern: "^http\\.client\\.", enabled: true, description: "HTTP client operations" }
124
+ ],
125
+ ignore_patterns: [
126
+ { pattern: "^test\\.", description: "Test utilities" },
127
+ { pattern: "^internal\\.", description: "Internal operations" },
128
+ { pattern: "^health\\.", description: "Health checks" }
129
+ ]
130
+ },
131
+ effect: {
132
+ enabled: true,
133
+ exporter: "unified",
134
+ auto_extract_metadata: true
135
+ }
136
+ };
137
+ function parseAndValidateConfig(content) {
138
+ let parsed;
139
+ if (typeof content === "string") {
140
+ parsed = yaml.parse(content);
141
+ } else {
142
+ parsed = content;
143
+ }
144
+ return InstrumentationConfigSchema.parse(parsed);
145
+ }
103
146
  (class extends effect.Data.TaggedError("ConfigError") {
104
147
  get message() {
105
148
  return this.reason;
@@ -277,7 +320,7 @@ var makeConfigLoader = effect.Effect.gen(function* () {
277
320
  })
278
321
  });
279
322
  });
280
- var ConfigLoaderLive = effect.Layer.effect(ConfigLoader, makeConfigLoader);
323
+ effect.Layer.effect(ConfigLoader, makeConfigLoader);
281
324
  var PatternMatcher = class {
282
325
  constructor(config) {
283
326
  __publicField(this, "ignorePatterns", []);
@@ -425,83 +468,73 @@ var Logger = class {
425
468
  }
426
469
  };
427
470
  var logger = new Logger();
428
- var NodeConfigLoaderLive = ConfigLoaderLive.pipe(
429
- effect.Layer.provide(effect.Layer.mergeAll(platformNode.NodeContext.layer, platform.FetchHttpClient.layer))
430
- );
431
- var cachedLoaderPromise = null;
432
- function getCachedLoader() {
433
- if (!cachedLoaderPromise) {
434
- cachedLoaderPromise = effect.Effect.runPromise(
435
- effect.Effect.gen(function* () {
436
- return yield* ConfigLoader;
437
- }).pipe(effect.Effect.provide(NodeConfigLoaderLive))
438
- );
471
+ async function loadFromFile(filePath) {
472
+ const { readFile } = await import('fs/promises');
473
+ const content = await readFile(filePath, "utf-8");
474
+ return parseAndValidateConfig(content);
475
+ }
476
+ async function loadFromUrl(url) {
477
+ const response = await fetch(url);
478
+ if (!response.ok) {
479
+ throw new Error(`Failed to fetch config from ${url}: ${response.statusText}`);
439
480
  }
440
- return cachedLoaderPromise;
481
+ const content = await response.text();
482
+ return parseAndValidateConfig(content);
441
483
  }
442
- async function loadConfig(uri, options) {
443
- if (options?.cacheTimeout === 0) {
444
- const program = effect.Effect.gen(function* () {
445
- const loader2 = yield* ConfigLoader;
446
- return yield* loader2.loadFromUri(uri);
447
- });
448
- return effect.Effect.runPromise(program.pipe(effect.Effect.provide(NodeConfigLoaderLive)));
484
+ async function loadConfig(uri, _options) {
485
+ if (uri.startsWith("http://") || uri.startsWith("https://")) {
486
+ return loadFromUrl(uri);
487
+ }
488
+ if (uri.startsWith("file://")) {
489
+ const filePath = uri.slice(7);
490
+ return loadFromFile(filePath);
449
491
  }
450
- const loader = await getCachedLoader();
451
- return effect.Effect.runPromise(loader.loadFromUri(uri));
492
+ return loadFromFile(uri);
452
493
  }
453
494
  async function loadConfigFromInline(content) {
454
- const loader = await getCachedLoader();
455
- return effect.Effect.runPromise(loader.loadFromInline(content));
456
- }
457
- function getDefaultConfig() {
458
- return {
459
- version: "1.0",
460
- instrumentation: {
461
- enabled: true,
462
- logging: "on",
463
- description: "Default instrumentation configuration",
464
- instrument_patterns: [
465
- { pattern: "^app\\.", enabled: true, description: "Application operations" },
466
- { pattern: "^http\\.server\\.", enabled: true, description: "HTTP server operations" },
467
- { pattern: "^http\\.client\\.", enabled: true, description: "HTTP client operations" }
468
- ],
469
- ignore_patterns: [
470
- { pattern: "^test\\.", description: "Test utilities" },
471
- { pattern: "^internal\\.", description: "Internal operations" },
472
- { pattern: "^health\\.", description: "Health checks" }
473
- ]
474
- },
475
- effect: {
476
- auto_extract_metadata: true
477
- }
478
- };
495
+ return parseAndValidateConfig(content);
479
496
  }
480
497
  async function loadConfigWithOptions(options = {}) {
481
- const loadOptions = options.cacheTimeout !== void 0 ? { cacheTimeout: options.cacheTimeout } : void 0;
482
498
  if (options.config) {
483
499
  return loadConfigFromInline(options.config);
484
500
  }
485
501
  const envConfigPath = process.env.ATRIM_INSTRUMENTATION_CONFIG;
486
502
  if (envConfigPath) {
487
- return loadConfig(envConfigPath, loadOptions);
503
+ return loadConfig(envConfigPath);
488
504
  }
489
505
  if (options.configUrl) {
490
- return loadConfig(options.configUrl, loadOptions);
506
+ return loadConfig(options.configUrl);
491
507
  }
492
508
  if (options.configPath) {
493
- return loadConfig(options.configPath, loadOptions);
509
+ return loadConfig(options.configPath);
494
510
  }
495
511
  const { existsSync } = await import('fs');
496
512
  const { join } = await import('path');
497
513
  const defaultPath = join(process.cwd(), "instrumentation.yaml");
498
514
  if (existsSync(defaultPath)) {
499
- return loadConfig(defaultPath, loadOptions);
515
+ return loadConfig(defaultPath);
500
516
  }
501
- return getDefaultConfig();
517
+ return defaultConfig;
502
518
  }
503
519
 
504
520
  // src/integrations/effect/effect-tracer.ts
521
+ var SDK_NAME = "@effect/opentelemetry";
522
+ var ATTR_TELEMETRY_EXPORTER_MODE = "telemetry.exporter.mode";
523
+ var ATTR_EFFECT_INSTRUMENTED = "effect.instrumented";
524
+ var EffectAttributeTracerLayer = effect.Layer.effect(
525
+ effect.Tracer.Tracer,
526
+ effect.Effect.gen(function* () {
527
+ const baseTracer = yield* OtelTracer__namespace.make;
528
+ return effect.Tracer.make({
529
+ span: (name, parent, context2, links, startTime, kind, options) => {
530
+ const span = baseTracer.span(name, parent, context2, links, startTime, kind, options);
531
+ span.attribute(ATTR_EFFECT_INSTRUMENTED, true);
532
+ return span;
533
+ },
534
+ context: (f, fiber) => baseTracer.context(f, fiber)
535
+ });
536
+ }).pipe(effect.Effect.provide(OtelTracer__namespace.layerGlobalTracer))
537
+ );
505
538
  function createEffectInstrumentation(options = {}) {
506
539
  return effect.Layer.unwrapEffect(
507
540
  effect.Effect.gen(function* () {
@@ -512,106 +545,228 @@ function createEffectInstrumentation(options = {}) {
512
545
  message: error instanceof Error ? error.message : String(error)
513
546
  })
514
547
  });
548
+ const effectEnabled = process.env.OTEL_EFFECT_ENABLED !== "false" && (config.effect?.enabled ?? true);
549
+ if (!effectEnabled) {
550
+ logger.log("@atrim/instrumentation/effect: Effect tracing disabled via config");
551
+ return effect.Layer.empty;
552
+ }
515
553
  yield* effect.Effect.sync(() => {
516
554
  const loggingLevel = config.instrumentation.logging || "on";
517
555
  logger.setLevel(loggingLevel);
518
556
  });
519
557
  yield* effect.Effect.sync(() => initializePatternMatcher(config));
520
- const otlpEndpoint = options.otlpEndpoint || process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4318";
521
558
  const serviceName = options.serviceName || process.env.OTEL_SERVICE_NAME || "effect-service";
522
559
  const serviceVersion = options.serviceVersion || process.env.npm_package_version || "1.0.0";
523
- const autoExtractMetadata = options.autoExtractMetadata ?? config.effect?.auto_extract_metadata ?? true;
524
- const continueExistingTraces = options.continueExistingTraces ?? true;
525
- logger.log("\u{1F50D} Effect OpenTelemetry instrumentation");
526
- logger.log(` \u{1F4E1} Endpoint: ${otlpEndpoint}`);
527
- logger.log(` \u{1F3F7}\uFE0F Service: ${serviceName}`);
528
- logger.log(` \u2705 Auto metadata extraction: ${autoExtractMetadata}`);
529
- logger.log(` \u2705 Continue existing traces: ${continueExistingTraces}`);
530
- const otlpLayer = Otlp__namespace.layer({
531
- baseUrl: otlpEndpoint,
532
- resource: {
533
- serviceName,
534
- serviceVersion,
535
- attributes: {
536
- "platform.component": "effect",
537
- "effect.auto_metadata": autoExtractMetadata,
538
- "effect.context_propagation": continueExistingTraces
539
- }
540
- },
541
- // Bridge Effect context to OpenTelemetry global context
542
- // This is essential for context propagation to work properly
543
- tracerContext: (f, span) => {
544
- if (span._tag !== "Span") {
545
- return f();
560
+ const exporterMode = options.exporterMode ?? config.effect?.exporter ?? "unified";
561
+ const resourceAttributes = {
562
+ "platform.component": "effect",
563
+ [semanticConventions.ATTR_TELEMETRY_SDK_LANGUAGE]: semanticConventions.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,
564
+ [semanticConventions.ATTR_TELEMETRY_SDK_NAME]: SDK_NAME,
565
+ [ATTR_TELEMETRY_EXPORTER_MODE]: exporterMode
566
+ };
567
+ if (exporterMode === "standalone") {
568
+ const otlpEndpoint = options.otlpEndpoint || process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4318";
569
+ logger.log("Effect OpenTelemetry instrumentation (standalone)");
570
+ logger.log(` Service: ${serviceName}`);
571
+ logger.log(` Endpoint: ${otlpEndpoint}`);
572
+ logger.log(" WARNING: Standalone mode bypasses Node SDK filtering");
573
+ return Otlp__namespace.layer({
574
+ baseUrl: otlpEndpoint,
575
+ resource: {
576
+ serviceName,
577
+ serviceVersion,
578
+ attributes: resourceAttributes
579
+ },
580
+ // Bridge Effect context to OpenTelemetry global context
581
+ tracerContext: (f, span) => {
582
+ if (span._tag !== "Span") {
583
+ return f();
584
+ }
585
+ const spanContext = {
586
+ traceId: span.traceId,
587
+ spanId: span.spanId,
588
+ traceFlags: span.sampled ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE
589
+ };
590
+ const otelSpan = api.trace.wrapSpanContext(spanContext);
591
+ return api.context.with(api.trace.setSpan(api.context.active(), otelSpan), f);
546
592
  }
547
- const spanContext = {
548
- traceId: span.traceId,
549
- spanId: span.spanId,
550
- traceFlags: span.sampled ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE
551
- };
552
- const otelSpan = api.trace.wrapSpanContext(spanContext);
553
- return api.context.with(api.trace.setSpan(api.context.active(), otelSpan), f);
554
- }
555
- }).pipe(effect.Layer.provide(platform.FetchHttpClient.layer));
556
- if (autoExtractMetadata) {
557
- return otlpLayer;
593
+ }).pipe(effect.Layer.provide(platform.FetchHttpClient.layer));
594
+ } else {
595
+ logger.log("Effect OpenTelemetry instrumentation (unified)");
596
+ logger.log(` Service: ${serviceName}`);
597
+ logger.log(" Using global TracerProvider for span export");
598
+ return EffectAttributeTracerLayer.pipe(
599
+ effect.Layer.provide(
600
+ Resource__namespace.layer({
601
+ serviceName,
602
+ serviceVersion,
603
+ attributes: resourceAttributes
604
+ })
605
+ )
606
+ );
558
607
  }
559
- return otlpLayer;
560
608
  })
561
609
  ).pipe(effect.Layer.orDie);
562
610
  }
563
611
  var EffectInstrumentationLive = effect.Effect.sync(() => {
564
- const endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT || "http://localhost:4318";
565
612
  const serviceName = process.env.OTEL_SERVICE_NAME || "effect-service";
566
613
  const serviceVersion = process.env.npm_package_version || "1.0.0";
567
614
  logger.minimal(`@atrim/instrumentation/effect: Effect tracing enabled (${serviceName})`);
568
- logger.log("\u{1F50D} Effect OpenTelemetry tracer");
569
- logger.log(` \u{1F4E1} Endpoint: ${endpoint}`);
570
- logger.log(` \u{1F3F7}\uFE0F Service: ${serviceName}`);
571
- return Otlp__namespace.layer({
572
- baseUrl: endpoint,
573
- resource: {
574
- serviceName,
575
- serviceVersion,
576
- attributes: {
577
- "platform.component": "effect"
578
- }
579
- },
580
- // CRITICAL: Bridge Effect context to OpenTelemetry global context
581
- // This allows NodeSDK auto-instrumentation to see Effect spans as parent spans
582
- tracerContext: (f, span) => {
583
- if (span._tag !== "Span") {
584
- return f();
585
- }
586
- const spanContext = {
587
- traceId: span.traceId,
588
- spanId: span.spanId,
589
- traceFlags: span.sampled ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE
590
- };
591
- const otelSpan = api.trace.wrapSpanContext(spanContext);
592
- return api.context.with(api.trace.setSpan(api.context.active(), otelSpan), f);
593
- }
594
- }).pipe(effect.Layer.provide(platform.FetchHttpClient.layer));
615
+ logger.log("Effect OpenTelemetry tracer (unified)");
616
+ logger.log(` Service: ${serviceName}`);
617
+ return EffectAttributeTracerLayer.pipe(
618
+ effect.Layer.provide(
619
+ Resource__namespace.layer({
620
+ serviceName,
621
+ serviceVersion,
622
+ attributes: {
623
+ "platform.component": "effect",
624
+ [semanticConventions.ATTR_TELEMETRY_SDK_LANGUAGE]: semanticConventions.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,
625
+ [semanticConventions.ATTR_TELEMETRY_SDK_NAME]: SDK_NAME,
626
+ [ATTR_TELEMETRY_EXPORTER_MODE]: "unified"
627
+ }
628
+ })
629
+ )
630
+ );
595
631
  }).pipe(effect.Layer.unwrapEffect);
596
-
597
- // src/integrations/effect/effect-helpers.ts
598
- function annotateUser(_userId, _email) {
632
+ function annotateUser(userId, email, username) {
633
+ const attributes = {
634
+ "user.id": userId
635
+ };
636
+ if (email) attributes["user.email"] = email;
637
+ if (username) attributes["user.name"] = username;
638
+ return effect.Effect.annotateCurrentSpan(attributes);
599
639
  }
600
- function annotateDataSize(_bytes, _count) {
640
+ function annotateDataSize(bytes, items, compressionRatio) {
641
+ const attributes = {
642
+ "data.size.bytes": bytes,
643
+ "data.size.items": items
644
+ };
645
+ if (compressionRatio !== void 0) {
646
+ attributes["data.compression.ratio"] = compressionRatio;
647
+ }
648
+ return effect.Effect.annotateCurrentSpan(attributes);
601
649
  }
602
- function annotateBatch(_size, _batchSize) {
650
+ function annotateBatch(totalItems, batchSize, successCount, failureCount) {
651
+ const attributes = {
652
+ "batch.size": batchSize,
653
+ "batch.total_items": totalItems,
654
+ "batch.count": Math.ceil(totalItems / batchSize)
655
+ };
656
+ if (successCount !== void 0) {
657
+ attributes["batch.success_count"] = successCount;
658
+ }
659
+ if (failureCount !== void 0) {
660
+ attributes["batch.failure_count"] = failureCount;
661
+ }
662
+ return effect.Effect.annotateCurrentSpan(attributes);
603
663
  }
604
- function annotateLLM(_model, _operation, _inputTokens, _outputTokens) {
664
+ function annotateLLM(model, provider, tokens) {
665
+ const attributes = {
666
+ "llm.model": model,
667
+ "llm.provider": provider
668
+ };
669
+ if (tokens) {
670
+ if (tokens.prompt !== void 0) attributes["llm.tokens.prompt"] = tokens.prompt;
671
+ if (tokens.completion !== void 0) attributes["llm.tokens.completion"] = tokens.completion;
672
+ if (tokens.total !== void 0) attributes["llm.tokens.total"] = tokens.total;
673
+ }
674
+ return effect.Effect.annotateCurrentSpan(attributes);
675
+ }
676
+ function annotateQuery(query, duration, rowCount, database) {
677
+ const attributes = {
678
+ "db.statement": query.length > 1e3 ? query.substring(0, 1e3) + "..." : query
679
+ };
680
+ if (duration !== void 0) attributes["db.duration.ms"] = duration;
681
+ if (rowCount !== void 0) attributes["db.row_count"] = rowCount;
682
+ if (database) attributes["db.name"] = database;
683
+ return effect.Effect.annotateCurrentSpan(attributes);
684
+ }
685
+ function annotateHttpRequest(method, url, statusCode, contentLength) {
686
+ const attributes = {
687
+ "http.method": method,
688
+ "http.url": url
689
+ };
690
+ if (statusCode !== void 0) attributes["http.status_code"] = statusCode;
691
+ if (contentLength !== void 0) attributes["http.response.content_length"] = contentLength;
692
+ return effect.Effect.annotateCurrentSpan(attributes);
693
+ }
694
+ function annotateError(error, recoverable, errorType) {
695
+ const errorMessage = typeof error === "string" ? error : error.message;
696
+ const errorStack = typeof error === "string" ? void 0 : error.stack;
697
+ const attributes = {
698
+ "error.message": errorMessage,
699
+ "error.recoverable": recoverable
700
+ };
701
+ if (errorType) attributes["error.type"] = errorType;
702
+ if (errorStack) attributes["error.stack"] = errorStack;
703
+ return effect.Effect.annotateCurrentSpan(attributes);
605
704
  }
606
- function annotateQuery(_query, _database) {
705
+ function annotatePriority(priority, reason) {
706
+ const attributes = {
707
+ "operation.priority": priority
708
+ };
709
+ if (reason) attributes["operation.priority.reason"] = reason;
710
+ return effect.Effect.annotateCurrentSpan(attributes);
607
711
  }
608
- function annotateHttpRequest(_method, _url, _statusCode) {
712
+ function annotateCache(hit, key, ttl) {
713
+ const attributes = {
714
+ "cache.hit": hit,
715
+ "cache.key": key
716
+ };
717
+ if (ttl !== void 0) attributes["cache.ttl.seconds"] = ttl;
718
+ return effect.Effect.annotateCurrentSpan(attributes);
609
719
  }
610
- function annotateError(_error, _context) {
720
+ function extractEffectMetadata() {
721
+ return effect.Effect.gen(function* () {
722
+ const metadata = {};
723
+ const currentFiber = effect.Fiber.getCurrentFiber();
724
+ if (effect.Option.isSome(currentFiber)) {
725
+ const fiber = currentFiber.value;
726
+ const fiberId = fiber.id();
727
+ metadata["effect.fiber.id"] = effect.FiberId.threadName(fiberId);
728
+ const status = yield* effect.Fiber.status(fiber);
729
+ if (status._tag) {
730
+ metadata["effect.fiber.status"] = status._tag;
731
+ }
732
+ }
733
+ const parentSpanResult = yield* effect.Effect.currentSpan.pipe(
734
+ effect.Effect.option
735
+ // Convert NoSuchElementException to Option
736
+ );
737
+ if (effect.Option.isSome(parentSpanResult)) {
738
+ const parentSpan = parentSpanResult.value;
739
+ metadata["effect.operation.nested"] = true;
740
+ metadata["effect.operation.root"] = false;
741
+ if (parentSpan.spanId) {
742
+ metadata["effect.parent.span.id"] = parentSpan.spanId;
743
+ }
744
+ if (parentSpan.name) {
745
+ metadata["effect.parent.span.name"] = parentSpan.name;
746
+ }
747
+ if (parentSpan.traceId) {
748
+ metadata["effect.parent.trace.id"] = parentSpan.traceId;
749
+ }
750
+ } else {
751
+ metadata["effect.operation.nested"] = false;
752
+ metadata["effect.operation.root"] = true;
753
+ }
754
+ return metadata;
755
+ });
611
756
  }
612
- function annotatePriority(_priority) {
757
+ function autoEnrichSpan() {
758
+ return effect.Effect.gen(function* () {
759
+ const metadata = yield* extractEffectMetadata();
760
+ yield* effect.Effect.annotateCurrentSpan(metadata);
761
+ });
613
762
  }
614
- function annotateCache(_operation, _hit) {
763
+ function withAutoEnrichedSpan(spanName, options) {
764
+ return (self) => {
765
+ return effect.Effect.gen(function* () {
766
+ yield* autoEnrichSpan();
767
+ return yield* self;
768
+ }).pipe(effect.Effect.withSpan(spanName, options));
769
+ };
615
770
  }
616
771
  var createLogicalParentLink = (parentSpan, useSpanLinks) => {
617
772
  if (!useSpanLinks) {
@@ -750,8 +905,11 @@ exports.annotatePriority = annotatePriority;
750
905
  exports.annotateQuery = annotateQuery;
751
906
  exports.annotateSpawnedTasks = annotateSpawnedTasks;
752
907
  exports.annotateUser = annotateUser;
908
+ exports.autoEnrichSpan = autoEnrichSpan;
753
909
  exports.createEffectInstrumentation = createEffectInstrumentation;
910
+ exports.extractEffectMetadata = extractEffectMetadata;
754
911
  exports.runIsolated = runIsolated;
755
912
  exports.runWithSpan = runWithSpan;
913
+ exports.withAutoEnrichedSpan = withAutoEnrichedSpan;
756
914
  //# sourceMappingURL=index.cjs.map
757
915
  //# sourceMappingURL=index.cjs.map