@atrim/instrument-node 0.7.0-b9eaf74-20260108193056 → 0.7.0
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 -6
- package/target/dist/index.cjs +1 -66
- package/target/dist/index.cjs.map +1 -1
- package/target/dist/index.js +1 -66
- package/target/dist/index.js.map +1 -1
- package/target/dist/integrations/effect/index.cjs +1 -66
- package/target/dist/integrations/effect/index.cjs.map +1 -1
- package/target/dist/integrations/effect/index.js +1 -66
- package/target/dist/integrations/effect/index.js.map +1 -1
- package/target/dist/integrations/effect/auto/index.cjs +0 -915
- package/target/dist/integrations/effect/auto/index.cjs.map +0 -1
- package/target/dist/integrations/effect/auto/index.d.cts +0 -278
- package/target/dist/integrations/effect/auto/index.d.ts +0 -278
- package/target/dist/integrations/effect/auto/index.js +0 -875
- package/target/dist/integrations/effect/auto/index.js.map +0 -1
package/target/dist/index.js
CHANGED
|
@@ -52,69 +52,6 @@ var AutoIsolationConfigSchema = z.object({
|
|
|
52
52
|
add_metadata: z.boolean().default(true)
|
|
53
53
|
}).default({})
|
|
54
54
|
});
|
|
55
|
-
var SpanNamingRuleSchema = z.object({
|
|
56
|
-
// Match criteria (all specified criteria must match)
|
|
57
|
-
match: z.object({
|
|
58
|
-
// Regex pattern to match file path
|
|
59
|
-
file: z.string().optional(),
|
|
60
|
-
// Regex pattern to match function name
|
|
61
|
-
function: z.string().optional(),
|
|
62
|
-
// Regex pattern to match module name
|
|
63
|
-
module: z.string().optional()
|
|
64
|
-
}),
|
|
65
|
-
// Span name template with variables:
|
|
66
|
-
// {fiber_id} - Fiber ID
|
|
67
|
-
// {function} - Function name
|
|
68
|
-
// {module} - Module name
|
|
69
|
-
// {file} - File path
|
|
70
|
-
// {line} - Line number
|
|
71
|
-
// {operator} - Effect operator (gen, all, forEach, etc.)
|
|
72
|
-
// {match:field:N} - Captured regex group from match
|
|
73
|
-
name: z.string()
|
|
74
|
-
});
|
|
75
|
-
var AutoInstrumentationConfigSchema = z.object({
|
|
76
|
-
// Enable/disable auto-instrumentation
|
|
77
|
-
enabled: z.boolean().default(false),
|
|
78
|
-
// Tracing granularity
|
|
79
|
-
// - 'fiber': Trace at fiber creation (recommended, lower overhead)
|
|
80
|
-
// - 'operator': Trace each Effect operator (higher granularity, more overhead)
|
|
81
|
-
granularity: z.enum(["fiber", "operator"]).default("fiber"),
|
|
82
|
-
// Smart span naming configuration
|
|
83
|
-
span_naming: z.object({
|
|
84
|
-
// Default span name template when no rules match
|
|
85
|
-
default: z.string().default("effect.fiber.{fiber_id}"),
|
|
86
|
-
// Infer span names from source code (requires stack trace parsing)
|
|
87
|
-
// Adds ~50-100μs overhead per fiber
|
|
88
|
-
infer_from_source: z.boolean().default(true),
|
|
89
|
-
// Naming rules (first match wins)
|
|
90
|
-
rules: z.array(SpanNamingRuleSchema).default([])
|
|
91
|
-
}).default({}),
|
|
92
|
-
// Pattern-based filtering
|
|
93
|
-
filter: z.object({
|
|
94
|
-
// Only trace spans matching these patterns (empty = trace all)
|
|
95
|
-
include: z.array(z.string()).default([]),
|
|
96
|
-
// Never trace spans matching these patterns
|
|
97
|
-
exclude: z.array(z.string()).default([])
|
|
98
|
-
}).default({}),
|
|
99
|
-
// Performance controls
|
|
100
|
-
performance: z.object({
|
|
101
|
-
// Sample rate (0.0 - 1.0)
|
|
102
|
-
sampling_rate: z.number().min(0).max(1).default(1),
|
|
103
|
-
// Skip fibers shorter than this duration (e.g., "10ms", "100 millis")
|
|
104
|
-
min_duration: z.string().default("0ms"),
|
|
105
|
-
// Maximum concurrent traced fibers (0 = unlimited)
|
|
106
|
-
max_concurrent: z.number().default(0)
|
|
107
|
-
}).default({}),
|
|
108
|
-
// Automatic metadata extraction
|
|
109
|
-
metadata: z.object({
|
|
110
|
-
// Extract Effect fiber information
|
|
111
|
-
fiber_info: z.boolean().default(true),
|
|
112
|
-
// Extract source location (file:line)
|
|
113
|
-
source_location: z.boolean().default(true),
|
|
114
|
-
// Extract parent fiber information
|
|
115
|
-
parent_fiber: z.boolean().default(true)
|
|
116
|
-
}).default({})
|
|
117
|
-
});
|
|
118
55
|
var HttpFilteringConfigSchema = z.object({
|
|
119
56
|
// Patterns to ignore for outgoing HTTP requests (string patterns only in YAML)
|
|
120
57
|
ignore_outgoing_urls: z.array(z.string()).optional(),
|
|
@@ -154,9 +91,7 @@ var InstrumentationConfigSchema = z.object({
|
|
|
154
91
|
// - "standalone": Use Effect's own OTLP exporter (bypasses Node SDK filtering)
|
|
155
92
|
exporter: z.enum(["unified", "standalone"]).default("unified"),
|
|
156
93
|
auto_extract_metadata: z.boolean(),
|
|
157
|
-
auto_isolation: AutoIsolationConfigSchema.optional()
|
|
158
|
-
// Auto-instrumentation: automatic tracing of all Effect fibers
|
|
159
|
-
auto_instrumentation: AutoInstrumentationConfigSchema.optional()
|
|
94
|
+
auto_isolation: AutoIsolationConfigSchema.optional()
|
|
160
95
|
}).optional(),
|
|
161
96
|
http: HttpFilteringConfigSchema.optional()
|
|
162
97
|
});
|