@aws/durable-execution-sdk-js-otel 1.0.0 → 1.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.
- package/README.md +233 -2
- package/dist/execution-plugin.mjs +100 -21
- package/dist/execution-plugin.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/invocation-plugin.mjs +130 -55
- package/dist/invocation-plugin.mjs.map +1 -1
- package/dist/otel-execution.mjs +1 -1
- package/dist/otel-execution.mjs.map +1 -1
- package/dist/otel-invocation.mjs +1 -1
- package/dist/otel-invocation.mjs.map +1 -1
- package/dist/{global-id-generator.mjs → plugin-registration.mjs} +109 -7
- package/dist/plugin-registration.mjs.map +1 -0
- package/dist-cjs/execution-plugin.js +113 -34
- package/dist-cjs/execution-plugin.js.map +1 -1
- package/dist-cjs/index.js +10 -9
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/invocation-plugin.js +142 -67
- package/dist-cjs/invocation-plugin.js.map +1 -1
- package/dist-cjs/otel-execution.js +1 -1
- package/dist-cjs/otel-execution.js.map +1 -1
- package/dist-cjs/otel-invocation.js +1 -1
- package/dist-cjs/otel-invocation.js.map +1 -1
- package/dist-cjs/{global-id-generator.js → plugin-registration.js} +113 -6
- package/dist-cjs/plugin-registration.js.map +1 -0
- package/dist-types/context-extractors.d.ts +111 -0
- package/dist-types/context-extractors.d.ts.map +1 -0
- package/dist-types/deterministic-id-generator.d.ts +95 -0
- package/dist-types/deterministic-id-generator.d.ts.map +1 -0
- package/dist-types/execution-plugin-provider.d.ts +7 -0
- package/dist-types/execution-plugin-provider.d.ts.map +1 -0
- package/dist-types/execution-plugin.d.ts +88 -0
- package/dist-types/execution-plugin.d.ts.map +1 -0
- package/dist-types/execution-trace-context.d.ts +133 -0
- package/dist-types/execution-trace-context.d.ts.map +1 -0
- package/dist-types/external-completions.d.ts +11 -0
- package/dist-types/external-completions.d.ts.map +1 -0
- package/dist-types/global-id-generator.d.ts +12 -0
- package/dist-types/global-id-generator.d.ts.map +1 -0
- package/dist-types/global-sampler.d.ts +27 -0
- package/dist-types/global-sampler.d.ts.map +1 -0
- package/dist-types/index.d.ts +9 -0
- package/dist-types/index.d.ts.map +1 -0
- package/dist-types/invocation-clock.d.ts +9 -0
- package/dist-types/invocation-clock.d.ts.map +1 -0
- package/dist-types/invocation-plugin-provider.d.ts +7 -0
- package/dist-types/invocation-plugin-provider.d.ts.map +1 -0
- package/dist-types/invocation-plugin.d.ts +99 -0
- package/dist-types/invocation-plugin.d.ts.map +1 -0
- package/dist-types/otel-plugin-config.d.ts +66 -0
- package/dist-types/otel-plugin-config.d.ts.map +1 -0
- package/dist-types/otel-plugin-provider.d.ts +21 -0
- package/dist-types/otel-plugin-provider.d.ts.map +1 -0
- package/dist-types/plugin-registration.d.ts +2 -0
- package/dist-types/plugin-registration.d.ts.map +1 -0
- package/dist-types/propagation-metadata.d.ts +12 -0
- package/dist-types/propagation-metadata.d.ts.map +1 -0
- package/package.json +13 -9
- package/dist/global-id-generator.mjs.map +0 -1
- package/dist-cjs/global-id-generator.js.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { SpanContext, Tracer } from "@opentelemetry/api";
|
|
2
|
+
import { SamplingDecision } from "@opentelemetry/sdk-trace-node";
|
|
3
|
+
import type { ContextExtractorResult } from "./context-extractors";
|
|
4
|
+
/**
|
|
5
|
+
* Environment values used to resolve the default X-Ray execution trace ID.
|
|
6
|
+
*
|
|
7
|
+
* `process.env` and plain objects containing `_X_AMZN_TRACE_ID` both satisfy
|
|
8
|
+
* this interface, which keeps {@link deriveExecutionTraceId} pure and easy to
|
|
9
|
+
* test.
|
|
10
|
+
*/
|
|
11
|
+
export interface ExecutionTraceEnvironment {
|
|
12
|
+
readonly _X_AMZN_TRACE_ID?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The per-execution trace context resolved once at invocation start, shared by
|
|
16
|
+
* both plugins.
|
|
17
|
+
*
|
|
18
|
+
* It selects the common execution ancestor that the Workflow and Invocation
|
|
19
|
+
* spans parent onto, so they share one trace. The ancestor is chosen by
|
|
20
|
+
* precedence:
|
|
21
|
+
*
|
|
22
|
+
* 1. a complete remote backend context (valid trace ID + valid parent span ID)
|
|
23
|
+
* is the authoritative ancestor, used directly whether or not the upstream
|
|
24
|
+
* carries an explicit sampling decision;
|
|
25
|
+
* 2. otherwise a synthetic execution root anchors the execution, with a
|
|
26
|
+
* deterministic span ID in its own namespace, on the canonical trace.
|
|
27
|
+
*
|
|
28
|
+
* A live ambient span is deliberately never used as the ancestor: its trace ID
|
|
29
|
+
* is not guaranteed stable across Lambda reinvocations, so anchoring the
|
|
30
|
+
* multi-invocation execution on it could change the execution trace on replay
|
|
31
|
+
* and break the cross-invocation continuation/replay links.
|
|
32
|
+
*
|
|
33
|
+
* The canonical trace ID follows the same precedence: the remote trace ID when
|
|
34
|
+
* valid, else one derived from the ARN and start time.
|
|
35
|
+
*
|
|
36
|
+
* Sampling: an explicit upstream decision is preserved only when it belongs to
|
|
37
|
+
* a valid extracted trace; when it is absent, the configured root decision
|
|
38
|
+
* (`whenUndecided`) is applied to both a remote parent and a synthetic root.
|
|
39
|
+
* Trace flags carry a single sampled bit with no "unset" state, so a
|
|
40
|
+
* remote parent left unsampled would make a parent-based sampler drop every
|
|
41
|
+
* child span.
|
|
42
|
+
*
|
|
43
|
+
* The ancestor is a non-recording context used to force deterministic
|
|
44
|
+
* parenting. It is either the external backend server span or an SDK-owned
|
|
45
|
+
* synthetic root whose recording counterpart is materialized by the plugins
|
|
46
|
+
* for sampled fallback traces.
|
|
47
|
+
*/
|
|
48
|
+
export interface ExecutionTraceContext {
|
|
49
|
+
/** The common parent context for the Workflow and Invocation spans. */
|
|
50
|
+
executionAncestor: SpanContext;
|
|
51
|
+
/** The trace ID of the execution trace (equals `executionAncestor.traceId`). */
|
|
52
|
+
traceId: string;
|
|
53
|
+
/** The trace flags of the execution trace. */
|
|
54
|
+
traceFlags: number;
|
|
55
|
+
/** The sampling decision enforced for SDK-created spans in this execution. */
|
|
56
|
+
samplingDecision: SamplingDecision;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The canonical trace ID: the propagated remote trace ID when valid, else one
|
|
60
|
+
* derived from the ARN and start time.
|
|
61
|
+
*
|
|
62
|
+
* Only these two anchors are used, and both are stable across Lambda
|
|
63
|
+
* reinvocations: the propagated `Root` is kept identical for every invocation by
|
|
64
|
+
* the durable backend, and the ARN-derived ID is a pure hash of the ARN. A live
|
|
65
|
+
* ambient span's trace ID is deliberately NOT used — it is not guaranteed stable
|
|
66
|
+
* across invocations, so anchoring on one could change the execution trace on
|
|
67
|
+
* replay and break the continuation/replay links (which target
|
|
68
|
+
* `deriveSpanIdFromOperationId` on the canonical trace).
|
|
69
|
+
*
|
|
70
|
+
* An all-zero or malformed remote trace ID is not usable, so it falls through to
|
|
71
|
+
* the ARN-derived ID rather than anchoring the execution on an unstable trace.
|
|
72
|
+
*/
|
|
73
|
+
export declare function canonicalTraceId(extracted: ContextExtractorResult, executionArn: string, executionStartTimestamp: Date | undefined): string;
|
|
74
|
+
/**
|
|
75
|
+
* Derives the trace ID used by the OpenTelemetry plugins for a durable
|
|
76
|
+
* execution with the default X-Ray context extractor.
|
|
77
|
+
*
|
|
78
|
+
* A valid `Root` from `_X_AMZN_TRACE_ID` takes precedence. When the header is
|
|
79
|
+
* missing or malformed, the trace ID is derived from the execution ARN and
|
|
80
|
+
* stable execution start timestamp using the same resolver as the plugins.
|
|
81
|
+
*
|
|
82
|
+
* Pass the same execution start timestamp supplied to the plugin when no valid
|
|
83
|
+
* X-Ray Root is available. If the timestamp is unavailable to both callers,
|
|
84
|
+
* omit it to use the deterministic ARN-only fallback.
|
|
85
|
+
*
|
|
86
|
+
* @param environment - Environment containing the optional X-Ray trace header
|
|
87
|
+
* @param executionArn - The durable execution ARN
|
|
88
|
+
* @param executionStartTimestamp - Stable start time of the durable execution
|
|
89
|
+
* @returns The 32-character lowercase hexadecimal execution trace ID
|
|
90
|
+
*/
|
|
91
|
+
export declare function deriveExecutionTraceId(environment: ExecutionTraceEnvironment, executionArn: string, executionStartTimestamp?: Date): string;
|
|
92
|
+
/**
|
|
93
|
+
* Resolves the execution ancestor: a complete propagated remote parent when
|
|
94
|
+
* present, otherwise a synthetic execution root on the canonical trace.
|
|
95
|
+
*
|
|
96
|
+
* A live ambient span is never used as the ancestor. Its trace ID is not
|
|
97
|
+
* guaranteed stable across Lambda reinvocations, so anchoring the multi-
|
|
98
|
+
* invocation execution on it could change the execution trace on replay and
|
|
99
|
+
* break cross-invocation links. The two anchors used here are both stable: a
|
|
100
|
+
* propagated remote parent (the backend keeps `Root` identical every invocation)
|
|
101
|
+
* and the ARN-derived synthetic root (a pure hash of the ARN).
|
|
102
|
+
*
|
|
103
|
+
* @param extracted the context parsed from the backend header, or undefined
|
|
104
|
+
* @param canonical the trace ID the ancestor is anchored on
|
|
105
|
+
* @param executionArn the durable execution ARN
|
|
106
|
+
* @param rootSamplingDecision the configured root decision for this trace, applied
|
|
107
|
+
* to a remote parent or synthetic root when the header carries no explicit
|
|
108
|
+
* Sampled value
|
|
109
|
+
*/
|
|
110
|
+
export declare function resolveExecutionTraceContext(extracted: ContextExtractorResult, canonical: string, executionArn: string, rootSamplingDecision: () => SamplingDecision): ExecutionTraceContext;
|
|
111
|
+
/**
|
|
112
|
+
* Decides how a root span on the given trace should be sampled, used only
|
|
113
|
+
* when the propagated context carries no explicit decision.
|
|
114
|
+
*
|
|
115
|
+
* Sampling precedence, highest first:
|
|
116
|
+
*
|
|
117
|
+
* 1. the backend's explicit `Sampled` on the propagated header — handled by the
|
|
118
|
+
* caller before reaching here;
|
|
119
|
+
* 2. the configured sampler is evaluated at its root policy (`ROOT_CONTEXT`, no
|
|
120
|
+
* parent) with the real trace ID. This honors custom samplers and avoids
|
|
121
|
+
* inheriting an unrelated ambient span's decision.
|
|
122
|
+
*
|
|
123
|
+
* The resolved decision is then enforced through DurableSampler for every
|
|
124
|
+
* SDK-created span, so direct samplers that ignore parent flags cannot override
|
|
125
|
+
* an explicit backend decision or the configured root decision.
|
|
126
|
+
*
|
|
127
|
+
* @param tracer the resolved SDK tracer
|
|
128
|
+
* @param traceId the canonical trace ID to evaluate
|
|
129
|
+
* @param spanName the span name passed to the sampler
|
|
130
|
+
* @param attributes the attributes the span is started with
|
|
131
|
+
*/
|
|
132
|
+
export declare function rootSamplingDecision(tracer: Tracer, traceId: string, spanName: string, attributes: Record<string, string | number | boolean>): SamplingDecision;
|
|
133
|
+
//# sourceMappingURL=execution-trace-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-trace-context.d.ts","sourceRoot":"","sources":["../src/execution-trace-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAWjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAGnE;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,WAAW,qBAAqB;IACpC,uEAAuE;IACvE,iBAAiB,EAAE,WAAW,CAAC;IAC/B,gFAAgF;IAChF,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,sBAAsB,EACjC,YAAY,EAAE,MAAM,EACpB,uBAAuB,EAAE,IAAI,GAAG,SAAS,GACxC,MAAM,CAKR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,yBAAyB,EACtC,YAAY,EAAE,MAAM,EACpB,uBAAuB,CAAC,EAAE,IAAI,GAC7B,MAAM,CAMR;AA8BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,sBAAsB,EACjC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,oBAAoB,EAAE,MAAM,gBAAgB,GAC3C,qBAAqB,CA2CvB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GACpD,gBAAgB,CAuBlB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OperationInfo } from "@aws/durable-execution-sdk-js";
|
|
2
|
+
/** Invocation-local bookkeeping; no export acknowledgement is persisted. */
|
|
3
|
+
export declare class ExternalCompletions {
|
|
4
|
+
readonly pending: Map<string, OperationInfo>;
|
|
5
|
+
private readonly exported;
|
|
6
|
+
observe(operations?: Record<string, OperationInfo>): void;
|
|
7
|
+
shouldSkip(info: OperationInfo): boolean;
|
|
8
|
+
markExported(info: OperationInfo): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=external-completions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-completions.d.ts","sourceRoot":"","sources":["../src/external-completions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAWnE,4EAA4E;AAC5E,qBAAa,mBAAmB;IAC9B,QAAQ,CAAC,OAAO,6BAAoC;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C,OAAO,CAAC,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAM,GAAG,IAAI;IAiB7D,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAUxC,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAOvC,KAAK,IAAI,IAAI;CAId"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Tracer } from "@opentelemetry/api";
|
|
2
|
+
import { DeterministicIdGenerator } from "./deterministic-id-generator";
|
|
3
|
+
/**
|
|
4
|
+
* Installs deterministic durable IDs on an OpenTelemetry SDK tracer while
|
|
5
|
+
* preserving its configured generator for all unscoped ID generation.
|
|
6
|
+
*
|
|
7
|
+
* OpenTelemetry JavaScript does not expose this generator through its public
|
|
8
|
+
* API. SDK tracers have historically stored it in the TypeScript-private
|
|
9
|
+
* `_idGenerator` field, which remains writable at runtime.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tryInstallGlobalIdGenerator(tracer: Tracer): DeterministicIdGenerator | undefined;
|
|
12
|
+
//# sourceMappingURL=global-id-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-id-generator.d.ts","sourceRoot":"","sources":["../src/global-id-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAexE;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,GACb,wBAAwB,GAAG,SAAS,CAuBtC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Context, Attributes, Link, SpanKind, Tracer } from "@opentelemetry/api";
|
|
2
|
+
import { SamplingDecision } from "@opentelemetry/sdk-trace-node";
|
|
3
|
+
import type { Sampler, SamplingResult } from "@opentelemetry/sdk-trace-node";
|
|
4
|
+
/**
|
|
5
|
+
* Sampler wrapper that preserves the application's sampler except while the
|
|
6
|
+
* durable plugin is creating its own spans with a resolved execution decision.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DurableSampler implements Sampler {
|
|
9
|
+
private readonly delegate;
|
|
10
|
+
private static readonly decisions;
|
|
11
|
+
constructor(delegate: Sampler);
|
|
12
|
+
withDecision<T>(decision: SamplingDecision, fn: () => T): T;
|
|
13
|
+
shouldSample(context: Context, traceId: string, spanName: string, spanKind: SpanKind, attributes: Attributes, links: Link[]): SamplingResult;
|
|
14
|
+
toString(): string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Installs a durable-aware sampler on an OpenTelemetry SDK tracer.
|
|
18
|
+
*
|
|
19
|
+
* OpenTelemetry JavaScript does not expose the sampler through its public API.
|
|
20
|
+
* SDK tracers have historically stored it in the TypeScript-private `_sampler`
|
|
21
|
+
* field, which remains writable at runtime.
|
|
22
|
+
*/
|
|
23
|
+
export declare function tryInstallDurableSampler(tracer: Tracer): DurableSampler | undefined;
|
|
24
|
+
/** Whether this tracer still uses the bridge that controls SDK span decisions. */
|
|
25
|
+
export declare function isDurableSamplerInstalled(tracer: Tracer, sampler: DurableSampler | undefined): boolean;
|
|
26
|
+
export declare function getConfiguredSampler(tracer: Tracer): Sampler | undefined;
|
|
27
|
+
//# sourceMappingURL=global-sampler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-sampler.d.ts","sourceRoot":"","sources":["../src/global-sampler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,MAAM,EACP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAa7E;;;GAGG;AACH,qBAAa,cAAe,YAAW,OAAO;IAGhC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAA6C;gBAEjD,QAAQ,EAAE,OAAO;IAE9C,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAI3D,YAAY,CACV,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,IAAI,EAAE,GACZ,cAAc;IAejB,QAAQ,IAAI,MAAM;CAGnB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,SAAS,CAqB5B;AAED,kFAAkF;AAClF,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,cAAc,GAAG,SAAS,GAClC,OAAO,CAOT;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAUxE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { ExecutionOtelPlugin } from "./execution-plugin";
|
|
2
|
+
export type { IdGeneratorFactory, OtelPluginConfig, TracerProviderFactory, } from "./otel-plugin-config";
|
|
3
|
+
export { InvocationOtelPlugin } from "./invocation-plugin";
|
|
4
|
+
export { DeterministicIdGenerator, deriveTraceIdFromXRayRoot, deriveTraceIdFromArn, deriveSpanIdFromOperationId, deriveWorkflowSpanId, deriveExecutionRootSpanId, } from "./deterministic-id-generator";
|
|
5
|
+
export { xRayContextExtractor, w3cClientContextExtractor, } from "./context-extractors";
|
|
6
|
+
export type { ContextExtractor, ContextExtractorResult, } from "./context-extractors";
|
|
7
|
+
export { deriveExecutionTraceId } from "./execution-trace-context";
|
|
8
|
+
export type { ExecutionTraceEnvironment } from "./execution-trace-context";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,YAAY,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HrTime } from "@opentelemetry/api";
|
|
2
|
+
export type InvocationClock = {
|
|
3
|
+
epochMillis: number;
|
|
4
|
+
monotonicMillis: number;
|
|
5
|
+
};
|
|
6
|
+
/** Match ordinary OTel spans: a wall-clock origin plus monotonic elapsed time. */
|
|
7
|
+
export declare function captureInvocationClock(): InvocationClock;
|
|
8
|
+
export declare function readInvocationClock(clock: InvocationClock): HrTime;
|
|
9
|
+
//# sourceMappingURL=invocation-clock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-clock.d.ts","sourceRoot":"","sources":["../src/invocation-clock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,kFAAkF;AAClF,wBAAgB,sBAAsB,IAAI,eAAe,CAKxD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAKlE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InvocationOtelPlugin } from "./invocation-plugin";
|
|
2
|
+
export declare const durableExecutionPluginProvider: {
|
|
3
|
+
pluginApiVersion: 1;
|
|
4
|
+
pluginType: typeof InvocationOtelPlugin;
|
|
5
|
+
createPlugin: () => InvocationOtelPlugin;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=invocation-plugin-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-plugin-provider.d.ts","sourceRoot":"","sources":["../src/invocation-plugin-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,8BAA8B;;;;CAI2B,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { DurableInstrumentationPlugin, InvocationInfo, InvocationEndInfo, OperationInfo, OperationEndInfo, AttemptInfo, AttemptEndInfo, OperationChangeInfo } from "@aws/durable-execution-sdk-js";
|
|
2
|
+
import type { DurableExecutionInvocationOutput } from "@aws/durable-execution-sdk-js";
|
|
3
|
+
import type { OtelPluginConfig } from "./otel-plugin-config";
|
|
4
|
+
import type { PropagationInput, PropagationMetadata } from "./propagation-metadata";
|
|
5
|
+
import { PLUGIN_REGISTRATION } from "./plugin-registration";
|
|
6
|
+
/**
|
|
7
|
+
* OpenTelemetry instrumentation plugin for durable executions.
|
|
8
|
+
*
|
|
9
|
+
* Implements the DurableInstrumentationPlugin interface to emit distributed
|
|
10
|
+
* traces that correlate across multiple Lambda invocations of a single
|
|
11
|
+
* durable execution.
|
|
12
|
+
*/
|
|
13
|
+
export declare class InvocationOtelPlugin implements DurableInstrumentationPlugin {
|
|
14
|
+
private static readonly [PLUGIN_REGISTRATION];
|
|
15
|
+
private tracerProvider;
|
|
16
|
+
private tracer;
|
|
17
|
+
private idGenerator;
|
|
18
|
+
private readonly contextExtractor;
|
|
19
|
+
private readonly instrumentationName;
|
|
20
|
+
private readonly usesGlobalProvider;
|
|
21
|
+
private globalIdGeneratorInstalled;
|
|
22
|
+
private durableSampler;
|
|
23
|
+
private tracingEnabled;
|
|
24
|
+
private readonly externalCompletions;
|
|
25
|
+
private readonly workflowSpanName;
|
|
26
|
+
private readonly enrichLogger;
|
|
27
|
+
private invocationClock;
|
|
28
|
+
private spanMap;
|
|
29
|
+
private spanStack;
|
|
30
|
+
private invocationSpan;
|
|
31
|
+
private workflowSpan;
|
|
32
|
+
private executionAncestor;
|
|
33
|
+
private executionStartTimestamp;
|
|
34
|
+
private syntheticRootAnchorTimestamp;
|
|
35
|
+
private syntheticRootMaterialized;
|
|
36
|
+
private executionArn;
|
|
37
|
+
private executionTraceId;
|
|
38
|
+
private executionTraceFlags;
|
|
39
|
+
private executionSamplingDecision;
|
|
40
|
+
constructor(config?: OtelPluginConfig);
|
|
41
|
+
onInvocationStart(info: InvocationInfo): Promise<void>;
|
|
42
|
+
providePropagationMetadata(input: PropagationInput): PropagationMetadata | undefined;
|
|
43
|
+
wrapInvocation(_info: InvocationInfo, fn: () => Promise<DurableExecutionInvocationOutput>): Promise<DurableExecutionInvocationOutput>;
|
|
44
|
+
onInvocationEnd(info: InvocationEndInfo): Promise<void>;
|
|
45
|
+
/** Creates at most one SDK-owned root per invocation; the caller ends it. */
|
|
46
|
+
private createSyntheticRoot;
|
|
47
|
+
private ensureGlobalIdGeneratorInstalled;
|
|
48
|
+
private liveTimestamp;
|
|
49
|
+
private resetInvocationState;
|
|
50
|
+
private startSpan;
|
|
51
|
+
/**
|
|
52
|
+
* The parent context for the Invocation span: the active ambient span when it
|
|
53
|
+
* is on the execution trace, otherwise the execution ancestor so the
|
|
54
|
+
* Invocation span stays within the same trace.
|
|
55
|
+
*/
|
|
56
|
+
private invocationParentContext;
|
|
57
|
+
/**
|
|
58
|
+
* A link to the initial logical operation span, whose span ID is
|
|
59
|
+
* deterministic on (executionArn, operationId) and lives on the execution
|
|
60
|
+
* trace. A continuation or replay segment carries this link so the segments
|
|
61
|
+
* of one logical operation stay correlated across invocations.
|
|
62
|
+
*
|
|
63
|
+
* Because the initial operation span's ID is reproducible, this restores the
|
|
64
|
+
* cross-invocation link that was previously dropped as "fabricated" — it now
|
|
65
|
+
* targets a genuinely exported span (open operation spans are ended on
|
|
66
|
+
* non-terminal invocations; see onInvocationEnd).
|
|
67
|
+
*/
|
|
68
|
+
private initialOperationLink;
|
|
69
|
+
onOperationStart(info: OperationInfo): Promise<void>;
|
|
70
|
+
wrapChildContextFn(info: OperationInfo, fn: () => unknown): unknown;
|
|
71
|
+
onOperationEnd(info: OperationEndInfo): Promise<void>;
|
|
72
|
+
onOperationAttemptStart(info: AttemptInfo): Promise<void>;
|
|
73
|
+
wrapOperationAttemptFn(info: AttemptInfo, fn: () => unknown): unknown;
|
|
74
|
+
onOperationAttemptEnd(info: AttemptEndInfo): Promise<void>;
|
|
75
|
+
onOperationChange(info: OperationChangeInfo): Promise<void>;
|
|
76
|
+
enrichLogContext(): Record<string, string | number | boolean> | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Link(s) to the execution-scoped Workflow span. Operation and attempt spans
|
|
79
|
+
* carry this link so they correlate to the one Workflow span for the durable
|
|
80
|
+
* execution while remaining parented to the invocation/operation hierarchy.
|
|
81
|
+
* The invocation span itself does NOT carry this link. Returns an empty array
|
|
82
|
+
* if the Workflow span was not created.
|
|
83
|
+
*/
|
|
84
|
+
private workflowLinks;
|
|
85
|
+
/**
|
|
86
|
+
* Links for a continuation or replay operation span: a link back to the
|
|
87
|
+
* initial logical operation span (deterministic on the execution trace)
|
|
88
|
+
* FIRST, then the Workflow link, so the links are ordered
|
|
89
|
+
* `[operation, Workflow]`. Restores the cross-invocation operation
|
|
90
|
+
* correlation that was previously dropped as "fabricated" — the initial span
|
|
91
|
+
* ID is reproducible and the span is genuinely exported. The order matters:
|
|
92
|
+
* the conformance contract resolves `links[0]` to the operation span (which
|
|
93
|
+
* carries `durable.operation.id`) and `links[1]` to the Workflow span (which
|
|
94
|
+
* carries `durable.execution.arn`).
|
|
95
|
+
*/
|
|
96
|
+
private replayLinks;
|
|
97
|
+
private attemptSpanKey;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=invocation-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocation-plugin.d.ts","sourceRoot":"","sources":["../src/invocation-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,mBAAmB,EACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAoCtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAW7D,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,4BAA4B;IACvE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,CAElC;IAEX,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAA2B;IAC9C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAS;IAC7C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAU;IAC7C,OAAO,CAAC,0BAA0B,CAAU;IAC5C,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,cAAc,CAAS;IAC/B,O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;IAoG1D,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,GAAG,OAAO;IAY7D,cAAc,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgJrD,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA0C/D,sBAAsB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,OAAO,GAAG,OAAO;IAc/D,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B1D,iBAAiB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMjE,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,SAAS;IAgBzE;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAMrB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,cAAc;CAGvB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { TracerProvider } from "@opentelemetry/api";
|
|
2
|
+
import type { IdGenerator } from "@opentelemetry/sdk-trace-node";
|
|
3
|
+
import type { ContextExtractor } from "./context-extractors";
|
|
4
|
+
/**
|
|
5
|
+
* Creates the plugin's deterministic ID generator, optionally chained to an
|
|
6
|
+
* application-supplied fallback generator.
|
|
7
|
+
*/
|
|
8
|
+
export type IdGeneratorFactory = (fallbackIdGenerator?: IdGenerator) => IdGenerator;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a caller-owned TracerProvider with a deterministic ID generator
|
|
11
|
+
* installed during provider construction.
|
|
12
|
+
*/
|
|
13
|
+
export type TracerProviderFactory = (createIdGenerator: IdGeneratorFactory) => TracerProvider;
|
|
14
|
+
/**
|
|
15
|
+
* Shared configuration options for both ExecutionOtelPlugin and InvocationOtelPlugin.
|
|
16
|
+
*
|
|
17
|
+
* All fields are optional. When no provider factory is supplied, the plugin
|
|
18
|
+
* uses the globally registered TracerProvider.
|
|
19
|
+
*/
|
|
20
|
+
export interface OtelPluginConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Factory for an application-owned TracerProvider. The plugin supplies a
|
|
23
|
+
* function that creates its deterministic ID generator, optionally chained
|
|
24
|
+
* to the application's normal ID generator as a fallback.
|
|
25
|
+
*
|
|
26
|
+
* When omitted, the globally registered provider is used. The application
|
|
27
|
+
* owns initialization, instrumentation, exporters, and shutdown for providers
|
|
28
|
+
* returned by this factory.
|
|
29
|
+
*/
|
|
30
|
+
tracerProviderFactory?: TracerProviderFactory;
|
|
31
|
+
/**
|
|
32
|
+
* Context extractor function used to extract upstream trace context
|
|
33
|
+
* from the invocation environment. Defaults to `xRayContextExtractor`.
|
|
34
|
+
* A custom extractor must return the durable execution's own trace context:
|
|
35
|
+
* a valid trace ID (and, for a remote parent, a valid parent span ID) anchors
|
|
36
|
+
* the execution trace across replays, so returning stale or per-invocation
|
|
37
|
+
* context would displace the correct execution trace.
|
|
38
|
+
*/
|
|
39
|
+
contextExtractor?: ContextExtractor;
|
|
40
|
+
/**
|
|
41
|
+
* Instrumentation scope name used when creating tracers.
|
|
42
|
+
* Defaults to `"aws-durable-execution-sdk-js"`.
|
|
43
|
+
*/
|
|
44
|
+
instrumentationName?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Custom name for the root Workflow span.
|
|
47
|
+
* Defaults to `"Workflow"`.
|
|
48
|
+
*/
|
|
49
|
+
workflowSpanName?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether `enrichLogContext()` contributes the active OTel trace context
|
|
52
|
+
* (`traceId`, `spanId`, `otelTraceSampled`) to each durable log record.
|
|
53
|
+
*
|
|
54
|
+
* When `true` (default), every log line emitted through the durable logger is
|
|
55
|
+
* stamped with the current span context for log/trace correlation. Set to
|
|
56
|
+
* `false` to disable the extra fields (e.g. to avoid duplicating context that
|
|
57
|
+
* a separate log-instrumentation layer already injects, or to keep log output
|
|
58
|
+
* minimal). Mirrors Python's `enrich_logger` and Java's `enableMdc`.
|
|
59
|
+
*/
|
|
60
|
+
enrichLogger?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use `OtelPluginConfig` instead.
|
|
64
|
+
*/
|
|
65
|
+
export type ExecutionOtelPluginConfig = OtelPluginConfig;
|
|
66
|
+
//# sourceMappingURL=otel-plugin-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel-plugin-config.d.ts","sourceRoot":"","sources":["../src/otel-plugin-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAC/B,mBAAmB,CAAC,EAAE,WAAW,KAC9B,WAAW,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,iBAAiB,EAAE,kBAAkB,KAClC,cAAc,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;OAQG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAE9C;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TracerProvider } from "@opentelemetry/api";
|
|
2
|
+
import { DeterministicIdGenerator } from "./deterministic-id-generator";
|
|
3
|
+
import type { OtelPluginConfig } from "./otel-plugin-config";
|
|
4
|
+
export interface ProviderResult {
|
|
5
|
+
/** The configured TracerProvider. */
|
|
6
|
+
tracerProvider: TracerProvider;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the provider came from OpenTelemetry's global registration.
|
|
9
|
+
*
|
|
10
|
+
* An explicit factory may return the same object that is globally registered,
|
|
11
|
+
* but it still has application-owned initialization and span behavior.
|
|
12
|
+
*/
|
|
13
|
+
usesGlobalProvider: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Resolves an application-owned provider factory or the globally registered
|
|
17
|
+
* provider. Exporters, sampling, resources, propagators, instrumentation, and
|
|
18
|
+
* provider shutdown remain application or ADOT responsibilities.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createTracerProvider(config: OtelPluginConfig | undefined, idGenerator: DeterministicIdGenerator): ProviderResult;
|
|
21
|
+
//# sourceMappingURL=otel-plugin-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel-plugin-provider.d.ts","sourceRoot":"","sources":["../src/otel-plugin-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,cAAc,EAAE,cAAc,CAAC;IAC/B;;;;;OAKG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,gBAAgB,GAAG,SAAS,EACpC,WAAW,EAAE,wBAAwB,GACpC,cAAc,CAiBhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-registration.d.ts","sourceRoot":"","sources":["../src/plugin-registration.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,eAE/B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PropagationInput {
|
|
2
|
+
readonly executionArn: string;
|
|
3
|
+
readonly operationId: string;
|
|
4
|
+
readonly parentOperationId?: string;
|
|
5
|
+
readonly targetFunctionName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PropagationMetadata {
|
|
8
|
+
readonly xAmznTraceId?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Encodes the already resolved execution state without creating a span. */
|
|
11
|
+
export declare function createPropagationMetadata(input: PropagationInput, executionArn: string, traceId: string, traceFlags: number): PropagationMetadata | undefined;
|
|
12
|
+
//# sourceMappingURL=propagation-metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"propagation-metadata.d.ts","sourceRoot":"","sources":["../src/propagation-metadata.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAKD,4EAA4E;AAC5E,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,mBAAmB,GAAG,SAAS,CAQjC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/durable-execution-sdk-js-otel",
|
|
3
3
|
"description": "OpenTelemetry instrumentation plugin for AWS Durable Execution SDK",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -50,22 +50,26 @@
|
|
|
50
50
|
"dist-types"
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
53
|
+
"@aws/durable-execution-sdk-js-testing": "^1.3.0",
|
|
54
|
+
"@biomejs/biome": "2.5.15",
|
|
55
|
+
"@opentelemetry/core": "^2.12.0",
|
|
56
|
+
"fast-check": "^4.10.2",
|
|
57
|
+
"jest": "^30.5.2",
|
|
58
|
+
"typescript": "^6.0.3",
|
|
59
|
+
"@aws/durable-execution-sdk-js-previous": "npm:@aws/durable-execution-sdk-js@2.6.0",
|
|
60
|
+
"semver": "^7.8.5",
|
|
61
|
+
"@types/semver": "^7.8.0"
|
|
58
62
|
},
|
|
59
63
|
"peerDependencies": {
|
|
60
|
-
"@aws/durable-execution-sdk-js": ">=2.4.0",
|
|
64
|
+
"@aws/durable-execution-sdk-js": ">=2.4.0 <3.0.0",
|
|
61
65
|
"@opentelemetry/api": "^1.0.0",
|
|
62
66
|
"@opentelemetry/core": "^2.0.0",
|
|
63
67
|
"@opentelemetry/sdk-trace-node": "^2.6.1"
|
|
64
68
|
},
|
|
69
|
+
"private": false,
|
|
65
70
|
"peerDependenciesMeta": {
|
|
66
71
|
"@aws/durable-execution-sdk-js": {
|
|
67
72
|
"optional": true
|
|
68
73
|
}
|
|
69
|
-
}
|
|
70
|
-
"private": false
|
|
74
|
+
}
|
|
71
75
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"global-id-generator.mjs","sources":["../src/deterministic-id-generator.ts","../src/context-extractors.ts","../src/global-sampler.ts","../src/execution-trace-context.ts","../src/otel-plugin-provider.ts","../src/global-id-generator.ts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3D,mBAAmB,CACpB;QACD,IACE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,EAAE,wBAAwB,CAAC;YAClE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,KAAK,wBAAwB,EACpE;AACA,YAAA,OAAO,SAAS;QAClB;AACA,QAAA,OAAO,wBAAwB;IACjC;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,SAAS;IAClB;AACF;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"global-id-generator.js","sources":["../src/deterministic-id-generator.ts","../src/context-extractors.ts","../src/global-sampler.ts","../src/execution-trace-context.ts","../src/otel-plugin-provider.ts","../src/global-id-generator.ts"],"names":["AsyncLocalStorage","RandomIdGenerator","createHash","SamplingDecision","TraceFlags","ROOT_CONTEXT","SpanKind","trace"],"mappings":";;;;;;;AAYA;;;;;;;AAOG;MACU,wBAAwB,CAAA;AAIhB,IAAA,mBAAA;AAHX,IAAA,OAAgB,WAAW,GAAG,IAAIA,kCAAiB,EAAc;IAEzE,WAAA,CACmB,mBAAA,GAAmC,IAAIC,8BAAiB,EAAE,EAAA;QAA1D,IAAA,CAAA,mBAAmB,GAAnB,mBAAmB;IACnC;AAEH;;;;;AAKG;IACH,OAAO,CAAI,GAAe,EAAE,EAAW,EAAA;AACrC,QAAA,OAAO,wBAAwB,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC;IACjE;;IAGA,eAAe,GAAA;QACb,MAAM,OAAO,GAAG,wBAAwB,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO;QACxE,IAAI,OAAO,EAAE;AACX,YAAA,OAAO,OAAO;QAChB;AACA,QAAA,OAAO,IAAI,CAAC,mBAAmB,CAAC,eAAe,EAAE;IACnD;;IAGA,cAAc,GAAA;QACZ,MAAM,QAAQ,GAAG,wBAAwB,CAAC,WAAW,CAAC,QAAQ,EAAE;A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