@safaricom-mxl/effect-sdk 0.0.22 → 0.0.24
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 +34 -13
- package/dist/browser/index.d.ts +50 -89
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +4 -512
- package/dist/browser/index.js.map +1 -1
- package/dist/cloudflare/index.d.ts +1 -2
- package/dist/cloudflare/index.d.ts.map +1 -1
- package/dist/cloudflare/index.js +83 -27
- package/dist/cloudflare/index.js.map +1 -1
- package/dist/flushable-CXe-q-GF.js +1068 -0
- package/dist/flushable-CXe-q-GF.js.map +1 -0
- package/dist/flushable-SCVrRJX3.d.ts +143 -0
- package/dist/flushable-SCVrRJX3.d.ts.map +1 -0
- package/dist/foldkit/index.d.ts +65 -0
- package/dist/foldkit/index.d.ts.map +1 -0
- package/dist/foldkit/index.js +495 -0
- package/dist/foldkit/index.js.map +1 -0
- package/dist/{index-CPZhMHLl.d.mts → index-BUoRJxHg.d.mts} +262 -196
- package/dist/index-BUoRJxHg.d.mts.map +1 -0
- package/dist/index.server.d.mts +2 -2
- package/dist/index.server.mjs +1 -2
- package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/dist/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-D8jQpDG7.mjs} +1 -2
- package/dist/server/index.d.mts +2 -2
- package/dist/server/index.mjs +1 -2
- package/dist/{server-BoMrxG4x.mjs → server-BMDPjez-.mjs} +645 -565
- package/dist/server-BMDPjez-.mjs.map +1 -0
- package/package.json +61 -53
- package/dist/index-CPZhMHLl.d.mts.map +0 -1
- package/dist/server-BoMrxG4x.mjs.map +0 -1
|
@@ -1,40 +1,165 @@
|
|
|
1
|
-
import { Cause, Config, Context, Duration, Effect, Layer, ManagedRuntime, Option, Schema } from "effect";
|
|
2
|
-
import { HttpClient } from "effect/http";
|
|
1
|
+
import { Cause, Config, Context, Duration, Effect, Exit, Layer, ManagedRuntime, Option, Schema, Tracer } from "effect";
|
|
3
2
|
import { SpanContext } from "@opentelemetry/api";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { HttpClient } from "effect/http";
|
|
4
|
+
import * as Tracer$1 from "effect/Tracer";
|
|
5
|
+
/** A finished span, as handed to the `dropSpan` predicate. */
|
|
6
|
+
interface FinishedSpan {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly kind: Tracer.SpanKind;
|
|
9
|
+
readonly attributes: ReadonlyMap<string, unknown>;
|
|
10
|
+
readonly exit: Exit.Exit<unknown, unknown>;
|
|
7
11
|
}
|
|
8
|
-
interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
interface MxlSpanOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Span name prefixes to drop before OTLP export. Only the matching span is
|
|
15
|
+
* dropped: its children still export (with a parent that never arrives). Use
|
|
16
|
+
* `dropSpanSubtrees` to drop the children too.
|
|
17
|
+
*/
|
|
18
|
+
readonly dropSpanNames?: ReadonlyArray<string> | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Span name prefixes whose span AND every descendant are dropped. The span is
|
|
21
|
+
* started unsampled, so children inherit that and nothing under it exports,
|
|
22
|
+
* whatever its name (DB queries, HTTP client calls, ...).
|
|
23
|
+
*
|
|
24
|
+
* Two side effects worth knowing before reaching for it: outgoing HTTP calls
|
|
25
|
+
* under a dropped span send `traceparent` with the sampled flag off, so
|
|
26
|
+
* downstream services that honour it drop their part of the trace too; and
|
|
27
|
+
* errors inside the subtree never reach error tracking. Keep real work (e.g.
|
|
28
|
+
* processing a job a poll found) out of the dropped span.
|
|
29
|
+
*/
|
|
30
|
+
readonly dropSpanSubtrees?: ReadonlyArray<string> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Called on each finished span; returning `true` drops it (children are not
|
|
33
|
+
* affected). Use when a name prefix isn't enough, e.g. dropping only polls
|
|
34
|
+
* that found nothing: `(span) => span.attributes.get("queue.empty") === true`.
|
|
35
|
+
*/
|
|
36
|
+
readonly dropSpan?: ((span: FinishedSpan) => boolean) | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Stable `_tag` / `Error.name` identifiers of expected failures (validation,
|
|
39
|
+
* not-found, duplicate, ...). A span failing entirely with these exports as
|
|
40
|
+
* status `Ok` with no `exception` event: still visible, never an error. A
|
|
41
|
+
* failure wrapped in an `{ error: … }` envelope is matched on the body's
|
|
42
|
+
* `_tag`. A server span that answered 5xx stays `Error` regardless.
|
|
43
|
+
*/
|
|
44
|
+
readonly anticipatedErrorIdentifiers?: ReadonlyArray<string> | undefined;
|
|
45
|
+
/** @deprecated Use `anticipatedErrorIdentifiers`. */
|
|
46
|
+
readonly anticipatedErrorTags?: ReadonlyArray<string> | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Predicate form of `anticipatedErrorIdentifiers`, for failures a tag can't
|
|
49
|
+
* single out (e.g. a driver error that is only expected for a duplicate key).
|
|
50
|
+
* Either matching makes the failure anticipated.
|
|
51
|
+
*/
|
|
52
|
+
readonly isAnticipatedError?: ((error: unknown) => boolean) | undefined;
|
|
20
53
|
}
|
|
54
|
+
type MapleSpanOptions = MxlSpanOptions;
|
|
55
|
+
/** Internal input: sets are accepted wherever the public options take arrays. */
|
|
56
|
+
interface SpanFilterInput {
|
|
57
|
+
readonly dropSpanNames?: Iterable<string> | undefined;
|
|
58
|
+
readonly dropSpanSubtrees?: Iterable<string> | undefined;
|
|
59
|
+
readonly dropSpan?: ((span: FinishedSpan) => boolean) | undefined;
|
|
60
|
+
readonly anticipatedErrorIdentifiers?: Iterable<string> | undefined;
|
|
61
|
+
readonly anticipatedErrorTags?: Iterable<string> | undefined;
|
|
62
|
+
readonly isAnticipatedError?: ((error: unknown) => boolean) | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Append each error's `[cause]` chain to `exception.stacktrace`, as Effect's
|
|
65
|
+
* stock `OtlpTracer` does. Fingerprints hash the top stack frames, so a
|
|
66
|
+
* preset keeps whatever it shipped with to avoid re-splitting error groups.
|
|
67
|
+
*/
|
|
68
|
+
readonly includeCauseInStack?: boolean | undefined;
|
|
69
|
+
}
|
|
70
|
+
interface SpanFilter {
|
|
71
|
+
readonly dropSubtree: ((name: string) => boolean) | undefined;
|
|
72
|
+
readonly drop: ((span: FinishedSpan) => boolean) | undefined;
|
|
73
|
+
readonly isAnticipated: ((error: unknown) => boolean) | undefined;
|
|
74
|
+
readonly includeCauseInStack: boolean;
|
|
75
|
+
}
|
|
76
|
+
declare const failureIdentifier: (error: unknown) => string | undefined;
|
|
77
|
+
declare const resolveSpanFilter: (input?: SpanFilterInput) => SpanFilter;
|
|
21
78
|
/**
|
|
22
|
-
*
|
|
23
|
-
* configured for MXL's OTLP collector.
|
|
24
|
-
*
|
|
25
|
-
* Returns a no-op layer when `OTEL_SDK_DISABLED=true`.
|
|
79
|
+
* Parse the OTel-standard `OTEL_RESOURCE_ATTRIBUTES` env var.
|
|
26
80
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
|
|
81
|
+
* Format per the OTel spec: comma-separated `key=value` pairs, values may be
|
|
82
|
+
* URL-encoded.
|
|
83
|
+
*/
|
|
84
|
+
declare const parseOtelResourceAttributes: (input: string) => Record<string, string>;
|
|
85
|
+
/**
|
|
86
|
+
* Parse `OTEL_EXPORTER_OTLP_HEADERS` (`key=value,key2=value2`) into a header map.
|
|
87
|
+
*/
|
|
88
|
+
declare const parseOtlpHeaders: (input: string) => Record<string, string>;
|
|
89
|
+
interface ContainerProbe {
|
|
90
|
+
/** True when the path exists — `/.dockerenv` is the Docker marker file. */
|
|
91
|
+
readonly exists: (path: string) => boolean;
|
|
92
|
+
readonly readFile: (path: string) => string;
|
|
93
|
+
readonly hostname: () => string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Pure derivation from probed inputs — the testable core. Every probe call is
|
|
97
|
+
* guarded by the caller (`getContainerAttributes` wraps the whole thing).
|
|
34
98
|
*/
|
|
35
|
-
declare const
|
|
36
|
-
|
|
37
|
-
|
|
99
|
+
declare const deriveContainerAttributes: (probe: ContainerProbe) => Record<string, string>;
|
|
100
|
+
/**
|
|
101
|
+
* Read live container identity from the filesystem, memoized for the process
|
|
102
|
+
* lifetime (container identity cannot change under a running process). Returns
|
|
103
|
+
* `{}` anywhere the probes aren't available — non-Linux, workerd, browsers.
|
|
104
|
+
*/
|
|
105
|
+
declare const getContainerAttributes: () => Record<string, string>;
|
|
106
|
+
type DbSystem = 'clickhouse' | 'postgresql' | 'redis';
|
|
107
|
+
type DependencySpanKind = 'client' | 'producer' | 'consumer';
|
|
108
|
+
interface QueueTraceContextCarrier$1 {
|
|
109
|
+
readonly traceparent?: string | undefined;
|
|
110
|
+
readonly tracestate?: string | undefined;
|
|
111
|
+
readonly baggage?: string | undefined;
|
|
112
|
+
}
|
|
113
|
+
declare function dbClientSpanAttributes(dbSystem: DbSystem, operation?: string): Record<string, string>;
|
|
114
|
+
declare function queueProducerSpanAttributes(destinationName: string, peerService?: string): Record<string, string>;
|
|
115
|
+
declare function queueConsumerSpanAttributes(destinationName: string): Record<string, string>;
|
|
116
|
+
declare function kafkaProducerSpanAttributes(topic: string, peerService?: string): Record<string, string>;
|
|
117
|
+
declare function bufferSpanAttributes(bufferName: string, operation: string): Record<string, string>;
|
|
118
|
+
declare function geoSpanAttributes(): Record<string, string>;
|
|
119
|
+
declare function addSpanLinksFromTraceCarriers(carriers: readonly QueueTraceContextCarrier$1[]): number;
|
|
120
|
+
interface WithDependencySpanOptions {
|
|
121
|
+
readonly attributes?: Record<string, string> | undefined;
|
|
122
|
+
readonly kind?: DependencySpanKind | undefined;
|
|
123
|
+
}
|
|
124
|
+
declare function withDependencySpan<A, E, R>(name: string, attributes: Record<string, string>, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
125
|
+
declare function withDependencySpan<A, E, R>(name: string, options: WithDependencySpanOptions, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
126
|
+
/** Promise-based dependency span for non-Effect code paths. */
|
|
127
|
+
declare function withPromiseDependencySpan<T>(name: string, attributes: Record<string, string>, operation: () => Promise<T>, kind?: DependencySpanKind): Promise<T>;
|
|
128
|
+
declare function spanContextFromTraceparent(traceparent: string | undefined): SpanContext | undefined;
|
|
129
|
+
declare function resolveTraceparentFromHeaders(headers: Record<string, string | ReadonlyArray<string> | undefined>): string | undefined;
|
|
130
|
+
declare function withParentFromTraceparent<A, E, R>(headers: Record<string, string | ReadonlyArray<string> | undefined>, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
131
|
+
interface HttpSpanAttributes {
|
|
132
|
+
readonly method: string;
|
|
133
|
+
readonly route: string;
|
|
134
|
+
readonly requestId?: string | undefined;
|
|
135
|
+
readonly url?: string | undefined;
|
|
136
|
+
}
|
|
137
|
+
interface QueueTraceContextCarrier {
|
|
138
|
+
readonly baggage?: string;
|
|
139
|
+
readonly traceparent?: string;
|
|
140
|
+
readonly tracestate?: string;
|
|
141
|
+
}
|
|
142
|
+
declare function withHttpServerSpan<A, E, R>(name: string, attributes: HttpSpanAttributes, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
143
|
+
declare function finalizeHttpSpan(status: number, route?: string): Effect.Effect<void>;
|
|
144
|
+
interface LogHttpResponseOptions {
|
|
145
|
+
readonly status: number;
|
|
146
|
+
readonly durationMs?: number | undefined;
|
|
147
|
+
readonly method?: string | undefined;
|
|
148
|
+
readonly url?: string | undefined;
|
|
149
|
+
readonly route?: string | undefined;
|
|
150
|
+
readonly error?: unknown;
|
|
151
|
+
readonly traceparent?: string | undefined;
|
|
152
|
+
}
|
|
153
|
+
/** Log an HTTP response at info/warn/error severity based on status code. */
|
|
154
|
+
declare function logHttpResponse(message: string, options: LogHttpResponseOptions): Effect.Effect<void>;
|
|
155
|
+
declare function logHttpRequestFailure(message: string, error: unknown, fields?: Record<string, unknown>): Effect.Effect<void>;
|
|
156
|
+
/** Resolve parent span context from a W3C trace carrier. */
|
|
157
|
+
declare function spanContextFromCarrier(carrier: QueueTraceContextCarrier | Record<string, string> | undefined): SpanContext | undefined;
|
|
158
|
+
declare function withParentFromTraceCarrier<A, E, R>(carrier: QueueTraceContextCarrier | Record<string, string> | undefined, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
159
|
+
/** Build W3C trace carrier for queue/job propagation from request headers + active OTel context. */
|
|
160
|
+
declare function buildQueueTraceCarrier(headers?: Record<string, string | ReadonlyArray<string> | undefined>): Record<string, string> | undefined;
|
|
161
|
+
/** Build W3C trace carrier using the active Effect span when available. */
|
|
162
|
+
declare function buildQueueTraceCarrierEffect(headers?: Record<string, string | ReadonlyArray<string> | undefined>): Effect.Effect<Record<string, string> | undefined>;
|
|
38
163
|
interface TrackProps {
|
|
39
164
|
readonly [key: string]: unknown;
|
|
40
165
|
}
|
|
@@ -50,7 +175,7 @@ interface TrackOptions {
|
|
|
50
175
|
readonly visitorId?: string | undefined;
|
|
51
176
|
}
|
|
52
177
|
declare namespace events_d_exports {
|
|
53
|
-
export { MxlEvents, MxlEventsApi, MxlEventsConfig, MxlEventsHandle, ProductEventsPostError, TrackOptions, layer, make$1 as make, makeHandle };
|
|
178
|
+
export { MxlEvents, MxlEventsApi, MxlEventsConfig, MxlEventsHandle, ProductEventsPostError, TrackOptions, layer$1 as layer, make$1 as make, makeHandle };
|
|
54
179
|
}
|
|
55
180
|
interface MxlEventsConfig {
|
|
56
181
|
readonly apiKey?: string | undefined;
|
|
@@ -77,13 +202,59 @@ declare const make$1: (config?: MxlEventsConfig | undefined) => Effect.Effect<{
|
|
|
77
202
|
flush: Effect.Effect<void, never, never>;
|
|
78
203
|
track: (name: string, options?: TrackOptions) => Effect.Effect<void>;
|
|
79
204
|
}, never, HttpClient.HttpClient | import("effect/Scope").Scope>;
|
|
80
|
-
declare const layer: (config?: MxlEventsConfig) => Layer.Layer<MxlEvents>;
|
|
205
|
+
declare const layer$1: (config?: MxlEventsConfig) => Layer.Layer<MxlEvents>;
|
|
81
206
|
interface MxlEventsHandle {
|
|
82
207
|
readonly dispose: () => Promise<void>;
|
|
83
208
|
readonly flush: () => Promise<void>;
|
|
84
209
|
readonly track: (name: string, options?: TrackOptions) => void;
|
|
85
210
|
}
|
|
86
211
|
declare const makeHandle: (config?: MxlEventsConfig) => MxlEventsHandle;
|
|
212
|
+
/** Minimal evlog enricher context (compatible with `evlog` EnrichContext). */
|
|
213
|
+
interface EffectTraceEnrichContext {
|
|
214
|
+
readonly event: Record<string, unknown>;
|
|
215
|
+
readonly headers?: Record<string, string> | undefined;
|
|
216
|
+
}
|
|
217
|
+
interface EffectTraceEnricherOptions {
|
|
218
|
+
readonly overwrite?: boolean | undefined;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Enrich evlog wide events with trace/span IDs from OTel global context or W3C headers.
|
|
222
|
+
*
|
|
223
|
+
* Use `createEffectTraceEnricher` in the MXL evlog enricher chain.
|
|
224
|
+
*/
|
|
225
|
+
declare function createEffectTraceEnricher(options?: EffectTraceEnricherOptions): (ctx: EffectTraceEnrichContext) => void;
|
|
226
|
+
declare namespace layer_d_exports {
|
|
227
|
+
export { MxlConfig, layer };
|
|
228
|
+
}
|
|
229
|
+
interface MxlConfig extends MxlSpanOptions {
|
|
230
|
+
readonly serviceName?: string | undefined;
|
|
231
|
+
readonly serviceVersion?: string | undefined;
|
|
232
|
+
readonly serviceNamespace?: string | undefined;
|
|
233
|
+
readonly environment?: string | undefined;
|
|
234
|
+
readonly endpoint?: string | undefined;
|
|
235
|
+
readonly headers?: Record<string, string> | undefined;
|
|
236
|
+
readonly attributes?: Record<string, string> | undefined;
|
|
237
|
+
readonly maxBatchSize?: number | undefined;
|
|
238
|
+
readonly loggerExportInterval?: Duration.Input | undefined;
|
|
239
|
+
readonly metricsExportInterval?: Duration.Input | undefined;
|
|
240
|
+
readonly tracerExportInterval?: Duration.Input | undefined;
|
|
241
|
+
readonly shutdownTimeout?: Duration.Input | undefined;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Create an Effect Layer that provides OpenTelemetry traces, logs, and metrics
|
|
245
|
+
* configured for MXL's OTLP collector.
|
|
246
|
+
*
|
|
247
|
+
* Returns a no-op layer when `OTEL_SDK_DISABLED=true`.
|
|
248
|
+
*
|
|
249
|
+
* Wraps the OTLP tracer with `otelGlobalContextBridgeLayer` via `provideMerge`.
|
|
250
|
+
* Measured on effect@4.0.6: `Otlp.layerJson({ tracerContext })` still
|
|
251
|
+
* types the hook as `(primitive, span) => X` and Effect returns that result as
|
|
252
|
+
* the evaluation, so the callback cannot call `~effect/Effect/evaluate` without
|
|
253
|
+
* a `fiber`. `Layer.updateService` also cannot wrap a Tracer the OTLP layer
|
|
254
|
+
* already provides. Keep the merge wrap until Effect passes fiber or evaluates
|
|
255
|
+
* after a side-effect-only context hook.
|
|
256
|
+
*/
|
|
257
|
+
declare const layer: (config?: MxlConfig) => Layer.Layer<never, never, never>;
|
|
87
258
|
declare namespace flushable_d_exports {
|
|
88
259
|
export { FlushableTelemetry, MxlFlushableConfig, make };
|
|
89
260
|
}
|
|
@@ -97,54 +268,6 @@ interface FlushableTelemetry extends MxlEventsHandle {
|
|
|
97
268
|
readonly layer: Layer.Layer<never, never, never>;
|
|
98
269
|
}
|
|
99
270
|
declare const make: (config?: MxlFlushableConfig) => FlushableTelemetry;
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/server/platform.d.ts
|
|
102
|
-
interface PlatformEnv {
|
|
103
|
-
readonly AWS_LAMBDA_FUNCTION_NAME?: string | undefined;
|
|
104
|
-
readonly AWS_LAMBDA_FUNCTION_VERSION?: string | undefined;
|
|
105
|
-
readonly AWS_LAMBDA_LOG_STREAM_NAME?: string | undefined;
|
|
106
|
-
readonly AWS_REGION?: string | undefined;
|
|
107
|
-
readonly AWS_DEFAULT_REGION?: string | undefined;
|
|
108
|
-
readonly VERCEL?: string | undefined;
|
|
109
|
-
readonly VERCEL_REGION?: string | undefined;
|
|
110
|
-
readonly VERCEL_DEPLOYMENT_ID?: string | undefined;
|
|
111
|
-
readonly K_SERVICE?: string | undefined;
|
|
112
|
-
readonly K_REVISION?: string | undefined;
|
|
113
|
-
readonly CLOUD_RUN_REGION?: string | undefined;
|
|
114
|
-
readonly DENO_REGION?: string | undefined;
|
|
115
|
-
readonly DENO_DEPLOYMENT_ID?: string | undefined;
|
|
116
|
-
readonly RENDER_INSTANCE_ID?: string | undefined;
|
|
117
|
-
readonly RAILWAY_REPLICA_ID?: string | undefined;
|
|
118
|
-
}
|
|
119
|
-
interface PlatformInputs {
|
|
120
|
-
readonly runtime: string;
|
|
121
|
-
readonly provider: string;
|
|
122
|
-
readonly platform: string;
|
|
123
|
-
readonly arch: string;
|
|
124
|
-
readonly env: PlatformEnv;
|
|
125
|
-
}
|
|
126
|
-
type Attrs = Record<string, string>;
|
|
127
|
-
declare const derivePlatformAttributes: (inputs: PlatformInputs) => PlatformAttributes;
|
|
128
|
-
type PlatformAttributes = Attrs;
|
|
129
|
-
declare const getAutoPlatformAttributes: () => PlatformAttributes;
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region src/server/config.d.ts
|
|
132
|
-
/**
|
|
133
|
-
* Parse the OTel-standard `OTEL_RESOURCE_ATTRIBUTES` env var.
|
|
134
|
-
*
|
|
135
|
-
* Format per the OTel spec: comma-separated `key=value` pairs, values may be
|
|
136
|
-
* URL-encoded.
|
|
137
|
-
*/
|
|
138
|
-
declare const parseOtelResourceAttributes: (input: string) => Record<string, string>;
|
|
139
|
-
/**
|
|
140
|
-
* Parse `OTEL_EXPORTER_OTLP_HEADERS` (`key=value,key2=value2`) into a header map.
|
|
141
|
-
*/
|
|
142
|
-
declare const parseOtlpHeaders: (input: string) => Record<string, string>;
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region src/server/otlp.d.ts
|
|
145
|
-
declare function normalizeOtlpBaseUrl(url: string): string;
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/server/http-middleware.d.ts
|
|
148
271
|
declare function shouldDisableHttpTrace(request: {
|
|
149
272
|
url: string;
|
|
150
273
|
method: string;
|
|
@@ -153,81 +276,16 @@ declare function tracerDisabledWhenLayer(filter?: (request: {
|
|
|
153
276
|
url: string;
|
|
154
277
|
method: string;
|
|
155
278
|
}) => boolean): Layer.Layer<never, never, never>;
|
|
156
|
-
//#endregion
|
|
157
|
-
//#region src/server/trace-correlation.d.ts
|
|
158
|
-
interface TraceCorrelation {
|
|
159
|
-
spanId?: string;
|
|
160
|
-
traceId?: string;
|
|
161
|
-
}
|
|
162
|
-
interface TraceLogAnnotations extends Record<string, string> {}
|
|
163
|
-
/** Parse W3C `traceparent` (`00-{traceId}-{spanId}-{flags}`). */
|
|
164
|
-
declare function parseTraceparent(traceparent: string | undefined): TraceCorrelation;
|
|
165
|
-
/**
|
|
166
|
-
* Resolve trace/span IDs for log correlation.
|
|
167
|
-
*
|
|
168
|
-
* Prefers the active OpenTelemetry span (when a host bridge or queue propagation
|
|
169
|
-
* is active), then falls back to a W3C `traceparent` carrier.
|
|
170
|
-
*/
|
|
171
|
-
declare function getEffectTraceCorrelation(options?: {
|
|
172
|
-
traceparent?: string | undefined;
|
|
173
|
-
}): TraceCorrelation;
|
|
174
|
-
/** Build log annotation fields from active span correlation. */
|
|
175
|
-
declare function traceCorrelationLogAnnotations(options?: {
|
|
176
|
-
traceparent?: string | undefined;
|
|
177
|
-
} & Record<string, string>): TraceLogAnnotations;
|
|
178
|
-
/** Annotate Effect logs with the active span's trace/span IDs. */
|
|
179
|
-
declare function annotateLogsWithActiveSpanCorrelation<A, E, R>(program: Effect.Effect<A, E, R>, fields?: Record<string, string>): Effect.Effect<A, E, R>;
|
|
180
|
-
//#endregion
|
|
181
|
-
//#region src/server/http-tracing.d.ts
|
|
182
|
-
declare function spanContextFromTraceparent(traceparent: string | undefined): SpanContext | undefined;
|
|
183
|
-
declare function resolveTraceparentFromHeaders(headers: Record<string, string | ReadonlyArray<string> | undefined>): string | undefined;
|
|
184
|
-
declare function withParentFromTraceparent<A, E, R>(headers: Record<string, string | ReadonlyArray<string> | undefined>, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
185
|
-
interface HttpSpanAttributes {
|
|
186
|
-
readonly method: string;
|
|
187
|
-
readonly route: string;
|
|
188
|
-
readonly requestId?: string | undefined;
|
|
189
|
-
readonly url?: string | undefined;
|
|
190
|
-
}
|
|
191
|
-
interface QueueTraceContextCarrier$1 {
|
|
192
|
-
readonly baggage?: string;
|
|
193
|
-
readonly traceparent?: string;
|
|
194
|
-
readonly tracestate?: string;
|
|
195
|
-
}
|
|
196
|
-
declare function withHttpServerSpan<A, E, R>(name: string, attributes: HttpSpanAttributes, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
197
|
-
declare function finalizeHttpSpan(status: number, route?: string): Effect.Effect<void>;
|
|
198
|
-
interface LogHttpResponseOptions {
|
|
199
|
-
readonly status: number;
|
|
200
|
-
readonly durationMs?: number | undefined;
|
|
201
|
-
readonly method?: string | undefined;
|
|
202
|
-
readonly url?: string | undefined;
|
|
203
|
-
readonly route?: string | undefined;
|
|
204
|
-
readonly error?: unknown;
|
|
205
|
-
readonly traceparent?: string | undefined;
|
|
206
|
-
}
|
|
207
|
-
/** Log an HTTP response at info/warn/error severity based on status code. */
|
|
208
|
-
declare function logHttpResponse(message: string, options: LogHttpResponseOptions): Effect.Effect<void>;
|
|
209
|
-
declare function logHttpRequestFailure(message: string, error: unknown, fields?: Record<string, unknown>): Effect.Effect<void>;
|
|
210
|
-
/** Resolve parent span context from a W3C trace carrier. */
|
|
211
|
-
declare function spanContextFromCarrier(carrier: QueueTraceContextCarrier$1 | Record<string, string> | undefined): SpanContext | undefined;
|
|
212
|
-
declare function withParentFromTraceCarrier<A, E, R>(carrier: QueueTraceContextCarrier$1 | Record<string, string> | undefined, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
213
|
-
/** Build W3C trace carrier for queue/job propagation from request headers + active OTel context. */
|
|
214
|
-
declare function buildQueueTraceCarrier(headers?: Record<string, string | ReadonlyArray<string> | undefined>): Record<string, string> | undefined;
|
|
215
|
-
/** Build W3C trace carrier using the active Effect span when available. */
|
|
216
|
-
declare function buildQueueTraceCarrierEffect(headers?: Record<string, string | ReadonlyArray<string> | undefined>): Effect.Effect<Record<string, string> | undefined>;
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region src/server/jobs.d.ts
|
|
219
279
|
interface RunJobWithSpanOptions {
|
|
220
280
|
readonly name: string;
|
|
221
281
|
readonly attributes?: Record<string, string> | undefined;
|
|
222
282
|
readonly parentSpanContext?: SpanContext | undefined;
|
|
223
|
-
readonly parentTraceCarrier?: QueueTraceContextCarrier
|
|
283
|
+
readonly parentTraceCarrier?: QueueTraceContextCarrier | Record<string, string> | undefined;
|
|
224
284
|
readonly logAttributes?: Record<string, string> | undefined;
|
|
225
285
|
}
|
|
226
286
|
declare function jobWithSpanEffect<A, E, R>(options: RunJobWithSpanOptions, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
227
287
|
declare function runJobWithSpan<A, E, R>(runtime: ManagedRuntime.ManagedRuntime<R, unknown>, options: RunJobWithSpanOptions, program: Effect.Effect<A, E>): Promise<A>;
|
|
228
|
-
|
|
229
|
-
//#region src/server/logging.d.ts
|
|
230
|
-
type EffectLogLevel = "Debug" | "Info" | "Warn" | "Error" | "Fatal";
|
|
288
|
+
type EffectLogLevel = 'Debug' | 'Info' | 'Warn' | 'Error' | 'Fatal';
|
|
231
289
|
interface SerializedLogError {
|
|
232
290
|
readonly message: string;
|
|
233
291
|
readonly name: string;
|
|
@@ -237,11 +295,11 @@ interface SerializedLogError {
|
|
|
237
295
|
declare function resolveLogLevelFromEnv(env?: NodeJS.ProcessEnv): EffectLogLevel;
|
|
238
296
|
/** Map HTTP status to Effect log level for response/failure logs. */
|
|
239
297
|
declare function resolveEffectLogLevelFromHttpStatus(status: number | undefined): EffectLogLevel;
|
|
240
|
-
type HttpLogOutcome =
|
|
298
|
+
type HttpLogOutcome = 'error' | 'success';
|
|
241
299
|
interface HttpStatusLogFields {
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
244
|
-
readonly
|
|
300
|
+
readonly 'http.response.status_code': string;
|
|
301
|
+
readonly 'http.status': string;
|
|
302
|
+
readonly 'log.level': 'error' | 'info' | 'warn';
|
|
245
303
|
readonly outcome: HttpLogOutcome;
|
|
246
304
|
}
|
|
247
305
|
/** Standard log fields for HTTP response correlation in OTEL drains. */
|
|
@@ -254,19 +312,17 @@ declare function logInfo(message: string, fields?: Record<string, unknown>): Eff
|
|
|
254
312
|
declare function logWarning(message: string, fields?: Record<string, unknown>): Effect.Effect<void>;
|
|
255
313
|
declare function logError(message: string, fields?: Record<string, unknown>): Effect.Effect<void>;
|
|
256
314
|
declare function logAtLevel(level: EffectLogLevel, message: string, fields?: Record<string, unknown>): Effect.Effect<void>;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
declare function formatTraceparent(span: Tracer.AnySpan): string;
|
|
260
|
-
declare function buildTraceCarrierFromSpan(span: Tracer.AnySpan, headers?: Record<string, string>): Record<string, string>;
|
|
315
|
+
declare function formatTraceparent(span: Tracer$1.AnySpan): string;
|
|
316
|
+
declare function buildTraceCarrierFromSpan(span: Tracer$1.AnySpan, headers?: Record<string, string>): Record<string, string>;
|
|
261
317
|
/**
|
|
262
318
|
* Wrap a tracer so Effect spans activate global `@opentelemetry/api` context.
|
|
263
319
|
*
|
|
264
320
|
* Prefer this over `Otlp.layerJson({ tracerContext })` until Effect changes
|
|
265
|
-
* that hook. On effect@4.0.
|
|
321
|
+
* that hook. On effect@4.0.6 the callback is still `(primitive, span)`
|
|
266
322
|
* and must return the evaluation, but `EffectPrimitive` only evaluates with a
|
|
267
323
|
* `fiber`. Keep this wrap until Effect passes fiber or evaluates after the hook.
|
|
268
324
|
*/
|
|
269
|
-
declare function wrapTracerWithOtelContextBridge(base: Tracer.Tracer): Tracer.Tracer;
|
|
325
|
+
declare function wrapTracerWithOtelContextBridge(base: Tracer$1.Tracer): Tracer$1.Tracer;
|
|
270
326
|
/**
|
|
271
327
|
* Layer that wraps the configured Effect tracer with a global OTel context bridge.
|
|
272
328
|
*
|
|
@@ -274,46 +330,56 @@ declare function wrapTracerWithOtelContextBridge(base: Tracer.Tracer): Tracer.Tr
|
|
|
274
330
|
* and outbound W3C headers see the active server span.
|
|
275
331
|
*/
|
|
276
332
|
declare const otelGlobalContextBridgeLayer: Layer.Layer<never, never, never>;
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
readonly
|
|
282
|
-
readonly
|
|
333
|
+
declare function normalizeOtlpBaseUrl(url: string): string;
|
|
334
|
+
interface PlatformEnv {
|
|
335
|
+
readonly AWS_LAMBDA_FUNCTION_NAME?: string | undefined;
|
|
336
|
+
readonly AWS_LAMBDA_FUNCTION_VERSION?: string | undefined;
|
|
337
|
+
readonly AWS_LAMBDA_LOG_STREAM_NAME?: string | undefined;
|
|
338
|
+
readonly AWS_REGION?: string | undefined;
|
|
339
|
+
readonly AWS_DEFAULT_REGION?: string | undefined;
|
|
340
|
+
readonly VERCEL?: string | undefined;
|
|
341
|
+
readonly VERCEL_REGION?: string | undefined;
|
|
342
|
+
readonly VERCEL_DEPLOYMENT_ID?: string | undefined;
|
|
343
|
+
readonly K_SERVICE?: string | undefined;
|
|
344
|
+
readonly K_REVISION?: string | undefined;
|
|
345
|
+
readonly CLOUD_RUN_REGION?: string | undefined;
|
|
346
|
+
readonly DENO_REGION?: string | undefined;
|
|
347
|
+
readonly DENO_DEPLOYMENT_ID?: string | undefined;
|
|
348
|
+
readonly RENDER_INSTANCE_ID?: string | undefined;
|
|
349
|
+
readonly RAILWAY_REPLICA_ID?: string | undefined;
|
|
283
350
|
}
|
|
284
|
-
interface
|
|
285
|
-
readonly
|
|
351
|
+
interface PlatformInputs {
|
|
352
|
+
readonly runtime: string;
|
|
353
|
+
readonly provider: string;
|
|
354
|
+
readonly platform: string;
|
|
355
|
+
readonly arch: string;
|
|
356
|
+
readonly env: PlatformEnv;
|
|
357
|
+
}
|
|
358
|
+
type Attrs = Record<string, string>;
|
|
359
|
+
declare const derivePlatformAttributes: (inputs: PlatformInputs) => PlatformAttributes;
|
|
360
|
+
type PlatformAttributes = Attrs;
|
|
361
|
+
declare const getAutoPlatformAttributes: () => PlatformAttributes;
|
|
362
|
+
interface TraceCorrelation {
|
|
363
|
+
spanId?: string;
|
|
364
|
+
traceId?: string;
|
|
286
365
|
}
|
|
366
|
+
interface TraceLogAnnotations extends Record<string, string> {}
|
|
367
|
+
/** Parse W3C `traceparent` (`00-{traceId}-{spanId}-{flags}`). */
|
|
368
|
+
declare function parseTraceparent(traceparent: string | undefined): TraceCorrelation;
|
|
287
369
|
/**
|
|
288
|
-
*
|
|
370
|
+
* Resolve trace/span IDs for log correlation.
|
|
289
371
|
*
|
|
290
|
-
*
|
|
372
|
+
* Prefers the active OpenTelemetry span (when a host bridge or queue propagation
|
|
373
|
+
* is active), then falls back to a W3C `traceparent` carrier.
|
|
291
374
|
*/
|
|
292
|
-
declare function
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
declare function queueProducerSpanAttributes(destinationName: string, peerService?: string): Record<string, string>;
|
|
304
|
-
declare function queueConsumerSpanAttributes(destinationName: string): Record<string, string>;
|
|
305
|
-
declare function kafkaProducerSpanAttributes(topic: string, peerService?: string): Record<string, string>;
|
|
306
|
-
declare function bufferSpanAttributes(bufferName: string, operation: string): Record<string, string>;
|
|
307
|
-
declare function geoSpanAttributes(): Record<string, string>;
|
|
308
|
-
declare function addSpanLinksFromTraceCarriers(carriers: readonly QueueTraceContextCarrier[]): number;
|
|
309
|
-
interface WithDependencySpanOptions {
|
|
310
|
-
readonly attributes?: Record<string, string> | undefined;
|
|
311
|
-
readonly kind?: DependencySpanKind | undefined;
|
|
312
|
-
}
|
|
313
|
-
declare function withDependencySpan<A, E, R>(name: string, attributes: Record<string, string>, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
314
|
-
declare function withDependencySpan<A, E, R>(name: string, options: WithDependencySpanOptions, program: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
315
|
-
/** Promise-based dependency span for non-Effect code paths. */
|
|
316
|
-
declare function withPromiseDependencySpan<T>(name: string, attributes: Record<string, string>, operation: () => Promise<T>, kind?: DependencySpanKind): Promise<T>;
|
|
317
|
-
//#endregion
|
|
318
|
-
export { annotateLogsWithActiveSpanCorrelation as $, minimumLogLevelLayer as A, buildQueueTraceCarrier as B, SerializedLogError as C, logError as D, logDebug as E, jobWithSpanEffect as F, resolveTraceparentFromHeaders as G, finalizeHttpSpan as H, runJobWithSpan as I, withHttpServerSpan as J, spanContextFromCarrier as K, HttpSpanAttributes as L, resolveLogLevelFromEnv as M, serializeLogError as N, logInfo as O, RunJobWithSpanOptions as P, TraceLogAnnotations as Q, LogHttpResponseOptions as R, HttpStatusLogFields as S, logAtLevel as T, logHttpRequestFailure as U, buildQueueTraceCarrierEffect as V, logHttpResponse as W, withParentFromTraceparent as X, withParentFromTraceCarrier as Y, TraceCorrelation as Z, formatTraceparent as _, events_d_exports as _t, bufferSpanAttributes as a, normalizeOtlpBaseUrl as at, EffectLogLevel as b, layer_d_exports as bt, kafkaProducerSpanAttributes as c, PlatformInputs as ct, withDependencySpan as d, FlushableTelemetry as dt, getEffectTraceCorrelation as et, withPromiseDependencySpan as f, MxlFlushableConfig as ft, buildTraceCarrierFromSpan as g, MxlEventsHandle as gt, createEffectTraceEnricher as h, MxlEventsConfig as ht, addSpanLinksFromTraceCarriers as i, tracerDisabledWhenLayer as it, resolveEffectLogLevelFromHttpStatus as j, logWarning as k, queueConsumerSpanAttributes as l, derivePlatformAttributes as lt, EffectTraceEnricherOptions as m, MxlEventsApi as mt, DependencySpanKind as n, traceCorrelationLogAnnotations as nt, dbClientSpanAttributes as o, parseOtelResourceAttributes as ot, EffectTraceEnrichContext as p, flushable_d_exports as pt, spanContextFromTraceparent as q, WithDependencySpanOptions as r, shouldDisableHttpTrace as rt, geoSpanAttributes as s, parseOtlpHeaders as st, DbSystem as t, parseTraceparent as tt, queueProducerSpanAttributes as u, getAutoPlatformAttributes as ut, otelGlobalContextBridgeLayer as v, TrackOptions as vt, buildHttpStatusLogFields as w, HttpLogOutcome as x, wrapTracerWithOtelContextBridge as y, MxlConfig as yt, QueueTraceContextCarrier$1 as z };
|
|
319
|
-
//# sourceMappingURL=index-CPZhMHLl.d.mts.map
|
|
375
|
+
declare function getEffectTraceCorrelation(options?: {
|
|
376
|
+
traceparent?: string | undefined;
|
|
377
|
+
}): TraceCorrelation;
|
|
378
|
+
/** Build log annotation fields from active span correlation. */
|
|
379
|
+
declare function traceCorrelationLogAnnotations(options?: {
|
|
380
|
+
traceparent?: string | undefined;
|
|
381
|
+
} & Record<string, string>): TraceLogAnnotations;
|
|
382
|
+
/** Annotate Effect logs with the active span's trace/span IDs. */
|
|
383
|
+
declare function annotateLogsWithActiveSpanCorrelation<A, E, R>(program: Effect.Effect<A, E, R>, fields?: Record<string, string>): Effect.Effect<A, E, R>;
|
|
384
|
+
export { logHttpRequestFailure as $, jobWithSpanEffect as A, EffectTraceEnricherOptions as B, logInfo as C, parseOtlpHeaders as Ct, resolveLogLevelFromEnv as D, failureIdentifier as Dt, resolveEffectLogLevelFromHttpStatus as E, MxlSpanOptions as Et, MxlFlushableConfig as F, events_d_exports as G, MxlEventsApi as H, flushable_d_exports as I, LogHttpResponseOptions as J, TrackOptions as K, MxlConfig as L, shouldDisableHttpTrace as M, tracerDisabledWhenLayer as N, serializeLogError as O, resolveSpanFilter as Ot, FlushableTelemetry as P, finalizeHttpSpan as Q, layer_d_exports as R, logError as S, parseOtelResourceAttributes as St, minimumLogLevelLayer as T, MapleSpanOptions as Tt, MxlEventsConfig as U, createEffectTraceEnricher as V, MxlEventsHandle as W, buildQueueTraceCarrier as X, QueueTraceContextCarrier as Y, buildQueueTraceCarrierEffect as Z, HttpStatusLogFields as _, withDependencySpan as _t, parseTraceparent as a, withParentFromTraceCarrier as at, logAtLevel as b, deriveContainerAttributes as bt, derivePlatformAttributes as c, DependencySpanKind as ct, buildTraceCarrierFromSpan as d, bufferSpanAttributes as dt, logHttpResponse as et, formatTraceparent as f, dbClientSpanAttributes as ft, HttpLogOutcome as g, queueProducerSpanAttributes as gt, EffectLogLevel as h, queueConsumerSpanAttributes as ht, getEffectTraceCorrelation as i, withHttpServerSpan as it, runJobWithSpan as j, RunJobWithSpanOptions as k, getAutoPlatformAttributes as l, WithDependencySpanOptions as lt, wrapTracerWithOtelContextBridge as m, kafkaProducerSpanAttributes as mt, TraceLogAnnotations as n, spanContextFromCarrier as nt, traceCorrelationLogAnnotations as o, withParentFromTraceparent as ot, otelGlobalContextBridgeLayer as p, geoSpanAttributes as pt, HttpSpanAttributes as q, annotateLogsWithActiveSpanCorrelation as r, spanContextFromTraceparent as rt, PlatformInputs as s, DbSystem as st, TraceCorrelation as t, resolveTraceparentFromHeaders as tt, normalizeOtlpBaseUrl as u, addSpanLinksFromTraceCarriers as ut, SerializedLogError as v, withPromiseDependencySpan as vt, logWarning as w, FinishedSpan as wt, logDebug as x, getContainerAttributes as xt, buildHttpStatusLogFields as y, ContainerProbe as yt, EffectTraceEnrichContext as z };
|
|
385
|
+
//# sourceMappingURL=index-BUoRJxHg.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BUoRJxHg.d.mts","names":["QueueTraceContextCarrier","make","layer","Tracer"],"sources":["../src/shared/span-options.ts","../src/server/config.ts","../src/server/container.ts","../src/shared/dependency-spans.ts","../src/server/http-tracing.ts","../src/shared/product-event.ts","../src/server/events.ts","../src/server/evlog-bridge.ts","../src/server/layer.ts","../src/server/flushable.ts","../src/server/http-middleware.ts","../src/server/jobs.ts","../src/server/logging.ts","../src/server/otel-context-bridge.ts","../src/server/otlp.ts","../src/server/platform.ts","../src/server/trace-correlation.ts"],"mappings":"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"}
|
package/dist/index.server.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { type DbSystem, type DependencySpanKind, type EffectLogLevel, type EffectTraceEnrichContext, type EffectTraceEnricherOptions, type FlushableTelemetry, type HttpLogOutcome, type HttpSpanAttributes, type HttpStatusLogFields, type LogHttpResponseOptions, layer_d_exports as Mxl, type MxlConfig, events_d_exports as MxlEvents, type MxlEventsApi, type MxlEventsConfig, type MxlEventsHandle, flushable_d_exports as MxlFlush, type MxlFlushableConfig, type PlatformInputs, type QueueTraceContextCarrier, type RunJobWithSpanOptions, type SerializedLogError, type TraceCorrelation, type TraceLogAnnotations, type TrackOptions, type WithDependencySpanOptions, addSpanLinksFromTraceCarriers, annotateLogsWithActiveSpanCorrelation, bufferSpanAttributes, buildHttpStatusLogFields, buildQueueTraceCarrier, buildQueueTraceCarrierEffect, buildTraceCarrierFromSpan, createEffectTraceEnricher, dbClientSpanAttributes, derivePlatformAttributes, finalizeHttpSpan, formatTraceparent, geoSpanAttributes, getAutoPlatformAttributes, getEffectTraceCorrelation, jobWithSpanEffect, kafkaProducerSpanAttributes, logAtLevel, logDebug, logError, logHttpRequestFailure, logHttpResponse, logInfo, logWarning, minimumLogLevelLayer, normalizeOtlpBaseUrl, otelGlobalContextBridgeLayer, parseOtelResourceAttributes, parseOtlpHeaders, parseTraceparent, queueConsumerSpanAttributes, queueProducerSpanAttributes, resolveEffectLogLevelFromHttpStatus, resolveLogLevelFromEnv, resolveTraceparentFromHeaders, runJobWithSpan, serializeLogError, shouldDisableHttpTrace, spanContextFromCarrier, spanContextFromTraceparent, traceCorrelationLogAnnotations, tracerDisabledWhenLayer, withDependencySpan, withHttpServerSpan, withParentFromTraceCarrier, withParentFromTraceparent, withPromiseDependencySpan, wrapTracerWithOtelContextBridge };
|
|
1
|
+
import { $ as logHttpRequestFailure, A as jobWithSpanEffect, B as EffectTraceEnricherOptions, C as logInfo, Ct as parseOtlpHeaders, D as resolveLogLevelFromEnv, Dt as failureIdentifier, E as resolveEffectLogLevelFromHttpStatus, Et as MxlSpanOptions, F as MxlFlushableConfig, G as events_d_exports, H as MxlEventsApi, I as flushable_d_exports, J as LogHttpResponseOptions, K as TrackOptions, L as MxlConfig, M as shouldDisableHttpTrace, N as tracerDisabledWhenLayer, O as serializeLogError, Ot as resolveSpanFilter, P as FlushableTelemetry, Q as finalizeHttpSpan, R as layer_d_exports, S as logError, St as parseOtelResourceAttributes, T as minimumLogLevelLayer, Tt as MapleSpanOptions, U as MxlEventsConfig, V as createEffectTraceEnricher, W as MxlEventsHandle, X as buildQueueTraceCarrier, Y as QueueTraceContextCarrier, Z as buildQueueTraceCarrierEffect, _ as HttpStatusLogFields, _t as withDependencySpan, a as parseTraceparent, at as withParentFromTraceCarrier, b as logAtLevel, bt as deriveContainerAttributes, c as derivePlatformAttributes, ct as DependencySpanKind, d as buildTraceCarrierFromSpan, dt as bufferSpanAttributes, et as logHttpResponse, f as formatTraceparent, ft as dbClientSpanAttributes, g as HttpLogOutcome, gt as queueProducerSpanAttributes, h as EffectLogLevel, ht as queueConsumerSpanAttributes, i as getEffectTraceCorrelation, it as withHttpServerSpan, j as runJobWithSpan, k as RunJobWithSpanOptions, l as getAutoPlatformAttributes, lt as WithDependencySpanOptions, m as wrapTracerWithOtelContextBridge, mt as kafkaProducerSpanAttributes, n as TraceLogAnnotations, nt as spanContextFromCarrier, o as traceCorrelationLogAnnotations, ot as withParentFromTraceparent, p as otelGlobalContextBridgeLayer, pt as geoSpanAttributes, q as HttpSpanAttributes, r as annotateLogsWithActiveSpanCorrelation, rt as spanContextFromTraceparent, s as PlatformInputs, st as DbSystem, t as TraceCorrelation, tt as resolveTraceparentFromHeaders, u as normalizeOtlpBaseUrl, ut as addSpanLinksFromTraceCarriers, v as SerializedLogError, vt as withPromiseDependencySpan, w as logWarning, wt as FinishedSpan, x as logDebug, xt as getContainerAttributes, y as buildHttpStatusLogFields, yt as ContainerProbe, z as EffectTraceEnrichContext } from "./index-BUoRJxHg.mjs";
|
|
2
|
+
export { type ContainerProbe, type DbSystem, type DependencySpanKind, type EffectLogLevel, type EffectTraceEnrichContext, type EffectTraceEnricherOptions, type FinishedSpan, type FlushableTelemetry, type HttpLogOutcome, type HttpSpanAttributes, type HttpStatusLogFields, type LogHttpResponseOptions, type MapleSpanOptions, layer_d_exports as Mxl, type MxlConfig, events_d_exports as MxlEvents, type MxlEventsApi, type MxlEventsConfig, type MxlEventsHandle, flushable_d_exports as MxlFlush, type MxlFlushableConfig, type MxlSpanOptions, type PlatformInputs, type QueueTraceContextCarrier, type RunJobWithSpanOptions, type SerializedLogError, type TraceCorrelation, type TraceLogAnnotations, type TrackOptions, type WithDependencySpanOptions, addSpanLinksFromTraceCarriers, annotateLogsWithActiveSpanCorrelation, bufferSpanAttributes, buildHttpStatusLogFields, buildQueueTraceCarrier, buildQueueTraceCarrierEffect, buildTraceCarrierFromSpan, createEffectTraceEnricher, dbClientSpanAttributes, deriveContainerAttributes, derivePlatformAttributes, failureIdentifier, finalizeHttpSpan, formatTraceparent, geoSpanAttributes, getAutoPlatformAttributes, getContainerAttributes, getEffectTraceCorrelation, jobWithSpanEffect, kafkaProducerSpanAttributes, logAtLevel, logDebug, logError, logHttpRequestFailure, logHttpResponse, logInfo, logWarning, minimumLogLevelLayer, normalizeOtlpBaseUrl, otelGlobalContextBridgeLayer, parseOtelResourceAttributes, parseOtlpHeaders, parseTraceparent, queueConsumerSpanAttributes, queueProducerSpanAttributes, resolveEffectLogLevelFromHttpStatus, resolveLogLevelFromEnv, resolveSpanFilter, resolveTraceparentFromHeaders, runJobWithSpan, serializeLogError, shouldDisableHttpTrace, spanContextFromCarrier, spanContextFromTraceparent, traceCorrelationLogAnnotations, tracerDisabledWhenLayer, withDependencySpan, withHttpServerSpan, withParentFromTraceCarrier, withParentFromTraceparent, withPromiseDependencySpan, wrapTracerWithOtelContextBridge };
|
package/dist/index.server.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { layer_exports as Mxl, events_exports as MxlEvents, flushable_exports as MxlFlush, addSpanLinksFromTraceCarriers, annotateLogsWithActiveSpanCorrelation, bufferSpanAttributes, buildHttpStatusLogFields, buildQueueTraceCarrier, buildQueueTraceCarrierEffect, buildTraceCarrierFromSpan, createEffectTraceEnricher, dbClientSpanAttributes, derivePlatformAttributes, finalizeHttpSpan, formatTraceparent, geoSpanAttributes, getAutoPlatformAttributes, getEffectTraceCorrelation, jobWithSpanEffect, kafkaProducerSpanAttributes, logAtLevel, logDebug, logError, logHttpRequestFailure, logHttpResponse, logInfo, logWarning, minimumLogLevelLayer, normalizeOtlpBaseUrl, otelGlobalContextBridgeLayer, parseOtelResourceAttributes, parseOtlpHeaders, parseTraceparent, queueConsumerSpanAttributes, queueProducerSpanAttributes, resolveEffectLogLevelFromHttpStatus, resolveLogLevelFromEnv, resolveTraceparentFromHeaders, runJobWithSpan, serializeLogError, shouldDisableHttpTrace, spanContextFromCarrier, spanContextFromTraceparent, traceCorrelationLogAnnotations, tracerDisabledWhenLayer, withDependencySpan, withHttpServerSpan, withParentFromTraceCarrier, withParentFromTraceparent, withPromiseDependencySpan, wrapTracerWithOtelContextBridge };
|
|
1
|
+
export { D as Mxl, B as MxlEvents, E as MxlFlush, V as addSpanLinksFromTraceCarriers, I as annotateLogsWithActiveSpanCorrelation, H as bufferSpanAttributes, m as buildHttpStatusLogFields, r as buildQueueTraceCarrier, i as buildQueueTraceCarrierEffect, j as buildTraceCarrierFromSpan, F as createEffectTraceEnricher, U as dbClientSpanAttributes, X as deriveContainerAttributes, O as derivePlatformAttributes, et as failureIdentifier, a as finalizeHttpSpan, M as formatTraceparent, W as geoSpanAttributes, k as getAutoPlatformAttributes, Z as getContainerAttributes, L as getEffectTraceCorrelation, t as jobWithSpanEffect, G as kafkaProducerSpanAttributes, h as logAtLevel, g as logDebug, _ as logError, o as logHttpRequestFailure, s as logHttpResponse, v as logInfo, y as logWarning, b as minimumLogLevelLayer, A as normalizeOtlpBaseUrl, N as otelGlobalContextBridgeLayer, Q as parseOtelResourceAttributes, $ as parseOtlpHeaders, R as parseTraceparent, K as queueConsumerSpanAttributes, q as queueProducerSpanAttributes, x as resolveEffectLogLevelFromHttpStatus, S as resolveLogLevelFromEnv, tt as resolveSpanFilter, c as resolveTraceparentFromHeaders, n as runJobWithSpan, C as serializeLogError, w as shouldDisableHttpTrace, l as spanContextFromCarrier, u as spanContextFromTraceparent, z as traceCorrelationLogAnnotations, T as tracerDisabledWhenLayer, J as withDependencySpan, d as withHttpServerSpan, f as withParentFromTraceCarrier, p as withParentFromTraceparent, Y as withPromiseDependencySpan, P as wrapTracerWithOtelContextBridge } from "./server-BMDPjez-.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
@@ -9,5 +9,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
9
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
10
|
return target;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { __exportAll as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
@@ -9,5 +9,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
9
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
10
|
return target;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { __exportAll as t };
|