@atrim/instrument-node 0.7.1-dev.14fdea7.20260108232436 → 0.7.1-dev.764c183.20260110203528

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.
@@ -89,6 +89,25 @@ var AutoInstrumentationConfigSchema = z.object({
89
89
  // Naming rules (first match wins)
90
90
  rules: z.array(SpanNamingRuleSchema).default([])
91
91
  }).default({}),
92
+ // Span relationship configuration for forked fibers
93
+ // Controls how child fiber spans relate to their parent/forking context
94
+ span_relationships: z.object({
95
+ // Relationship type between forked fiber spans and their parent context
96
+ // - 'parent-child': Use parent-child relationship (default, traditional tracing)
97
+ // Parent span shows child as nested. Works well with most observability tools.
98
+ // - 'span-links': Use span links (semantically correct for async forks per OTel spec)
99
+ // Fibers get independent traces linked to parent. Better for long-running fibers.
100
+ // - 'both': Create parent-child AND add span links
101
+ // Maximum visibility but may create redundant data.
102
+ type: z.enum(["parent-child", "span-links", "both"]).default("parent-child"),
103
+ // Custom attributes to add to span links (only used when type includes links)
104
+ link_attributes: z.object({
105
+ // Link type identifier
106
+ "link.type": z.string().default("fork"),
107
+ // Custom attributes (key-value pairs)
108
+ custom: z.record(z.string()).optional()
109
+ }).optional()
110
+ }).default({}),
92
111
  // Pattern-based filtering
93
112
  filter: z.object({
94
113
  // Only trace spans matching these patterns (empty = trace all)