autotel-cloudflare 18.2.10 → 18.2.12

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 CHANGED
@@ -38,7 +38,7 @@ Cloudflare Workers ship [native tracing](https://developers.cloudflare.com/worke
38
38
  enabled = true
39
39
  ```
40
40
 
41
- When native tracing is active, autotel **defers to the platform**: it does not proxy-instrument bindings (no duplicate spans) and does not run its own exporter. It routes your custom spans to `tracing.enterSpan()` and surfaces the `cf-ray` id as `ctx.correlationId` + a `correlation.id` span attribute. Controlled by `nativeTracing: 'auto' | 'on' | 'off'` (default `'auto'`).
41
+ When native tracing is active, autotel **defers to the platform**: it does not proxy-instrument bindings (no duplicate spans) and does not run its own exporter. It routes your custom spans to `tracing.enterSpan()` and exposes Cloudflare's real trace and span ids as `ctx.traceId` / `ctx.spanId` (from `span.spanContext()`), with the `cf-ray` id as the `ctx.correlationId` fallback on older runtimes. Controlled by `nativeTracing: 'auto' | 'on' | 'off'` (default `'auto'`).
42
42
 
43
43
  In both modes autotel also records the issue signals Workers Issues derives from logs, as span exceptions: `console.error(...)` (status untouched, `captureConsoleErrors: false` to opt out), `autotel.LogFlood` for logging in a loop (`logFloodThreshold`, default `100`), and `autotel.RunawayAlarm` when a Durable Object's `alarm()` runs more than 10 times in 60s (`runawayAlarm: { maxRuns, windowMs }` or `false`).
44
44
 
@@ -1,5 +1,5 @@
1
1
  import { l as boundMethod, p as member, r as asFunction, t as applyTrap, v as trapArgs } from "./values-Vce1mLQx.js";
2
- import { r as platformNativeTracer } from "./native-tracing-D0J7JO58.js";
2
+ import { r as platformNativeTracer } from "./native-tracing-uFC1ykJY.js";
3
3
  import { o as wrap, t as toException } from "./exception-C4TsJIS8.js";
4
4
  import { t as workerTracer } from "./tracer-z8zwRBVS.js";
5
5
  import { WorkerTracer, WorkerTracerProvider, createInitialiser, getActiveConfig, nativeRecordException, setConfig, withoutNativeTracer } from "autotel-edge";
package/dist/handlers.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as RUNAWAY_ALARM_EXCEPTION, r as instrumentDO, t as instrumentWorkflow } from "./handlers-DoD2ZcUM.js";
1
+ import { n as RUNAWAY_ALARM_EXCEPTION, r as instrumentDO, t as instrumentWorkflow } from "./handlers-BA9dgiai.js";
2
2
 
3
3
  export { RUNAWAY_ALARM_EXCEPTION, instrumentDO, instrumentWorkflow };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as instrumentQueueProducer, c as instrumentAI, d as instrumentKV, f as instrumentR2, i as instrumentAnalyticsEngine, l as instrumentBindings, n as instrumentRateLimiter, o as instrumentHyperdrive, p as instrumentServiceBinding, r as instrumentImages, s as instrumentVectorize, t as instrumentBrowserRendering, u as instrumentD1 } from "./bindings-BcSPZDWF.js";
2
2
  import { n as RUNAWAY_ALARM_EXCEPTION, r as instrumentDO, t as instrumentWorkflow } from "./handlers-CEAD5hVy.js";
3
3
  import { a as createWorkersLogger, c as getRequestLogger, i as WorkersLoggerOptions, l as getWorkflowLogger, n as ExecutionLogger, o as getActorLogger, r as ExecutionLoggerOptions, s as getQueueLogger, t as ExecutionLogSnapshot } from "./execution-logger-CCn9HGYC.js";
4
- import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-DFaGAoR7.js";
4
+ import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-BHnRQsDA.js";
5
5
  import { ConfigurationOption } from "autotel-edge";
6
6
  export * from "autotel-edge";
7
7
  //#region src/wrappers/instrument.d.ts
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { _ as readProperty, a as asRecord, c as asString, i as asNumber, n as asBoolean, p as member, r as asFunction, t as applyTrap, v as trapArgs } from "./values-Vce1mLQx.js";
2
2
  import { a as getWorkflowLogger, i as getRequestLogger, n as getActorLogger, r as getQueueLogger, t as createWorkersLogger } from "./execution-logger-Cy1nsWtK.js";
3
- import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-D0J7JO58.js";
3
+ import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-uFC1ykJY.js";
4
4
  import { a as unwrap, o as wrap, r as proxyExecutionContext, t as toException } from "./exception-C4TsJIS8.js";
5
5
  import { t as workerTracer } from "./tracer-z8zwRBVS.js";
6
6
  import { a as instrumentKV, c as instrumentImages, d as instrumentHyperdrive, f as instrumentVectorize, i as instrumentD1, l as instrumentAnalyticsEngine, n as instrumentRateLimiter, o as instrumentR2, p as instrumentAI, r as instrumentBindings, s as instrumentServiceBinding, t as instrumentBrowserRendering, u as instrumentQueueProducer } from "./bindings-BrIFnhtD.js";
7
- import { a as instrumentGlobalFetch, i as initProvider, n as RUNAWAY_ALARM_EXCEPTION, o as instrumentGlobalCache, r as instrumentDO, t as instrumentWorkflow } from "./handlers-DoD2ZcUM.js";
7
+ import { a as instrumentGlobalFetch, i as initProvider, n as RUNAWAY_ALARM_EXCEPTION, o as instrumentGlobalCache, r as instrumentDO, t as instrumentWorkflow } from "./handlers-BA9dgiai.js";
8
8
  import { WorkerTracer, createInitialiser, createNativeTraceContext, ensureGlobalContextManager, getActiveConfig, getServiceForPath, runWithNativeTraceContext, setConfig, shouldInstrumentPath, withNativeTracer, withoutNativeTracer } from "autotel-edge";
9
9
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
10
10
 
@@ -12,7 +12,8 @@ declare function isNativeTracingAvailable(ctx: unknown): boolean;
12
12
  * @param correlationId Optional per-request id (e.g. the `cf-ray` header)
13
13
  * surfaced as `ctx.correlationId` and a `correlation.id` span attribute, so
14
14
  * logs, custom spans, and the Cloudflare dashboard share one queryable key
15
- * today — before Cloudflare exposes in-code trace/span ids.
15
+ * on runtimes without `span.spanContext()`. Where it exists, the real trace id
16
+ * takes over.
16
17
  */
17
18
  declare function getNativeTracerFromCtx(ctx: unknown, correlationId?: string): NativeTracer | null;
18
19
  //#endregion
@@ -41,7 +41,8 @@ function isNativeTracingAvailable(ctx) {
41
41
  * @param correlationId Optional per-request id (e.g. the `cf-ray` header)
42
42
  * surfaced as `ctx.correlationId` and a `correlation.id` span attribute, so
43
43
  * logs, custom spans, and the Cloudflare dashboard share one queryable key
44
- * today — before Cloudflare exposes in-code trace/span ids.
44
+ * on runtimes without `span.spanContext()`. Where it exists, the real trace id
45
+ * takes over.
45
46
  */
46
47
  function getNativeTracerFromCtx(ctx, correlationId) {
47
48
  const tracing = readTracing(ctx);
package/dist/native.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-DFaGAoR7.js";
1
+ import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-BHnRQsDA.js";
2
2
  export { getNativeTracerFromCtx, isNativeTracingAvailable };
package/dist/native.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-D0J7JO58.js";
1
+ import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-uFC1ykJY.js";
2
2
 
3
3
  export { getNativeTracerFromCtx, isNativeTracingAvailable };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotel-cloudflare",
3
- "version": "18.2.10",
3
+ "version": "18.2.12",
4
4
  "description": "The #1 OpenTelemetry package for Cloudflare Workers - complete bindings coverage, native CF OTel integration, advanced sampling",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -85,8 +85,8 @@
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@cloudflare/workers-types": "^5.20261018.1",
88
- "autotel-edge": "6.1.3",
89
- "autotel-genai": "0.16.8"
88
+ "autotel-edge": "6.1.4",
89
+ "autotel-genai": "0.16.10"
90
90
  },
91
91
  "peerDependenciesMeta": {
92
92
  "autotel-edge": {
@@ -100,8 +100,8 @@
100
100
  "@cloudflare/workers-types": "^5.20261018.1",
101
101
  "@opentelemetry/context-async-hooks": "^2.12.0",
102
102
  "@types/node": "^26.6.5",
103
- "autotel-edge": "6.1.3",
104
- "autotel-genai": "0.16.8",
103
+ "autotel-edge": "6.1.4",
104
+ "autotel-genai": "0.16.10",
105
105
  "rimraf": "^6.1.3",
106
106
  "tsdown": "^0.23.1",
107
107
  "typescript": "^7.0.2",