autotel 7.9.0 → 7.10.1
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/README.md +16 -0
- package/dist/analysis.cjs +1 -1
- package/dist/analysis.d.cts +6 -7
- package/dist/analysis.d.ts +6 -7
- package/dist/analysis.js +1 -1
- package/dist/attributes.d.cts +1 -1
- package/dist/attributes.d.ts +1 -1
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/business-baggage.d.cts +12 -13
- package/dist/business-baggage.d.ts +12 -13
- package/dist/{canonical-log-line-processor-Bwrt_L4c.d.ts → canonical-log-line-processor-DDGzm-wi.d.ts} +1 -1
- package/dist/{canonical-log-line-processor-C0Z_N4oL.d.cts → canonical-log-line-processor-DLeAQjgb.d.cts} +1 -1
- package/dist/channel-BobQKsZd.js +64 -0
- package/dist/channel-D0eaVqn3.cjs +81 -0
- package/dist/config.d.cts +7 -7
- package/dist/config.d.ts +7 -7
- package/dist/correlation-id.cjs +1 -1
- package/dist/correlation-id.d.cts +9 -10
- package/dist/correlation-id.d.ts +9 -10
- package/dist/correlation-id.js +1 -1
- package/dist/db.d.cts +18 -19
- package/dist/db.d.ts +18 -19
- package/dist/decorators.cjs +1 -1
- package/dist/decorators.d.cts +7 -7
- package/dist/decorators.d.ts +7 -7
- package/dist/decorators.js +1 -1
- package/dist/diagnostics.cjs +10 -70
- package/dist/diagnostics.d.cts +6 -6
- package/dist/diagnostics.d.ts +6 -6
- package/dist/diagnostics.js +1 -61
- package/dist/drain-pipeline.d.cts +4 -5
- package/dist/drain-pipeline.d.ts +4 -5
- package/dist/enrichers.d.cts +7 -8
- package/dist/enrichers.d.ts +7 -8
- package/dist/event.cjs +1 -1
- package/dist/event.d.cts +6 -6
- package/dist/event.d.ts +6 -6
- package/dist/event.js +1 -1
- package/dist/evidence.d.cts +13 -14
- package/dist/evidence.d.ts +13 -14
- package/dist/exception-fingerprint.d.cts +10 -11
- package/dist/exception-fingerprint.d.ts +10 -11
- package/dist/exporters.d.cts +2 -2
- package/dist/exporters.d.ts +2 -2
- package/dist/feature-flags.d.cts +23 -24
- package/dist/feature-flags.d.ts +23 -24
- package/dist/{filtering-span-processor-vkewzbqB.d.ts → filtering-span-processor-BDGe1myy.d.ts} +1 -1
- package/dist/{filtering-span-processor-BpDagWNa.d.cts → filtering-span-processor-BYvLMiNz.d.cts} +1 -1
- package/dist/filtering-span-processor.cjs +3 -3
- package/dist/filtering-span-processor.d.cts +1 -1
- package/dist/filtering-span-processor.d.ts +1 -1
- package/dist/filtering-span-processor.js +3 -3
- package/dist/{functional-6QPJDqUW.js → functional-C4gGiBou.js} +14 -9
- package/dist/{functional-SeRUabkE.d.ts → functional-CbcInXMJ.d.ts} +1 -1
- package/dist/{functional-DxHvvWc_.cjs → functional-DptEM9La.cjs} +14 -9
- package/dist/{functional-DPZTpGh6.d.cts → functional-j8Joyrwd.d.cts} +1 -1
- package/dist/functional.cjs +1 -1
- package/dist/functional.d.cts +1 -1
- package/dist/functional.d.ts +1 -1
- package/dist/functional.js +1 -1
- package/dist/http.cjs +1 -1
- package/dist/http.d.cts +6 -7
- package/dist/http.d.ts +6 -7
- package/dist/http.js +1 -1
- package/dist/{index-B9aRLp6c.d.ts → index-DAH41w0W.d.ts} +4 -4
- package/dist/{index-8bFU4kmd.d.cts → index-DVPsz3DK.d.cts} +4 -4
- package/dist/index.cjs +3 -2
- package/dist/index.d.cts +38 -38
- package/dist/index.d.ts +38 -38
- package/dist/index.js +4 -4
- package/dist/{init-CnoRlJqS.d.ts → init-Biyby8Br.d.ts} +21 -5
- package/dist/{init-C-qfxo_u.js → init-BvUtwZNx.js} +104 -14
- package/dist/{init-COfMwKbc.d.cts → init-CHanKvOq.d.cts} +21 -5
- package/dist/{init-W_klPrYk.cjs → init-Cx1-ejLn.cjs} +108 -17
- package/dist/instrumentation.cjs +1 -1
- package/dist/instrumentation.d.cts +4 -5
- package/dist/instrumentation.d.ts +4 -5
- package/dist/instrumentation.js +1 -1
- package/dist/{logger-S1Fgl0g3.d.cts → logger-C9UT1aZ_.d.cts} +4 -4
- package/dist/{logger-S1Fgl0g3.d.ts → logger-C9UT1aZ_.d.ts} +4 -4
- package/dist/logger.d.cts +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/messaging-adapters.d.cts +10 -11
- package/dist/messaging-adapters.d.ts +10 -11
- package/dist/messaging-testing.d.cts +19 -20
- package/dist/messaging-testing.d.ts +19 -20
- package/dist/messaging.cjs +2 -2
- package/dist/messaging.d.cts +23 -24
- package/dist/messaging.d.ts +23 -24
- package/dist/messaging.js +2 -2
- package/dist/metric-helpers.d.cts +6 -7
- package/dist/metric-helpers.d.ts +6 -7
- package/dist/metric.d.cts +7 -7
- package/dist/metric.d.ts +7 -7
- package/dist/parse-error.d.cts +3 -4
- package/dist/parse-error.d.ts +3 -4
- package/dist/policy.cjs +0 -0
- package/dist/policy.js +0 -0
- package/dist/processors.d.cts +1 -1
- package/dist/processors.d.ts +1 -1
- package/dist/{sampling-CZi7OM9u.d.ts → sampling-B_8orhSB.d.ts} +1 -1
- package/dist/{sampling-DENUjT_8.d.cts → sampling-Dud4XU2m.d.cts} +1 -1
- package/dist/sampling.cjs +1 -1
- package/dist/sampling.d.cts +1 -1
- package/dist/sampling.d.ts +1 -1
- package/dist/sampling.js +1 -1
- package/dist/security-schema.d.cts +30 -31
- package/dist/security-schema.d.ts +30 -31
- package/dist/semantic-conventions-yG0X2AsN.d.cts +31 -0
- package/dist/semantic-conventions-yG0X2AsN.d.ts +31 -0
- package/dist/semantic-conventions.d.cts +1 -1
- package/dist/semantic-conventions.d.ts +1 -1
- package/dist/semantic-helpers.cjs +1 -1
- package/dist/semantic-helpers.d.cts +10 -11
- package/dist/semantic-helpers.d.ts +10 -11
- package/dist/semantic-helpers.js +1 -1
- package/dist/slo.d.cts +12 -13
- package/dist/slo.d.ts +12 -13
- package/dist/tail-sampling-processor.cjs +1 -1
- package/dist/tail-sampling-processor.d.cts +2 -3
- package/dist/tail-sampling-processor.d.ts +2 -3
- package/dist/tail-sampling-processor.js +1 -1
- package/dist/test-span-collector.d.cts +4 -5
- package/dist/test-span-collector.d.ts +4 -5
- package/dist/testing.d.cts +18 -18
- package/dist/testing.d.ts +18 -18
- package/dist/trace-helpers.d.cts +15 -16
- package/dist/trace-helpers.d.ts +15 -16
- package/dist/tracer-provider.cjs +21 -1
- package/dist/tracer-provider.d.cts +16 -6
- package/dist/tracer-provider.d.ts +16 -6
- package/dist/tracer-provider.js +22 -3
- package/dist/validate.cjs +8 -7
- package/dist/validate.d.cts +12 -12
- package/dist/validate.d.ts +12 -12
- package/dist/validate.js +8 -7
- package/dist/validation-attributes.d.cts +14 -15
- package/dist/validation-attributes.d.ts +14 -15
- package/dist/webhook.cjs +1 -1
- package/dist/webhook.d.cts +11 -12
- package/dist/webhook.d.ts +11 -12
- package/dist/webhook.js +1 -1
- package/dist/workflow-distributed.cjs +1 -1
- package/dist/workflow-distributed.d.cts +26 -27
- package/dist/workflow-distributed.d.ts +26 -27
- package/dist/workflow-distributed.js +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.d.cts +11 -12
- package/dist/workflow.d.ts +11 -12
- package/dist/workflow.js +1 -1
- package/dist/yaml-config.cjs +1 -1
- package/dist/yaml-config.d.cts +9 -10
- package/dist/yaml-config.d.ts +9 -10
- package/dist/yaml-config.js +1 -1
- package/package.json +15 -21
- package/dist/semantic-conventions-FhSxv-bK.d.cts +0 -31
- package/dist/semantic-conventions-FhSxv-bK.d.ts +0 -31
|
@@ -4,7 +4,7 @@ import { AttributeValue, SpanContext } from "@opentelemetry/api";
|
|
|
4
4
|
/**
|
|
5
5
|
* Producer adapter configuration
|
|
6
6
|
*/
|
|
7
|
-
interface ProducerAdapter {
|
|
7
|
+
export interface ProducerAdapter {
|
|
8
8
|
/**
|
|
9
9
|
* Hook to add system-specific attributes to producer spans
|
|
10
10
|
*/
|
|
@@ -17,7 +17,7 @@ interface ProducerAdapter {
|
|
|
17
17
|
/**
|
|
18
18
|
* Consumer adapter configuration
|
|
19
19
|
*/
|
|
20
|
-
interface ConsumerAdapter {
|
|
20
|
+
export interface ConsumerAdapter {
|
|
21
21
|
/**
|
|
22
22
|
* Extract headers from the message for trace context propagation
|
|
23
23
|
*/
|
|
@@ -34,11 +34,11 @@ interface ConsumerAdapter {
|
|
|
34
34
|
/**
|
|
35
35
|
* Combined producer and consumer adapter
|
|
36
36
|
*/
|
|
37
|
-
interface MessagingAdapter {
|
|
37
|
+
export interface MessagingAdapter {
|
|
38
38
|
producer?: ProducerAdapter;
|
|
39
39
|
consumer?: ConsumerAdapter;
|
|
40
40
|
}
|
|
41
|
-
declare const natsAdapter: MessagingAdapter;
|
|
41
|
+
export declare const natsAdapter: MessagingAdapter;
|
|
42
42
|
/**
|
|
43
43
|
* Temporal adapter
|
|
44
44
|
*
|
|
@@ -68,7 +68,7 @@ declare const natsAdapter: MessagingAdapter;
|
|
|
68
68
|
* });
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
declare const temporalAdapter: MessagingAdapter;
|
|
71
|
+
export declare const temporalAdapter: MessagingAdapter;
|
|
72
72
|
/**
|
|
73
73
|
* Cloudflare Queues adapter
|
|
74
74
|
*
|
|
@@ -94,7 +94,7 @@ declare const temporalAdapter: MessagingAdapter;
|
|
|
94
94
|
* });
|
|
95
95
|
* ```
|
|
96
96
|
*/
|
|
97
|
-
declare const cloudflareQueuesAdapter: MessagingAdapter;
|
|
97
|
+
export declare const cloudflareQueuesAdapter: MessagingAdapter;
|
|
98
98
|
/**
|
|
99
99
|
* Datadog trace context extractor
|
|
100
100
|
*
|
|
@@ -115,7 +115,7 @@ declare const cloudflareQueuesAdapter: MessagingAdapter;
|
|
|
115
115
|
* });
|
|
116
116
|
* ```
|
|
117
117
|
*/
|
|
118
|
-
declare function datadogContextExtractor(headers: Record<string, string>): SpanContext | null;
|
|
118
|
+
export declare function datadogContextExtractor(headers: Record<string, string>): SpanContext | null;
|
|
119
119
|
/**
|
|
120
120
|
* B3 (Zipkin) trace context extractor
|
|
121
121
|
*
|
|
@@ -141,7 +141,7 @@ declare function datadogContextExtractor(headers: Record<string, string>): SpanC
|
|
|
141
141
|
* // Headers: X-B3-TraceId, X-B3-SpanId, X-B3-Sampled
|
|
142
142
|
* ```
|
|
143
143
|
*/
|
|
144
|
-
declare function b3ContextExtractor(headers: Record<string, string>): SpanContext | null;
|
|
144
|
+
export declare function b3ContextExtractor(headers: Record<string, string>): SpanContext | null;
|
|
145
145
|
/**
|
|
146
146
|
* AWS X-Ray trace context extractor
|
|
147
147
|
*
|
|
@@ -159,6 +159,5 @@ declare function b3ContextExtractor(headers: Record<string, string>): SpanContex
|
|
|
159
159
|
* });
|
|
160
160
|
* ```
|
|
161
161
|
*/
|
|
162
|
-
declare function xrayContextExtractor(headers: Record<string, string>): SpanContext | null;
|
|
163
|
-
//#endregion
|
|
164
|
-
export { ConsumerAdapter, MessagingAdapter, ProducerAdapter, b3ContextExtractor, cloudflareQueuesAdapter, datadogContextExtractor, natsAdapter, temporalAdapter, xrayContextExtractor };
|
|
162
|
+
export declare function xrayContextExtractor(headers: Record<string, string>): SpanContext | null;
|
|
163
|
+
//#endregion
|
|
@@ -4,7 +4,7 @@ import { Link, SpanContext } from "@opentelemetry/api";
|
|
|
4
4
|
/**
|
|
5
5
|
* Recorded producer call
|
|
6
6
|
*/
|
|
7
|
-
interface RecordedProducerCall {
|
|
7
|
+
export interface RecordedProducerCall {
|
|
8
8
|
/** Destination (topic/queue) */
|
|
9
9
|
destination: string;
|
|
10
10
|
/** System (kafka, sqs, etc.) */
|
|
@@ -23,7 +23,7 @@ interface RecordedProducerCall {
|
|
|
23
23
|
/**
|
|
24
24
|
* Recorded consumer call
|
|
25
25
|
*/
|
|
26
|
-
interface RecordedConsumerCall {
|
|
26
|
+
export interface RecordedConsumerCall {
|
|
27
27
|
/** Destination (topic/queue) */
|
|
28
28
|
destination: string;
|
|
29
29
|
/** System (kafka, sqs, etc.) */
|
|
@@ -50,7 +50,7 @@ interface RecordedConsumerCall {
|
|
|
50
50
|
/**
|
|
51
51
|
* Recorded rebalance event
|
|
52
52
|
*/
|
|
53
|
-
interface RecordedRebalanceEvent extends RebalanceEvent {
|
|
53
|
+
export interface RecordedRebalanceEvent extends RebalanceEvent {
|
|
54
54
|
/** Destination (topic) */
|
|
55
55
|
destination: string;
|
|
56
56
|
/** Consumer group */
|
|
@@ -59,7 +59,7 @@ interface RecordedRebalanceEvent extends RebalanceEvent {
|
|
|
59
59
|
/**
|
|
60
60
|
* Mock message for testing
|
|
61
61
|
*/
|
|
62
|
-
interface MockMessage<T = unknown> {
|
|
62
|
+
export interface MockMessage<T = unknown> {
|
|
63
63
|
/** Message payload */
|
|
64
64
|
payload: T;
|
|
65
65
|
/** Headers */
|
|
@@ -78,7 +78,7 @@ interface MockMessage<T = unknown> {
|
|
|
78
78
|
/**
|
|
79
79
|
* Producer assertion options
|
|
80
80
|
*/
|
|
81
|
-
interface ProducerAssertionOptions {
|
|
81
|
+
export interface ProducerAssertionOptions {
|
|
82
82
|
/** Expected number of messages */
|
|
83
83
|
messageCount?: number;
|
|
84
84
|
/** Whether trace headers should be present */
|
|
@@ -93,7 +93,7 @@ interface ProducerAssertionOptions {
|
|
|
93
93
|
/**
|
|
94
94
|
* Consumer assertion options
|
|
95
95
|
*/
|
|
96
|
-
interface ConsumerAssertionOptions {
|
|
96
|
+
export interface ConsumerAssertionOptions {
|
|
97
97
|
/** Expected number of messages processed */
|
|
98
98
|
messageCount?: number;
|
|
99
99
|
/** Whether producer links should be present */
|
|
@@ -112,7 +112,7 @@ interface ConsumerAssertionOptions {
|
|
|
112
112
|
/**
|
|
113
113
|
* Messaging test harness
|
|
114
114
|
*/
|
|
115
|
-
interface MessagingTestHarness {
|
|
115
|
+
export interface MessagingTestHarness {
|
|
116
116
|
/** All recorded producer calls */
|
|
117
117
|
producerCalls: RecordedProducerCall[];
|
|
118
118
|
/** All recorded consumer calls */
|
|
@@ -211,11 +211,11 @@ interface MessagingTestHarness {
|
|
|
211
211
|
* });
|
|
212
212
|
* ```
|
|
213
213
|
*/
|
|
214
|
-
declare function createMessagingTestHarness(): MessagingTestHarness;
|
|
214
|
+
export declare function createMessagingTestHarness(): MessagingTestHarness;
|
|
215
215
|
/**
|
|
216
216
|
* Mock message broker for testing
|
|
217
217
|
*/
|
|
218
|
-
interface MockMessageBroker {
|
|
218
|
+
export interface MockMessageBroker {
|
|
219
219
|
/** Topics/queues in the broker */
|
|
220
220
|
topics: Map<string, MockMessage[]>;
|
|
221
221
|
/**
|
|
@@ -269,27 +269,27 @@ interface MockMessageBroker {
|
|
|
269
269
|
* expect(messages[0].payload).toEqual({ orderId: '123' });
|
|
270
270
|
* ```
|
|
271
271
|
*/
|
|
272
|
-
declare function createMockMessageBroker(): MockMessageBroker;
|
|
272
|
+
export declare function createMockMessageBroker(): MockMessageBroker;
|
|
273
273
|
/**
|
|
274
274
|
* Extract trace ID from traceparent header
|
|
275
275
|
*/
|
|
276
|
-
declare function extractTraceIdFromHeader(traceparent: string): string | null;
|
|
276
|
+
export declare function extractTraceIdFromHeader(traceparent: string): string | null;
|
|
277
277
|
/**
|
|
278
278
|
* Extract span ID from traceparent header
|
|
279
279
|
*/
|
|
280
|
-
declare function extractSpanIdFromHeader(traceparent: string): string | null;
|
|
280
|
+
export declare function extractSpanIdFromHeader(traceparent: string): string | null;
|
|
281
281
|
/**
|
|
282
282
|
* Create a mock span context
|
|
283
283
|
*/
|
|
284
|
-
declare function createMockSpanContext(traceId?: string, spanId?: string): SpanContext;
|
|
284
|
+
export declare function createMockSpanContext(traceId?: string, spanId?: string): SpanContext;
|
|
285
285
|
/**
|
|
286
286
|
* Create a mock link to a producer span
|
|
287
287
|
*/
|
|
288
|
-
declare function createMockProducerLink(traceId?: string, spanId?: string): Link;
|
|
288
|
+
export declare function createMockProducerLink(traceId?: string, spanId?: string): Link;
|
|
289
289
|
/**
|
|
290
290
|
* Create a batch of mock messages
|
|
291
291
|
*/
|
|
292
|
-
declare function createMockMessageBatch<T>(payloads: T[], options?: {
|
|
292
|
+
export declare function createMockMessageBatch<T>(payloads: T[], options?: {
|
|
293
293
|
startOffset?: number;
|
|
294
294
|
partition?: number;
|
|
295
295
|
addTraceHeaders?: boolean;
|
|
@@ -298,17 +298,16 @@ declare function createMockMessageBatch<T>(payloads: T[], options?: {
|
|
|
298
298
|
/**
|
|
299
299
|
* Create a rebalance scenario
|
|
300
300
|
*/
|
|
301
|
-
declare function createRebalanceScenario(topic: string, consumerGroup: string, partitions: number[]): {
|
|
301
|
+
export declare function createRebalanceScenario(topic: string, consumerGroup: string, partitions: number[]): {
|
|
302
302
|
assignEvent: RecordedRebalanceEvent;
|
|
303
303
|
revokeEvent: RecordedRebalanceEvent;
|
|
304
304
|
};
|
|
305
305
|
/**
|
|
306
306
|
* Create an out-of-order scenario
|
|
307
307
|
*/
|
|
308
|
-
declare function createOutOfOrderScenario<T>(payloads: T[], outOfOrderIndices: number[]): MockMessage<T>[];
|
|
308
|
+
export declare function createOutOfOrderScenario<T>(payloads: T[], outOfOrderIndices: number[]): MockMessage<T>[];
|
|
309
309
|
/**
|
|
310
310
|
* Create a duplicate message scenario
|
|
311
311
|
*/
|
|
312
|
-
declare function createDuplicateScenario<T>(payloads: T[], duplicateIndices: number[]): MockMessage<T>[];
|
|
313
|
-
//#endregion
|
|
314
|
-
export { ConsumerAssertionOptions, MessagingTestHarness, MockMessage, MockMessageBroker, ProducerAssertionOptions, RecordedConsumerCall, RecordedProducerCall, RecordedRebalanceEvent, createDuplicateScenario, createMessagingTestHarness, createMockMessageBatch, createMockMessageBroker, createMockProducerLink, createMockSpanContext, createOutOfOrderScenario, createRebalanceScenario, extractSpanIdFromHeader, extractTraceIdFromHeader };
|
|
312
|
+
export declare function createDuplicateScenario<T>(payloads: T[], duplicateIndices: number[]): MockMessage<T>[];
|
|
313
|
+
//#endregion
|
|
@@ -4,7 +4,7 @@ import { Link, SpanContext } from "@opentelemetry/api";
|
|
|
4
4
|
/**
|
|
5
5
|
* Recorded producer call
|
|
6
6
|
*/
|
|
7
|
-
interface RecordedProducerCall {
|
|
7
|
+
export interface RecordedProducerCall {
|
|
8
8
|
/** Destination (topic/queue) */
|
|
9
9
|
destination: string;
|
|
10
10
|
/** System (kafka, sqs, etc.) */
|
|
@@ -23,7 +23,7 @@ interface RecordedProducerCall {
|
|
|
23
23
|
/**
|
|
24
24
|
* Recorded consumer call
|
|
25
25
|
*/
|
|
26
|
-
interface RecordedConsumerCall {
|
|
26
|
+
export interface RecordedConsumerCall {
|
|
27
27
|
/** Destination (topic/queue) */
|
|
28
28
|
destination: string;
|
|
29
29
|
/** System (kafka, sqs, etc.) */
|
|
@@ -50,7 +50,7 @@ interface RecordedConsumerCall {
|
|
|
50
50
|
/**
|
|
51
51
|
* Recorded rebalance event
|
|
52
52
|
*/
|
|
53
|
-
interface RecordedRebalanceEvent extends RebalanceEvent {
|
|
53
|
+
export interface RecordedRebalanceEvent extends RebalanceEvent {
|
|
54
54
|
/** Destination (topic) */
|
|
55
55
|
destination: string;
|
|
56
56
|
/** Consumer group */
|
|
@@ -59,7 +59,7 @@ interface RecordedRebalanceEvent extends RebalanceEvent {
|
|
|
59
59
|
/**
|
|
60
60
|
* Mock message for testing
|
|
61
61
|
*/
|
|
62
|
-
interface MockMessage<T = unknown> {
|
|
62
|
+
export interface MockMessage<T = unknown> {
|
|
63
63
|
/** Message payload */
|
|
64
64
|
payload: T;
|
|
65
65
|
/** Headers */
|
|
@@ -78,7 +78,7 @@ interface MockMessage<T = unknown> {
|
|
|
78
78
|
/**
|
|
79
79
|
* Producer assertion options
|
|
80
80
|
*/
|
|
81
|
-
interface ProducerAssertionOptions {
|
|
81
|
+
export interface ProducerAssertionOptions {
|
|
82
82
|
/** Expected number of messages */
|
|
83
83
|
messageCount?: number;
|
|
84
84
|
/** Whether trace headers should be present */
|
|
@@ -93,7 +93,7 @@ interface ProducerAssertionOptions {
|
|
|
93
93
|
/**
|
|
94
94
|
* Consumer assertion options
|
|
95
95
|
*/
|
|
96
|
-
interface ConsumerAssertionOptions {
|
|
96
|
+
export interface ConsumerAssertionOptions {
|
|
97
97
|
/** Expected number of messages processed */
|
|
98
98
|
messageCount?: number;
|
|
99
99
|
/** Whether producer links should be present */
|
|
@@ -112,7 +112,7 @@ interface ConsumerAssertionOptions {
|
|
|
112
112
|
/**
|
|
113
113
|
* Messaging test harness
|
|
114
114
|
*/
|
|
115
|
-
interface MessagingTestHarness {
|
|
115
|
+
export interface MessagingTestHarness {
|
|
116
116
|
/** All recorded producer calls */
|
|
117
117
|
producerCalls: RecordedProducerCall[];
|
|
118
118
|
/** All recorded consumer calls */
|
|
@@ -211,11 +211,11 @@ interface MessagingTestHarness {
|
|
|
211
211
|
* });
|
|
212
212
|
* ```
|
|
213
213
|
*/
|
|
214
|
-
declare function createMessagingTestHarness(): MessagingTestHarness;
|
|
214
|
+
export declare function createMessagingTestHarness(): MessagingTestHarness;
|
|
215
215
|
/**
|
|
216
216
|
* Mock message broker for testing
|
|
217
217
|
*/
|
|
218
|
-
interface MockMessageBroker {
|
|
218
|
+
export interface MockMessageBroker {
|
|
219
219
|
/** Topics/queues in the broker */
|
|
220
220
|
topics: Map<string, MockMessage[]>;
|
|
221
221
|
/**
|
|
@@ -269,27 +269,27 @@ interface MockMessageBroker {
|
|
|
269
269
|
* expect(messages[0].payload).toEqual({ orderId: '123' });
|
|
270
270
|
* ```
|
|
271
271
|
*/
|
|
272
|
-
declare function createMockMessageBroker(): MockMessageBroker;
|
|
272
|
+
export declare function createMockMessageBroker(): MockMessageBroker;
|
|
273
273
|
/**
|
|
274
274
|
* Extract trace ID from traceparent header
|
|
275
275
|
*/
|
|
276
|
-
declare function extractTraceIdFromHeader(traceparent: string): string | null;
|
|
276
|
+
export declare function extractTraceIdFromHeader(traceparent: string): string | null;
|
|
277
277
|
/**
|
|
278
278
|
* Extract span ID from traceparent header
|
|
279
279
|
*/
|
|
280
|
-
declare function extractSpanIdFromHeader(traceparent: string): string | null;
|
|
280
|
+
export declare function extractSpanIdFromHeader(traceparent: string): string | null;
|
|
281
281
|
/**
|
|
282
282
|
* Create a mock span context
|
|
283
283
|
*/
|
|
284
|
-
declare function createMockSpanContext(traceId?: string, spanId?: string): SpanContext;
|
|
284
|
+
export declare function createMockSpanContext(traceId?: string, spanId?: string): SpanContext;
|
|
285
285
|
/**
|
|
286
286
|
* Create a mock link to a producer span
|
|
287
287
|
*/
|
|
288
|
-
declare function createMockProducerLink(traceId?: string, spanId?: string): Link;
|
|
288
|
+
export declare function createMockProducerLink(traceId?: string, spanId?: string): Link;
|
|
289
289
|
/**
|
|
290
290
|
* Create a batch of mock messages
|
|
291
291
|
*/
|
|
292
|
-
declare function createMockMessageBatch<T>(payloads: T[], options?: {
|
|
292
|
+
export declare function createMockMessageBatch<T>(payloads: T[], options?: {
|
|
293
293
|
startOffset?: number;
|
|
294
294
|
partition?: number;
|
|
295
295
|
addTraceHeaders?: boolean;
|
|
@@ -298,17 +298,16 @@ declare function createMockMessageBatch<T>(payloads: T[], options?: {
|
|
|
298
298
|
/**
|
|
299
299
|
* Create a rebalance scenario
|
|
300
300
|
*/
|
|
301
|
-
declare function createRebalanceScenario(topic: string, consumerGroup: string, partitions: number[]): {
|
|
301
|
+
export declare function createRebalanceScenario(topic: string, consumerGroup: string, partitions: number[]): {
|
|
302
302
|
assignEvent: RecordedRebalanceEvent;
|
|
303
303
|
revokeEvent: RecordedRebalanceEvent;
|
|
304
304
|
};
|
|
305
305
|
/**
|
|
306
306
|
* Create an out-of-order scenario
|
|
307
307
|
*/
|
|
308
|
-
declare function createOutOfOrderScenario<T>(payloads: T[], outOfOrderIndices: number[]): MockMessage<T>[];
|
|
308
|
+
export declare function createOutOfOrderScenario<T>(payloads: T[], outOfOrderIndices: number[]): MockMessage<T>[];
|
|
309
309
|
/**
|
|
310
310
|
* Create a duplicate message scenario
|
|
311
311
|
*/
|
|
312
|
-
declare function createDuplicateScenario<T>(payloads: T[], duplicateIndices: number[]): MockMessage<T>[];
|
|
313
|
-
//#endregion
|
|
314
|
-
export { ConsumerAssertionOptions, MessagingTestHarness, MockMessage, MockMessageBroker, ProducerAssertionOptions, RecordedConsumerCall, RecordedProducerCall, RecordedRebalanceEvent, createDuplicateScenario, createMessagingTestHarness, createMockMessageBatch, createMockMessageBroker, createMockProducerLink, createMockSpanContext, createOutOfOrderScenario, createRebalanceScenario, extractSpanIdFromHeader, extractTraceIdFromHeader };
|
|
312
|
+
export declare function createDuplicateScenario<T>(payloads: T[], duplicateIndices: number[]): MockMessage<T>[];
|
|
313
|
+
//#endregion
|
package/dist/messaging.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_init = require('./init-
|
|
2
|
+
const require_init = require('./init-Cx1-ejLn.cjs');
|
|
3
3
|
const require_values = require('./values-AxGpgYBA.cjs');
|
|
4
|
-
const require_functional = require('./functional-
|
|
4
|
+
const require_functional = require('./functional-DptEM9La.cjs');
|
|
5
5
|
const require_correlated_events = require('./correlated-events-DE_4A3oD.cjs');
|
|
6
6
|
const require_trace_factory_validation = require('./trace-factory-validation-CHU1WcjK.cjs');
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
package/dist/messaging.d.cts
CHANGED
|
@@ -4,15 +4,15 @@ import { Attributes, Link, SpanContext } from "@opentelemetry/api";
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported messaging systems
|
|
6
6
|
*/
|
|
7
|
-
type MessagingSystem = 'kafka' | 'rabbitmq' | 'sqs' | 'sns' | 'pubsub' | 'activemq' | 'azure_servicebus' | 'eventhubs' | (string & {});
|
|
7
|
+
export type MessagingSystem = 'kafka' | 'rabbitmq' | 'sqs' | 'sns' | 'pubsub' | 'activemq' | 'azure_servicebus' | 'eventhubs' | (string & {});
|
|
8
8
|
/**
|
|
9
9
|
* Messaging operation types
|
|
10
10
|
*/
|
|
11
|
-
type MessagingOperation = 'publish' | 'receive' | 'process' | 'settle';
|
|
11
|
+
export type MessagingOperation = 'publish' | 'receive' | 'process' | 'settle';
|
|
12
12
|
/**
|
|
13
13
|
* Configuration for producer tracing
|
|
14
14
|
*/
|
|
15
|
-
interface ProducerConfig {
|
|
15
|
+
export interface ProducerConfig {
|
|
16
16
|
/** Messaging system (kafka, rabbitmq, sqs, etc.) */
|
|
17
17
|
system: MessagingSystem;
|
|
18
18
|
/** Destination name (topic/queue) */
|
|
@@ -83,7 +83,7 @@ interface ProducerConfig {
|
|
|
83
83
|
/**
|
|
84
84
|
* Configuration for consumer tracing
|
|
85
85
|
*/
|
|
86
|
-
interface ConsumerConfig<TMessage = unknown> {
|
|
86
|
+
export interface ConsumerConfig<TMessage = unknown> {
|
|
87
87
|
/** Messaging system (kafka, rabbitmq, sqs, etc.) */
|
|
88
88
|
system: MessagingSystem;
|
|
89
89
|
/** Destination name (topic/queue) */
|
|
@@ -209,7 +209,7 @@ interface ConsumerConfig<TMessage = unknown> {
|
|
|
209
209
|
/**
|
|
210
210
|
* Configuration for consumer lag metrics
|
|
211
211
|
*/
|
|
212
|
-
interface LagMetricsConfig<TMessage = unknown> {
|
|
212
|
+
export interface LagMetricsConfig<TMessage = unknown> {
|
|
213
213
|
/** Get current message offset */
|
|
214
214
|
getCurrentOffset?: (msg: TMessage) => number | undefined;
|
|
215
215
|
/** Get end offset (high watermark) - can be async */
|
|
@@ -222,7 +222,7 @@ interface LagMetricsConfig<TMessage = unknown> {
|
|
|
222
222
|
/**
|
|
223
223
|
* Configuration for message ordering tracking
|
|
224
224
|
*/
|
|
225
|
-
interface OrderingConfig<TMessage = unknown> {
|
|
225
|
+
export interface OrderingConfig<TMessage = unknown> {
|
|
226
226
|
/**
|
|
227
227
|
* Extract sequence number from message
|
|
228
228
|
*
|
|
@@ -291,7 +291,7 @@ interface OrderingConfig<TMessage = unknown> {
|
|
|
291
291
|
/**
|
|
292
292
|
* Information about out-of-order message
|
|
293
293
|
*/
|
|
294
|
-
interface OutOfOrderInfo {
|
|
294
|
+
export interface OutOfOrderInfo {
|
|
295
295
|
/** Current sequence number */
|
|
296
296
|
currentSequence: number;
|
|
297
297
|
/** Expected sequence number */
|
|
@@ -320,7 +320,7 @@ interface OutOfOrderInfo {
|
|
|
320
320
|
* }
|
|
321
321
|
* ```
|
|
322
322
|
*/
|
|
323
|
-
interface ConsumerGroupTrackingConfig {
|
|
323
|
+
export interface ConsumerGroupTrackingConfig {
|
|
324
324
|
/**
|
|
325
325
|
* Consumer member ID
|
|
326
326
|
*
|
|
@@ -366,11 +366,11 @@ interface ConsumerGroupTrackingConfig {
|
|
|
366
366
|
/**
|
|
367
367
|
* Rebalance event types
|
|
368
368
|
*/
|
|
369
|
-
type RebalanceType = 'assigned' | 'revoked' | 'lost';
|
|
369
|
+
export type RebalanceType = 'assigned' | 'revoked' | 'lost';
|
|
370
370
|
/**
|
|
371
371
|
* Rebalance event information
|
|
372
372
|
*/
|
|
373
|
-
interface RebalanceEvent {
|
|
373
|
+
export interface RebalanceEvent {
|
|
374
374
|
/** Type of rebalance event */
|
|
375
375
|
type: RebalanceType;
|
|
376
376
|
/** Partitions affected by the rebalance */
|
|
@@ -387,7 +387,7 @@ interface RebalanceEvent {
|
|
|
387
387
|
/**
|
|
388
388
|
* Partition assignment information
|
|
389
389
|
*/
|
|
390
|
-
interface PartitionAssignment {
|
|
390
|
+
export interface PartitionAssignment {
|
|
391
391
|
/** Topic name */
|
|
392
392
|
topic: string;
|
|
393
393
|
/** Partition number */
|
|
@@ -400,7 +400,7 @@ interface PartitionAssignment {
|
|
|
400
400
|
/**
|
|
401
401
|
* Consumer group state snapshot
|
|
402
402
|
*/
|
|
403
|
-
interface ConsumerGroupState {
|
|
403
|
+
export interface ConsumerGroupState {
|
|
404
404
|
/** Consumer group name */
|
|
405
405
|
groupId: string;
|
|
406
406
|
/** Consumer member ID */
|
|
@@ -421,7 +421,7 @@ interface ConsumerGroupState {
|
|
|
421
421
|
/**
|
|
422
422
|
* Partition lag information
|
|
423
423
|
*/
|
|
424
|
-
interface PartitionLag {
|
|
424
|
+
export interface PartitionLag {
|
|
425
425
|
/** Topic name */
|
|
426
426
|
topic: string;
|
|
427
427
|
/** Partition number */
|
|
@@ -438,11 +438,11 @@ interface PartitionLag {
|
|
|
438
438
|
/**
|
|
439
439
|
* DLQ failure category types
|
|
440
440
|
*/
|
|
441
|
-
type DLQReasonCategory = 'validation' | 'processing' | 'timeout' | 'poison' | 'unknown';
|
|
441
|
+
export type DLQReasonCategory = 'validation' | 'processing' | 'timeout' | 'poison' | 'unknown';
|
|
442
442
|
/**
|
|
443
443
|
* Options for enhanced DLQ recording
|
|
444
444
|
*/
|
|
445
|
-
interface DLQOptions {
|
|
445
|
+
export interface DLQOptions {
|
|
446
446
|
/**
|
|
447
447
|
* Automatically link to the producer span context
|
|
448
448
|
*
|
|
@@ -480,7 +480,7 @@ interface DLQOptions {
|
|
|
480
480
|
/**
|
|
481
481
|
* Options for recording DLQ replay
|
|
482
482
|
*/
|
|
483
|
-
interface DLQReplayOptions {
|
|
483
|
+
export interface DLQReplayOptions {
|
|
484
484
|
/**
|
|
485
485
|
* Original span context from DLQ message
|
|
486
486
|
*
|
|
@@ -500,11 +500,11 @@ interface DLQReplayOptions {
|
|
|
500
500
|
* Extended trace context for producers with header injection
|
|
501
501
|
*/
|
|
502
502
|
/** The W3C trace context headers a producer attaches to a message. */
|
|
503
|
-
interface TraceHeaders {
|
|
503
|
+
export interface TraceHeaders {
|
|
504
504
|
traceparent: string;
|
|
505
505
|
tracestate?: string;
|
|
506
506
|
}
|
|
507
|
-
interface ProducerContext extends TraceContext {
|
|
507
|
+
export interface ProducerContext extends TraceContext {
|
|
508
508
|
/**
|
|
509
509
|
* Get W3C trace context headers to inject into message
|
|
510
510
|
*
|
|
@@ -546,7 +546,7 @@ interface ProducerContext extends TraceContext {
|
|
|
546
546
|
/**
|
|
547
547
|
* Extended trace context for consumers
|
|
548
548
|
*/
|
|
549
|
-
interface ConsumerContext extends TraceContext {
|
|
549
|
+
export interface ConsumerContext extends TraceContext {
|
|
550
550
|
/**
|
|
551
551
|
* Record that a message is being sent to DLQ
|
|
552
552
|
*
|
|
@@ -702,7 +702,7 @@ interface ConsumerContext extends TraceContext {
|
|
|
702
702
|
*/
|
|
703
703
|
getAssignedPartitions(): PartitionAssignment[];
|
|
704
704
|
}
|
|
705
|
-
declare function traceProducer(config: ProducerConfig): <TArgs extends unknown[], TReturn>(fnFactory: (ctx: ProducerContext) => (...args: TArgs) => Promise<TReturn>) => ((...args: TArgs) => Promise<TReturn>);
|
|
705
|
+
export declare function traceProducer(config: ProducerConfig): <TArgs extends unknown[], TReturn>(fnFactory: (ctx: ProducerContext) => (...args: TArgs) => Promise<TReturn>) => ((...args: TArgs) => Promise<TReturn>);
|
|
706
706
|
/**
|
|
707
707
|
* Create a traced message consumer function
|
|
708
708
|
*
|
|
@@ -771,10 +771,9 @@ declare function traceProducer(config: ProducerConfig): <TArgs extends unknown[]
|
|
|
771
771
|
* });
|
|
772
772
|
* ```
|
|
773
773
|
*/
|
|
774
|
-
declare function traceConsumer<TMessage = unknown>(typedConfig: ConsumerConfig<TMessage>): <TArgs extends unknown[], TReturn>(fnFactory: (ctx: ConsumerContext) => (...args: TArgs) => Promise<TReturn>) => ((...args: TArgs) => Promise<TReturn>);
|
|
774
|
+
export declare function traceConsumer<TMessage = unknown>(typedConfig: ConsumerConfig<TMessage>): <TArgs extends unknown[], TReturn>(fnFactory: (ctx: ConsumerContext) => (...args: TArgs) => Promise<TReturn>) => ((...args: TArgs) => Promise<TReturn>);
|
|
775
775
|
/**
|
|
776
776
|
* Clear sequence tracking state (useful for testing)
|
|
777
777
|
*/
|
|
778
|
-
declare function clearOrderingState(): void;
|
|
779
|
-
//#endregion
|
|
780
|
-
export { ConsumerConfig, ConsumerContext, ConsumerGroupState, ConsumerGroupTrackingConfig, DLQOptions, DLQReasonCategory, DLQReplayOptions, LagMetricsConfig, MessagingOperation, MessagingSystem, OrderingConfig, OutOfOrderInfo, PartitionAssignment, PartitionLag, ProducerConfig, ProducerContext, RebalanceEvent, RebalanceType, TraceHeaders, clearOrderingState, traceConsumer, traceProducer };
|
|
778
|
+
export declare function clearOrderingState(): void;
|
|
779
|
+
//#endregion
|