autotel-devtools 6.1.2 → 6.2.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.
@@ -0,0 +1,147 @@
1
+ import { c as ErrorOccurrence, E as ErrorGroup, T as TraceData } from './exporter-C2XmGnBS.js';
2
+
3
+ /**
4
+ * Error Aggregator
5
+ *
6
+ * Groups similar errors together based on stack trace fingerprinting.
7
+ * Tracks error frequency, first/last occurrence, and affected traces.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const aggregator = new ErrorAggregator({ maxGroups: 100 });
12
+ *
13
+ * // Add errors from spans
14
+ * aggregator.addError({
15
+ * traceId: '123',
16
+ * spanId: '456',
17
+ * spanName: 'api.createUser',
18
+ * service: 'user-service',
19
+ * timestamp: Date.now(),
20
+ * error: {
21
+ * type: 'ValidationError',
22
+ * message: 'Invalid email format',
23
+ * stackTrace: 'Error: Invalid email...'
24
+ * }
25
+ * });
26
+ *
27
+ * // Get aggregated error groups
28
+ * const groups = aggregator.getErrorGroups();
29
+ * ```
30
+ */
31
+
32
+ interface ErrorAggregatorOptions {
33
+ /**
34
+ * Maximum number of error groups to track (default: 100)
35
+ * Oldest groups are evicted when limit is reached
36
+ */
37
+ maxGroups?: number;
38
+ /**
39
+ * Maximum number of affected traces to keep per group (default: 10)
40
+ */
41
+ maxAffectedTraces?: number;
42
+ /**
43
+ * Maximum number of affected span names to keep per group (default: 5)
44
+ */
45
+ maxAffectedSpans?: number;
46
+ /**
47
+ * Number of stack frames to use for fingerprinting (default: 5)
48
+ */
49
+ stackFramesForFingerprint?: number;
50
+ }
51
+ declare class ErrorAggregator {
52
+ private errorGroups;
53
+ private options;
54
+ constructor(options?: ErrorAggregatorOptions);
55
+ /**
56
+ * Add an error occurrence to the aggregator
57
+ */
58
+ addError(occurrence: ErrorOccurrence): ErrorGroup;
59
+ /**
60
+ * Extract errors from a trace and add them to the aggregator
61
+ */
62
+ addErrorsFromTrace(trace: TraceData): ErrorGroup[];
63
+ /**
64
+ * Extract error occurrence from a span
65
+ */
66
+ private extractErrorFromSpan;
67
+ /**
68
+ * Extract stack trace from span events (exception events)
69
+ */
70
+ private extractStackFromEvents;
71
+ /**
72
+ * Extract relevant attributes for error context
73
+ */
74
+ private extractRelevantAttributes;
75
+ /**
76
+ * Generate a fingerprint for error grouping
77
+ *
78
+ * Uses error type + first N stack frames (normalized)
79
+ */
80
+ private generateFingerprint;
81
+ /**
82
+ * Extract and normalize stack frames from a stack trace
83
+ */
84
+ private extractStackFrames;
85
+ /**
86
+ * Normalize file path by removing absolute path prefixes and node_modules paths
87
+ */
88
+ private normalizeFilePath;
89
+ /**
90
+ * Normalize error message by removing dynamic parts
91
+ */
92
+ private normalizeMessage;
93
+ /**
94
+ * Normalize stack trace for display
95
+ */
96
+ private normalizeStackTrace;
97
+ /**
98
+ * Simple hash function for fingerprinting
99
+ */
100
+ private simpleHash;
101
+ /**
102
+ * Evict the oldest error group
103
+ */
104
+ private evictOldestGroup;
105
+ /**
106
+ * Get all error groups, sorted by most recent
107
+ */
108
+ getErrorGroups(): ErrorGroup[];
109
+ /**
110
+ * Get error groups sorted by count (most frequent first)
111
+ */
112
+ getErrorGroupsByFrequency(): ErrorGroup[];
113
+ /**
114
+ * Get a specific error group by fingerprint
115
+ */
116
+ getErrorGroup(fingerprint: string): ErrorGroup | undefined;
117
+ /**
118
+ * Get error groups for a specific service
119
+ */
120
+ getErrorGroupsByService(service: string): ErrorGroup[];
121
+ /**
122
+ * Get total error count across all groups
123
+ */
124
+ getTotalErrorCount(): number;
125
+ /**
126
+ * Get error statistics
127
+ */
128
+ getStats(): {
129
+ totalGroups: number;
130
+ totalErrors: number;
131
+ recentErrors: number;
132
+ topErrorTypes: Array<{
133
+ type: string;
134
+ count: number;
135
+ }>;
136
+ };
137
+ /**
138
+ * Clear all error groups
139
+ */
140
+ clear(): void;
141
+ /**
142
+ * Clear old error groups (not seen in given time window)
143
+ */
144
+ clearOlderThan(maxAgeMs: number): number;
145
+ }
146
+
147
+ export { ErrorAggregator as E };
@@ -0,0 +1,147 @@
1
+ import { c as ErrorOccurrence, E as ErrorGroup, T as TraceData } from './exporter-qIQPDw29.cjs';
2
+
3
+ /**
4
+ * Error Aggregator
5
+ *
6
+ * Groups similar errors together based on stack trace fingerprinting.
7
+ * Tracks error frequency, first/last occurrence, and affected traces.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const aggregator = new ErrorAggregator({ maxGroups: 100 });
12
+ *
13
+ * // Add errors from spans
14
+ * aggregator.addError({
15
+ * traceId: '123',
16
+ * spanId: '456',
17
+ * spanName: 'api.createUser',
18
+ * service: 'user-service',
19
+ * timestamp: Date.now(),
20
+ * error: {
21
+ * type: 'ValidationError',
22
+ * message: 'Invalid email format',
23
+ * stackTrace: 'Error: Invalid email...'
24
+ * }
25
+ * });
26
+ *
27
+ * // Get aggregated error groups
28
+ * const groups = aggregator.getErrorGroups();
29
+ * ```
30
+ */
31
+
32
+ interface ErrorAggregatorOptions {
33
+ /**
34
+ * Maximum number of error groups to track (default: 100)
35
+ * Oldest groups are evicted when limit is reached
36
+ */
37
+ maxGroups?: number;
38
+ /**
39
+ * Maximum number of affected traces to keep per group (default: 10)
40
+ */
41
+ maxAffectedTraces?: number;
42
+ /**
43
+ * Maximum number of affected span names to keep per group (default: 5)
44
+ */
45
+ maxAffectedSpans?: number;
46
+ /**
47
+ * Number of stack frames to use for fingerprinting (default: 5)
48
+ */
49
+ stackFramesForFingerprint?: number;
50
+ }
51
+ declare class ErrorAggregator {
52
+ private errorGroups;
53
+ private options;
54
+ constructor(options?: ErrorAggregatorOptions);
55
+ /**
56
+ * Add an error occurrence to the aggregator
57
+ */
58
+ addError(occurrence: ErrorOccurrence): ErrorGroup;
59
+ /**
60
+ * Extract errors from a trace and add them to the aggregator
61
+ */
62
+ addErrorsFromTrace(trace: TraceData): ErrorGroup[];
63
+ /**
64
+ * Extract error occurrence from a span
65
+ */
66
+ private extractErrorFromSpan;
67
+ /**
68
+ * Extract stack trace from span events (exception events)
69
+ */
70
+ private extractStackFromEvents;
71
+ /**
72
+ * Extract relevant attributes for error context
73
+ */
74
+ private extractRelevantAttributes;
75
+ /**
76
+ * Generate a fingerprint for error grouping
77
+ *
78
+ * Uses error type + first N stack frames (normalized)
79
+ */
80
+ private generateFingerprint;
81
+ /**
82
+ * Extract and normalize stack frames from a stack trace
83
+ */
84
+ private extractStackFrames;
85
+ /**
86
+ * Normalize file path by removing absolute path prefixes and node_modules paths
87
+ */
88
+ private normalizeFilePath;
89
+ /**
90
+ * Normalize error message by removing dynamic parts
91
+ */
92
+ private normalizeMessage;
93
+ /**
94
+ * Normalize stack trace for display
95
+ */
96
+ private normalizeStackTrace;
97
+ /**
98
+ * Simple hash function for fingerprinting
99
+ */
100
+ private simpleHash;
101
+ /**
102
+ * Evict the oldest error group
103
+ */
104
+ private evictOldestGroup;
105
+ /**
106
+ * Get all error groups, sorted by most recent
107
+ */
108
+ getErrorGroups(): ErrorGroup[];
109
+ /**
110
+ * Get error groups sorted by count (most frequent first)
111
+ */
112
+ getErrorGroupsByFrequency(): ErrorGroup[];
113
+ /**
114
+ * Get a specific error group by fingerprint
115
+ */
116
+ getErrorGroup(fingerprint: string): ErrorGroup | undefined;
117
+ /**
118
+ * Get error groups for a specific service
119
+ */
120
+ getErrorGroupsByService(service: string): ErrorGroup[];
121
+ /**
122
+ * Get total error count across all groups
123
+ */
124
+ getTotalErrorCount(): number;
125
+ /**
126
+ * Get error statistics
127
+ */
128
+ getStats(): {
129
+ totalGroups: number;
130
+ totalErrors: number;
131
+ recentErrors: number;
132
+ topErrorTypes: Array<{
133
+ type: string;
134
+ count: number;
135
+ }>;
136
+ };
137
+ /**
138
+ * Clear all error groups
139
+ */
140
+ clear(): void;
141
+ /**
142
+ * Clear old error groups (not seen in given time window)
143
+ */
144
+ clearOlderThan(maxAgeMs: number): number;
145
+ }
146
+
147
+ export { ErrorAggregator as E };
@@ -0,0 +1,147 @@
1
+ import { c as ErrorOccurrence, E as ErrorGroup, T as TraceData } from './exporter-Cui3gZsI.cjs';
2
+
3
+ /**
4
+ * Error Aggregator
5
+ *
6
+ * Groups similar errors together based on stack trace fingerprinting.
7
+ * Tracks error frequency, first/last occurrence, and affected traces.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const aggregator = new ErrorAggregator({ maxGroups: 100 });
12
+ *
13
+ * // Add errors from spans
14
+ * aggregator.addError({
15
+ * traceId: '123',
16
+ * spanId: '456',
17
+ * spanName: 'api.createUser',
18
+ * service: 'user-service',
19
+ * timestamp: Date.now(),
20
+ * error: {
21
+ * type: 'ValidationError',
22
+ * message: 'Invalid email format',
23
+ * stackTrace: 'Error: Invalid email...'
24
+ * }
25
+ * });
26
+ *
27
+ * // Get aggregated error groups
28
+ * const groups = aggregator.getErrorGroups();
29
+ * ```
30
+ */
31
+
32
+ interface ErrorAggregatorOptions {
33
+ /**
34
+ * Maximum number of error groups to track (default: 100)
35
+ * Oldest groups are evicted when limit is reached
36
+ */
37
+ maxGroups?: number;
38
+ /**
39
+ * Maximum number of affected traces to keep per group (default: 10)
40
+ */
41
+ maxAffectedTraces?: number;
42
+ /**
43
+ * Maximum number of affected span names to keep per group (default: 5)
44
+ */
45
+ maxAffectedSpans?: number;
46
+ /**
47
+ * Number of stack frames to use for fingerprinting (default: 5)
48
+ */
49
+ stackFramesForFingerprint?: number;
50
+ }
51
+ declare class ErrorAggregator {
52
+ private errorGroups;
53
+ private options;
54
+ constructor(options?: ErrorAggregatorOptions);
55
+ /**
56
+ * Add an error occurrence to the aggregator
57
+ */
58
+ addError(occurrence: ErrorOccurrence): ErrorGroup;
59
+ /**
60
+ * Extract errors from a trace and add them to the aggregator
61
+ */
62
+ addErrorsFromTrace(trace: TraceData): ErrorGroup[];
63
+ /**
64
+ * Extract error occurrence from a span
65
+ */
66
+ private extractErrorFromSpan;
67
+ /**
68
+ * Extract stack trace from span events (exception events)
69
+ */
70
+ private extractStackFromEvents;
71
+ /**
72
+ * Extract relevant attributes for error context
73
+ */
74
+ private extractRelevantAttributes;
75
+ /**
76
+ * Generate a fingerprint for error grouping
77
+ *
78
+ * Uses error type + first N stack frames (normalized)
79
+ */
80
+ private generateFingerprint;
81
+ /**
82
+ * Extract and normalize stack frames from a stack trace
83
+ */
84
+ private extractStackFrames;
85
+ /**
86
+ * Normalize file path by removing absolute path prefixes and node_modules paths
87
+ */
88
+ private normalizeFilePath;
89
+ /**
90
+ * Normalize error message by removing dynamic parts
91
+ */
92
+ private normalizeMessage;
93
+ /**
94
+ * Normalize stack trace for display
95
+ */
96
+ private normalizeStackTrace;
97
+ /**
98
+ * Simple hash function for fingerprinting
99
+ */
100
+ private simpleHash;
101
+ /**
102
+ * Evict the oldest error group
103
+ */
104
+ private evictOldestGroup;
105
+ /**
106
+ * Get all error groups, sorted by most recent
107
+ */
108
+ getErrorGroups(): ErrorGroup[];
109
+ /**
110
+ * Get error groups sorted by count (most frequent first)
111
+ */
112
+ getErrorGroupsByFrequency(): ErrorGroup[];
113
+ /**
114
+ * Get a specific error group by fingerprint
115
+ */
116
+ getErrorGroup(fingerprint: string): ErrorGroup | undefined;
117
+ /**
118
+ * Get error groups for a specific service
119
+ */
120
+ getErrorGroupsByService(service: string): ErrorGroup[];
121
+ /**
122
+ * Get total error count across all groups
123
+ */
124
+ getTotalErrorCount(): number;
125
+ /**
126
+ * Get error statistics
127
+ */
128
+ getStats(): {
129
+ totalGroups: number;
130
+ totalErrors: number;
131
+ recentErrors: number;
132
+ topErrorTypes: Array<{
133
+ type: string;
134
+ count: number;
135
+ }>;
136
+ };
137
+ /**
138
+ * Clear all error groups
139
+ */
140
+ clear(): void;
141
+ /**
142
+ * Clear old error groups (not seen in given time window)
143
+ */
144
+ clearOlderThan(maxAgeMs: number): number;
145
+ }
146
+
147
+ export { ErrorAggregator as E };
@@ -0,0 +1,147 @@
1
+ import { c as ErrorOccurrence, E as ErrorGroup, T as TraceData } from './exporter-CyzRMJ6C.js';
2
+
3
+ /**
4
+ * Error Aggregator
5
+ *
6
+ * Groups similar errors together based on stack trace fingerprinting.
7
+ * Tracks error frequency, first/last occurrence, and affected traces.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const aggregator = new ErrorAggregator({ maxGroups: 100 });
12
+ *
13
+ * // Add errors from spans
14
+ * aggregator.addError({
15
+ * traceId: '123',
16
+ * spanId: '456',
17
+ * spanName: 'api.createUser',
18
+ * service: 'user-service',
19
+ * timestamp: Date.now(),
20
+ * error: {
21
+ * type: 'ValidationError',
22
+ * message: 'Invalid email format',
23
+ * stackTrace: 'Error: Invalid email...'
24
+ * }
25
+ * });
26
+ *
27
+ * // Get aggregated error groups
28
+ * const groups = aggregator.getErrorGroups();
29
+ * ```
30
+ */
31
+
32
+ interface ErrorAggregatorOptions {
33
+ /**
34
+ * Maximum number of error groups to track (default: 100)
35
+ * Oldest groups are evicted when limit is reached
36
+ */
37
+ maxGroups?: number;
38
+ /**
39
+ * Maximum number of affected traces to keep per group (default: 10)
40
+ */
41
+ maxAffectedTraces?: number;
42
+ /**
43
+ * Maximum number of affected span names to keep per group (default: 5)
44
+ */
45
+ maxAffectedSpans?: number;
46
+ /**
47
+ * Number of stack frames to use for fingerprinting (default: 5)
48
+ */
49
+ stackFramesForFingerprint?: number;
50
+ }
51
+ declare class ErrorAggregator {
52
+ private errorGroups;
53
+ private options;
54
+ constructor(options?: ErrorAggregatorOptions);
55
+ /**
56
+ * Add an error occurrence to the aggregator
57
+ */
58
+ addError(occurrence: ErrorOccurrence): ErrorGroup;
59
+ /**
60
+ * Extract errors from a trace and add them to the aggregator
61
+ */
62
+ addErrorsFromTrace(trace: TraceData): ErrorGroup[];
63
+ /**
64
+ * Extract error occurrence from a span
65
+ */
66
+ private extractErrorFromSpan;
67
+ /**
68
+ * Extract stack trace from span events (exception events)
69
+ */
70
+ private extractStackFromEvents;
71
+ /**
72
+ * Extract relevant attributes for error context
73
+ */
74
+ private extractRelevantAttributes;
75
+ /**
76
+ * Generate a fingerprint for error grouping
77
+ *
78
+ * Uses error type + first N stack frames (normalized)
79
+ */
80
+ private generateFingerprint;
81
+ /**
82
+ * Extract and normalize stack frames from a stack trace
83
+ */
84
+ private extractStackFrames;
85
+ /**
86
+ * Normalize file path by removing absolute path prefixes and node_modules paths
87
+ */
88
+ private normalizeFilePath;
89
+ /**
90
+ * Normalize error message by removing dynamic parts
91
+ */
92
+ private normalizeMessage;
93
+ /**
94
+ * Normalize stack trace for display
95
+ */
96
+ private normalizeStackTrace;
97
+ /**
98
+ * Simple hash function for fingerprinting
99
+ */
100
+ private simpleHash;
101
+ /**
102
+ * Evict the oldest error group
103
+ */
104
+ private evictOldestGroup;
105
+ /**
106
+ * Get all error groups, sorted by most recent
107
+ */
108
+ getErrorGroups(): ErrorGroup[];
109
+ /**
110
+ * Get error groups sorted by count (most frequent first)
111
+ */
112
+ getErrorGroupsByFrequency(): ErrorGroup[];
113
+ /**
114
+ * Get a specific error group by fingerprint
115
+ */
116
+ getErrorGroup(fingerprint: string): ErrorGroup | undefined;
117
+ /**
118
+ * Get error groups for a specific service
119
+ */
120
+ getErrorGroupsByService(service: string): ErrorGroup[];
121
+ /**
122
+ * Get total error count across all groups
123
+ */
124
+ getTotalErrorCount(): number;
125
+ /**
126
+ * Get error statistics
127
+ */
128
+ getStats(): {
129
+ totalGroups: number;
130
+ totalErrors: number;
131
+ recentErrors: number;
132
+ topErrorTypes: Array<{
133
+ type: string;
134
+ count: number;
135
+ }>;
136
+ };
137
+ /**
138
+ * Clear all error groups
139
+ */
140
+ clear(): void;
141
+ /**
142
+ * Clear old error groups (not seen in given time window)
143
+ */
144
+ clearOlderThan(maxAgeMs: number): number;
145
+ }
146
+
147
+ export { ErrorAggregator as E };