@aws/durable-execution-sdk-js-otel 0.1.1 → 1.0.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.
Files changed (35) hide show
  1. package/README.md +494 -176
  2. package/dist/execution-plugin.mjs +539 -0
  3. package/dist/execution-plugin.mjs.map +1 -0
  4. package/dist/global-id-generator.mjs +622 -0
  5. package/dist/global-id-generator.mjs.map +1 -0
  6. package/dist/index.mjs +8 -537
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/invocation-plugin.mjs +661 -0
  9. package/dist/invocation-plugin.mjs.map +1 -0
  10. package/dist/otel-execution.mjs +15 -0
  11. package/dist/otel-execution.mjs.map +1 -0
  12. package/dist/otel-invocation.mjs +16 -0
  13. package/dist/otel-invocation.mjs.map +1 -0
  14. package/dist-cjs/execution-plugin.js +541 -0
  15. package/dist-cjs/execution-plugin.js.map +1 -0
  16. package/dist-cjs/global-id-generator.js +637 -0
  17. package/dist-cjs/global-id-generator.js.map +1 -0
  18. package/dist-cjs/index.js +18 -540
  19. package/dist-cjs/index.js.map +1 -1
  20. package/dist-cjs/invocation-plugin.js +663 -0
  21. package/dist-cjs/invocation-plugin.js.map +1 -0
  22. package/dist-cjs/otel-execution.js +17 -0
  23. package/dist-cjs/otel-execution.js.map +1 -0
  24. package/dist-cjs/otel-invocation.js +18 -0
  25. package/dist-cjs/otel-invocation.js.map +1 -0
  26. package/package.json +26 -15
  27. package/dist-types/context-extractors.d.ts +0 -43
  28. package/dist-types/context-extractors.d.ts.map +0 -1
  29. package/dist-types/deterministic-id-generator.d.ts +0 -70
  30. package/dist-types/deterministic-id-generator.d.ts.map +0 -1
  31. package/dist-types/index.d.ts +0 -6
  32. package/dist-types/index.d.ts.map +0 -1
  33. package/dist-types/plugin.d.ts +0 -46
  34. package/dist-types/plugin.d.ts.map +0 -1
  35. package/dist-types/tsconfig.build.tsbuildinfo +0 -1
package/dist/index.mjs CHANGED
@@ -1,538 +1,9 @@
1
- import { trace, context, SpanStatusCode } from '@opentelemetry/api';
2
- import { AwsInstrumentation } from '@opentelemetry/instrumentation-aws-sdk';
3
- import { registerInstrumentations } from '@opentelemetry/instrumentation';
4
- import { createHash } from 'node:crypto';
5
-
6
- /**
7
- * A custom OpenTelemetry IdGenerator that produces deterministic trace and span IDs
8
- * derived from execution metadata (X-Ray headers, execution ARNs, operation IDs)
9
- * rather than random values.
10
- *
11
- * This ensures that spans from different Lambda invocations of the same durable
12
- * execution are stitched into a single coherent trace.
13
- */
14
- class DeterministicIdGenerator {
15
- traceId;
16
- nextSpanId;
17
- /**
18
- * Set the trace ID for all subsequent generateTraceId() calls.
19
- * This is persistent until setTraceId is called again.
20
- */
21
- setTraceId(traceId) {
22
- this.traceId = traceId;
23
- }
24
- /**
25
- * Set the span ID to return on the next single generateSpanId() call.
26
- * This is a one-shot override: it is consumed on the next call and then
27
- * reverts to default behavior.
28
- */
29
- setNextSpanId(spanId) {
30
- this.nextSpanId = spanId;
31
- }
32
- /**
33
- * Generate a 32-char lowercase hex trace ID.
34
- *
35
- * If setTraceId has been called, returns that value persistently.
36
- * Otherwise returns a random 32-char hex string as fallback.
37
- */
38
- generateTraceId() {
39
- if (this.traceId) {
40
- return this.traceId;
41
- }
42
- // Fallback: generate a random trace ID
43
- return createHash("sha256")
44
- .update(Math.random().toString())
45
- .digest("hex")
46
- .slice(0, 32);
47
- }
48
- /**
49
- * Generate a 16-char lowercase hex span ID.
50
- *
51
- * If setNextSpanId has been called, returns that value once (one-shot)
52
- * and then clears it. Otherwise returns a random 16-char hex string.
53
- */
54
- generateSpanId() {
55
- if (this.nextSpanId) {
56
- const spanId = this.nextSpanId;
57
- this.nextSpanId = undefined;
58
- return spanId;
59
- }
60
- // Fallback: generate a random span ID
61
- return createHash("sha256")
62
- .update(Math.random().toString())
63
- .digest("hex")
64
- .slice(0, 16);
65
- }
66
- }
67
- /**
68
- * Derive a deterministic trace ID from an X-Ray Root field.
69
- * Strips the `Root=1-` prefix and all `-` separators to produce
70
- * a valid 32-character lowercase hex OpenTelemetry trace ID.
71
- *
72
- * @param xRayRoot - The Root field value, e.g. "1-5759e988-bd862e3fe1be46a994272793"
73
- * @returns A 32-char lowercase hex string, or undefined if the input is invalid
74
- */
75
- function deriveTraceIdFromXRayRoot(xRayRoot) {
76
- // Strip "Root=" prefix if present
77
- let root = xRayRoot;
78
- if (root.startsWith("Root=")) {
79
- root = root.slice(5);
80
- }
81
- // Strip the version prefix "1-"
82
- if (root.startsWith("1-")) {
83
- root = root.slice(2);
84
- }
85
- else {
86
- return undefined;
87
- }
88
- // Remove all dashes
89
- const hex = root.replace(/-/g, "");
90
- // Validate: must be exactly 32 lowercase hex characters
91
- if (hex.length !== 32 || !/^[0-9a-f]{32}$/.test(hex)) {
92
- return undefined;
93
- }
94
- return hex;
95
- }
96
- /**
97
- * Derive a deterministic trace ID from an execution ARN by hashing it
98
- * with SHA-256 and truncating to the first 32 lowercase hex characters.
99
- *
100
- * @param executionArn - The execution ARN string
101
- * @returns A 32-char lowercase hex string
102
- */
103
- function deriveTraceIdFromArn(executionArn) {
104
- return createHash("sha256").update(executionArn).digest("hex").slice(0, 32);
105
- }
106
- /**
107
- * Derive a deterministic span ID from an operation ID scoped to a specific execution.
108
- * Hashes `executionArn + ":" + operationId` with SHA-256 and truncates to the first
109
- * 16 lowercase hex characters.
110
- *
111
- * The executionArn is included in the hash input to avoid span ID collisions when
112
- * different executions (e.g., a parent and child workflow) share the same trace and
113
- * have operations at the same positional ID.
114
- *
115
- * @param operationId - The operation ID string (positional identifier within an execution)
116
- * @param executionArn - The execution ARN, used to scope span IDs per execution
117
- * @returns A 16-char lowercase hex string
118
- */
119
- function deriveSpanIdFromOperationId(operationId, executionArn) {
120
- return createHash("sha256")
121
- .update(executionArn + ":" + operationId)
122
- .digest("hex")
123
- .slice(0, 16);
124
- }
125
-
126
- /**
127
- * Reads the X-Ray trace header from the `_X_AMZN_TRACE_ID` environment variable.
128
- *
129
- * The durable execution backend propagates the same Root trace ID to every
130
- * invocation, so all invocations of the same execution share one traceId.
131
- *
132
- * X-Ray Header format:
133
- * Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1
134
- *
135
- * - Extract Root value, strip "1-" prefix and all "-" to get 32-char hex traceId
136
- * - Extract Parent value for parentSpanId (16-char hex)
137
- *
138
- * Returns undefined when _X_AMZN_TRACE_ID is missing or malformed.
139
- */
140
- function xRayContextExtractor(_info) {
141
- const header = process.env._X_AMZN_TRACE_ID;
142
- if (!header) {
143
- return undefined;
144
- }
145
- // Parse the header into key-value pairs separated by semicolons
146
- const fields = new Map();
147
- for (const part of header.split(";")) {
148
- const eqIdx = part.indexOf("=");
149
- if (eqIdx > 0) {
150
- const key = part.slice(0, eqIdx).trim();
151
- const value = part.slice(eqIdx + 1).trim();
152
- fields.set(key, value);
153
- }
154
- }
155
- const root = fields.get("Root");
156
- if (!root) {
157
- return undefined;
158
- }
159
- // Root format: 1-5759e988-bd862e3fe1be46a994272793
160
- // Strip the "1-" prefix and remove all dashes to get 32-char hex
161
- const rootValue = root.startsWith("1-") ? root.slice(2) : root;
162
- const traceId = rootValue.replace(/-/g, "").toLowerCase();
163
- // Validate: must be exactly 32 hex characters
164
- if (!/^[0-9a-f]{32}$/.test(traceId)) {
165
- return undefined;
166
- }
167
- const parent = fields.get("Parent");
168
- let parentSpanId;
169
- if (parent && /^[0-9a-f]{16}$/.test(parent.toLowerCase())) {
170
- parentSpanId = parent.toLowerCase();
171
- }
172
- return { traceId, parentSpanId };
173
- }
174
- /**
175
- * Reads W3C traceparent from `context.clientContext.custom.traceparent`.
176
- *
177
- * W3C traceparent format:
178
- * 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
179
- * Format: version-traceId-parentId-traceFlags
180
- *
181
- * - traceId is 32 hex chars
182
- * - parentId is 16 hex chars
183
- * - flags is 2 hex chars (parsed to number)
184
- *
185
- * Returns undefined when clientContext or traceparent is missing or malformed.
186
- */
187
- function w3cClientContextExtractor(info) {
188
- const extendedInfo = info;
189
- const traceparent = extendedInfo.context?.clientContext?.custom?.traceparent;
190
- if (!traceparent) {
191
- return undefined;
192
- }
193
- return parseW3CTraceparent(traceparent);
194
- }
195
- /**
196
- * Parses a W3C traceparent header value.
197
- *
198
- * Format: version-traceId-parentId-flags
199
- * Example: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
200
- */
201
- function parseW3CTraceparent(traceparent) {
202
- const parts = traceparent.split("-");
203
- // Must have exactly 4 parts: version, traceId, parentId, flags
204
- if (parts.length !== 4) {
205
- return undefined;
206
- }
207
- const [version, traceId, parentId, flags] = parts;
208
- // Version must be 2 hex chars
209
- if (!/^[0-9a-f]{2}$/.test(version)) {
210
- return undefined;
211
- }
212
- // TraceId must be 32 hex chars
213
- if (!/^[0-9a-f]{32}$/.test(traceId)) {
214
- return undefined;
215
- }
216
- // ParentId must be 16 hex chars
217
- if (!/^[0-9a-f]{16}$/.test(parentId)) {
218
- return undefined;
219
- }
220
- // Flags must be 2 hex chars
221
- if (!/^[0-9a-f]{2}$/.test(flags)) {
222
- return undefined;
223
- }
224
- const traceFlags = parseInt(flags, 16);
225
- return {
226
- traceId,
227
- parentSpanId: parentId,
228
- traceFlags,
229
- };
230
- }
231
-
232
- const DEFAULT_INSTRUMENTATION_NAME = "aws-durable-execution-sdk-js";
233
- /**
234
- * OpenTelemetry instrumentation plugin for durable executions.
235
- *
236
- * Implements the DurableInstrumentationPlugin interface to emit distributed
237
- * traces that correlate across multiple Lambda invocations of a single
238
- * durable execution.
239
- */
240
- class OtelPlugin {
241
- tracerProvider;
242
- tracer;
243
- idGenerator;
244
- contextExtractor;
245
- // Per-invocation state
246
- spanMap = new Map();
247
- spanStack = [];
248
- invocationSpan;
249
- executionArn = "";
250
- attemptSpan;
251
- constructor(config) {
252
- const instrumentationName = config?.instrumentationName ?? DEFAULT_INSTRUMENTATION_NAME;
253
- this.idGenerator = new DeterministicIdGenerator();
254
- this.contextExtractor = config?.contextExtractor ?? xRayContextExtractor;
255
- if (config?.tracerProvider) {
256
- this.tracerProvider = config.tracerProvider;
257
- }
258
- else {
259
- this.tracerProvider = trace.getTracerProvider();
260
- registerInstrumentations({
261
- tracerProvider: this.tracerProvider,
262
- instrumentations: [
263
- new AwsInstrumentation({
264
- suppressInternalInstrumentation: true,
265
- sqsExtractContextPropagationFromPayload: true,
266
- }),
267
- ],
268
- });
269
- }
270
- this.tracer = this.tracerProvider.getTracer(instrumentationName);
271
- // Monkey-patch the tracer's ID generator so spans use deterministic IDs.
272
- // The _idGenerator field is internal to @opentelemetry/sdk-trace-base's Tracer class.
273
- this.tracer._idGenerator = this.idGenerator;
274
- }
275
- async onInvocationStart(info) {
276
- // 1. Store the execution ARN
277
- this.executionArn = info.executionArn;
278
- // 2. Invoke the context extractor
279
- const extractedContext = this.contextExtractor(info);
280
- // 3. Set the trace ID on the ID generator
281
- if (extractedContext?.traceId) {
282
- this.idGenerator.setTraceId(extractedContext.traceId);
283
- }
284
- else {
285
- // Fallback: derive trace ID from ARN
286
- const derivedId = deriveTraceIdFromArn(info.executionArn);
287
- this.idGenerator.setTraceId(derivedId);
288
- }
289
- // 4. Create the invocation span
290
- this.invocationSpan = this.tracer.startSpan("invocation", {
291
- attributes: {
292
- "durable.execution.arn": info.executionArn,
293
- },
294
- });
295
- }
296
- wrapInvocation(_info, fn) {
297
- if (!this.invocationSpan) {
298
- return fn();
299
- }
300
- return context.with(trace.setSpan(context.active(), this.invocationSpan), fn);
301
- }
302
- async onInvocationEnd(_info) {
303
- // 1. End all spans in the stack in reverse order
304
- while (this.spanStack.length > 0) {
305
- const span = this.spanStack.pop();
306
- span.end();
307
- }
308
- // 2. End the invocation span if it exists
309
- if (this.invocationSpan) {
310
- this.invocationSpan.end();
311
- }
312
- // 3. Force flush the tracer provider
313
- if ("forceFlush" in this.tracerProvider) {
314
- try {
315
- await this.tracerProvider.forceFlush();
316
- }
317
- catch {
318
- // Gracefully handle flush errors
319
- }
320
- }
321
- // 4. Clear all per-invocation state
322
- this.spanMap.clear();
323
- this.spanStack = [];
324
- this.invocationSpan = undefined;
325
- this.executionArn = "";
326
- this.attemptSpan = undefined;
327
- }
328
- async onOperationStart(info) {
329
- const deterministicSpanId = deriveSpanIdFromOperationId(info.id, this.executionArn);
330
- const spanName = info.name ?? info.type;
331
- // Resolve parent span: use parentId from map, or fall back to invocation span
332
- let parentSpan;
333
- if (info.parentId && this.spanMap.has(info.parentId)) {
334
- parentSpan = this.spanMap.get(info.parentId);
335
- }
336
- else {
337
- parentSpan = this.invocationSpan;
338
- }
339
- const parentContext = parentSpan
340
- ? trace.setSpan(context.active(), parentSpan)
341
- : context.active();
342
- const attributes = {
343
- "durable.execution.arn": this.executionArn,
344
- "durable.operation.id": info.id,
345
- "durable.operation.type": info.type,
346
- };
347
- if (info.name) {
348
- attributes["durable.operation.name"] = info.name;
349
- }
350
- if (info.subType) {
351
- attributes["durable.operation.subtype"] = info.subType;
352
- }
353
- let span;
354
- if (!info.isReplay) {
355
- // Non-replay: use deterministic span ID
356
- this.idGenerator.setNextSpanId(deterministicSpanId);
357
- span = this.tracer.startSpan(spanName, {
358
- attributes,
359
- startTime: info.startTimestamp,
360
- }, parentContext);
361
- }
362
- else if (info.type === "CONTEXT" || info.type === "STEP") {
363
- // Replay: use random span ID, add Link to deterministic span
364
- const traceId = this.invocationSpan?.spanContext().traceId ??
365
- this.idGenerator.generateTraceId();
366
- span = this.tracer.startSpan(spanName, {
367
- attributes,
368
- startTime: info.startTimestamp,
369
- links: [
370
- {
371
- context: { traceId, spanId: deterministicSpanId, traceFlags: 1 },
372
- },
373
- ],
374
- }, parentContext);
375
- }
376
- // Push to map and stack
377
- if (span != undefined) {
378
- this.spanMap.set(info.id, span);
379
- this.spanStack.push(span);
380
- }
381
- }
382
- wrapChildContextFn(info, fn) {
383
- const span = this.spanMap.get(info.id);
384
- if (!span) {
385
- return fn();
386
- }
387
- return context.with(trace.setSpan(context.active(), span), fn);
388
- }
389
- async onOperationEnd(info) {
390
- // Skip span creation for WAIT, INVOKE, CHAINED_INVOKE, and CALLBACK operations on replay
391
- if (info.isReplay &&
392
- (info.type === "WAIT" ||
393
- info.type === "INVOKE" ||
394
- info.type === "CHAINED_INVOKE" ||
395
- info.type === "CALLBACK")) {
396
- return;
397
- }
398
- const deterministicSpanId = deriveSpanIdFromOperationId(info.id, this.executionArn);
399
- if (this.spanMap.has(info.id)) {
400
- // Operation was started in this invocation
401
- const span = this.spanMap.get(info.id);
402
- // Record error if present
403
- if (info.error) {
404
- span.setStatus({
405
- code: SpanStatusCode.ERROR,
406
- message: info.error.message,
407
- });
408
- span.recordException(info.error);
409
- }
410
- // End the span
411
- span.end(info.endTimestamp);
412
- // Remove from map
413
- this.spanMap.delete(info.id);
414
- // Remove from stack (find by reference)
415
- const stackIndex = this.spanStack.indexOf(span);
416
- if (stackIndex !== -1) {
417
- this.spanStack.splice(stackIndex, 1);
418
- }
419
- }
420
- else if (!info.isReplay) {
421
- // Operation was started in a prior invocation — create Continuation_Span
422
- const spanName = info.name ?? info.type;
423
- const traceId = this.invocationSpan?.spanContext().traceId ??
424
- this.idGenerator.generateTraceId();
425
- const parentContext = this.invocationSpan
426
- ? trace.setSpan(context.active(), this.invocationSpan)
427
- : context.active();
428
- const attributes = {
429
- "durable.execution.arn": this.executionArn,
430
- "durable.operation.id": info.id,
431
- "durable.operation.type": info.type,
432
- };
433
- if (info.name) {
434
- attributes["durable.operation.name"] = info.name;
435
- }
436
- if (info.subType) {
437
- attributes["durable.operation.subtype"] = info.subType;
438
- }
439
- const continuationSpan = this.tracer.startSpan(spanName, {
440
- attributes,
441
- startTime: info.startTimestamp,
442
- links: [
443
- {
444
- context: { traceId, spanId: deterministicSpanId, traceFlags: 1 },
445
- },
446
- ],
447
- }, parentContext);
448
- // Record error if present
449
- if (info.error) {
450
- continuationSpan.setStatus({
451
- code: SpanStatusCode.ERROR,
452
- message: info.error.message,
453
- });
454
- continuationSpan.recordException(info.error);
455
- }
456
- // Immediately end
457
- continuationSpan.end(info.endTimestamp);
458
- }
459
- }
460
- async onOperationAttemptStart(info) {
461
- const deterministicSpanId = deriveSpanIdFromOperationId(info.id, this.executionArn);
462
- const baseName = info.name ?? info.type;
463
- const spanName = `${baseName} attempt ${info.attempt}`;
464
- // Find the parent Operation_Span for this operation
465
- const parentSpan = this.spanMap.get(info.id);
466
- const parentContext = parentSpan
467
- ? trace.setSpan(context.active(), parentSpan)
468
- : context.active();
469
- // Get current trace ID for the link
470
- const currentTraceId = this.invocationSpan?.spanContext().traceId ??
471
- this.idGenerator.generateTraceId();
472
- const attributes = {
473
- "durable.execution.arn": this.executionArn,
474
- "durable.operation.id": info.id,
475
- "durable.operation.type": info.type,
476
- "durable.operation.attempt": info.attempt,
477
- };
478
- if (info.name) {
479
- attributes["durable.operation.name"] = info.name;
480
- }
481
- if (info.subType) {
482
- attributes["durable.operation.subtype"] = info.subType;
483
- }
484
- // Create Attempt_Span as child of Operation_Span with Link to deterministic span
485
- const attemptSpan = this.tracer.startSpan(spanName, {
486
- attributes,
487
- startTime: info.startTimestamp,
488
- links: [
489
- {
490
- context: {
491
- traceId: currentTraceId,
492
- spanId: deterministicSpanId,
493
- traceFlags: 1,
494
- },
495
- },
496
- ],
497
- }, parentContext);
498
- this.attemptSpan = attemptSpan;
499
- }
500
- wrapOperationAttemptFn(_info, fn) {
501
- if (!this.attemptSpan) {
502
- return fn();
503
- }
504
- return context.with(trace.setSpan(context.active(), this.attemptSpan), fn);
505
- }
506
- async onOperationAttemptEnd(info) {
507
- if (this.attemptSpan) {
508
- this.attemptSpan.setAttribute("durable.attempt.outcome", info.outcome);
509
- if (info.error) {
510
- this.attemptSpan.setStatus({
511
- code: SpanStatusCode.ERROR,
512
- message: info.error.message,
513
- });
514
- this.attemptSpan.recordException(info.error);
515
- }
516
- this.attemptSpan.end(info.endTimestamp);
517
- this.attemptSpan = undefined;
518
- }
519
- }
520
- async onOperationChange(_info) {
521
- // No-op for this plugin
522
- }
523
- enrichLogContext() {
524
- const span = trace.getSpan(context.active());
525
- if (!span) {
526
- return undefined;
527
- }
528
- const spanContext = span.spanContext();
529
- return {
530
- traceId: spanContext.traceId,
531
- spanId: spanContext.spanId,
532
- otelTraceSampled: (spanContext.traceFlags & 1) !== 0,
533
- };
534
- }
535
- }
536
-
537
- export { DeterministicIdGenerator, OtelPlugin, deriveSpanIdFromOperationId, deriveTraceIdFromArn, deriveTraceIdFromXRayRoot, w3cClientContextExtractor, xRayContextExtractor };
1
+ export { E as ExecutionOtelPlugin } from './execution-plugin.mjs';
2
+ export { I as InvocationOtelPlugin } from './invocation-plugin.mjs';
3
+ export { D as DeterministicIdGenerator, d as deriveExecutionRootSpanId, a as deriveSpanIdFromOperationId, b as deriveTraceIdFromArn, c as deriveTraceIdFromXRayRoot, e as deriveWorkflowSpanId, w as w3cClientContextExtractor, x as xRayContextExtractor } from './global-id-generator.mjs';
4
+ import '@opentelemetry/api';
5
+ import '@opentelemetry/sdk-trace-node';
6
+ import '@opentelemetry/core';
7
+ import 'node:async_hooks';
8
+ import 'node:crypto';
538
9
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/deterministic-id-generator.ts","../src/context-extractors.ts","../src/plugin.ts"],"names":[],"mappings":";;;;;AAGA;;;;;;;AAOG;MACU,wBAAwB,CAAA;AAC3B,IAAA,OAAO;AACP,IAAA,UAAU;AAElB;;;AAGG;AACH,IAAA,UAAU,CAAC,OAAe,EAAA;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;IACxB;AAEA;;;;AAIG;AACH,IAAA,aAAa,CAAC,MAAc,EAAA;AAC1B,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM;IAC1B;AAEA;;;;;AAKG;IACH,eAAe,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,IAAI,CAAC,OAAO;QACrB;;QAEA,OAAO,UAAU,CAAC,QAAQ;aACvB,MAAM,C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