@sentry/cloudflare 10.71.0 → 10.72.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/build/cjs/client.js.map +1 -1
- package/build/cjs/durableobject.js.map +1 -1
- package/build/cjs/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/cjs/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/instrumentations/worker/instrumentEnv.js +5 -7
- package/build/cjs/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/cjs/utils/rpcPropagation.js +20 -0
- package/build/cjs/utils/rpcPropagation.js.map +1 -0
- package/build/cjs/vite/autoInstrument.js +2 -1
- package/build/cjs/vite/autoInstrument.js.map +1 -1
- package/build/cjs/vite/bindings.js +6 -0
- package/build/cjs/vite/bindings.js.map +1 -0
- package/build/cjs/vite/index.js.map +1 -1
- package/build/cjs/vite/transform.js +30 -5
- package/build/cjs/vite/transform.js.map +1 -1
- package/build/cjs/vite/wranglerConfig.js +21 -1
- package/build/cjs/vite/wranglerConfig.js.map +1 -1
- package/build/esm/client.js.map +1 -1
- package/build/esm/durableobject.js.map +1 -1
- package/build/esm/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/esm/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/instrumentations/worker/instrumentEnv.js +5 -7
- package/build/esm/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/utils/rpcPropagation.js +18 -0
- package/build/esm/utils/rpcPropagation.js.map +1 -0
- package/build/esm/vite/autoInstrument.js +2 -1
- package/build/esm/vite/autoInstrument.js.map +1 -1
- package/build/esm/vite/bindings.js +4 -0
- package/build/esm/vite/bindings.js.map +1 -0
- package/build/esm/vite/index.js.map +1 -1
- package/build/esm/vite/transform.js +30 -5
- package/build/esm/vite/transform.js.map +1 -1
- package/build/esm/vite/wranglerConfig.js +21 -2
- package/build/esm/vite/wranglerConfig.js.map +1 -1
- package/build/types/client.d.ts +39 -29
- package/build/types/client.d.ts.map +1 -1
- package/build/types/durableobject.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts +2 -1
- package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
- package/build/types/utils/rpcPropagation.d.ts +15 -0
- package/build/types/utils/rpcPropagation.d.ts.map +1 -0
- package/build/types/vite/autoInstrument.d.ts.map +1 -1
- package/build/types/vite/bindings.d.ts +15 -0
- package/build/types/vite/bindings.d.ts.map +1 -0
- package/build/types/vite/index.d.ts +4 -0
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/transform.d.ts +3 -0
- package/build/types/vite/transform.d.ts.map +1 -1
- package/build/types/vite/wranglerConfig.d.ts +7 -0
- package/build/types/vite/wranglerConfig.d.ts.map +1 -1
- package/build/types-ts3.8/client.d.ts +39 -29
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectNamespace.d.ts +2 -1
- package/build/types-ts3.8/utils/rpcPropagation.d.ts +15 -0
- package/build/types-ts3.8/vite/bindings.d.ts +15 -0
- package/build/types-ts3.8/vite/index.d.ts +4 -0
- package/build/types-ts3.8/vite/transform.d.ts +3 -0
- package/build/types-ts3.8/vite/wranglerConfig.d.ts +7 -0
- package/package.json +3 -3
package/build/types/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClientOptions, Options } from '@sentry/core';
|
|
1
|
+
import type { ClientOptions, Options, TracePropagationTargets } from '@sentry/core';
|
|
2
2
|
import { ServerRuntimeClient } from '@sentry/core';
|
|
3
3
|
import type { ExecutionContextCompat } from './executionContext';
|
|
4
4
|
import type { makeFlushLock } from './flush';
|
|
@@ -68,47 +68,57 @@ interface BaseCloudflareOptions {
|
|
|
68
68
|
*/
|
|
69
69
|
skipOpenTelemetrySetup?: boolean;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* The bindings on `env` that outgoing RPC calls propagate trace context to.
|
|
72
72
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* - Service binding `fetch()` calls (via HTTP headers)
|
|
76
|
-
* - RPC method calls to Durable Objects and WorkerEntrypoints (via trailing argument)
|
|
73
|
+
* Strings match a binding name exactly, regular expressions match by pattern. An empty array
|
|
74
|
+
* (the default) propagates to nothing.
|
|
77
75
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
76
|
+
* RPC has no headers to carry trace context, so the SDK appends it as a trailing argument to
|
|
77
|
+
* every RPC method call on a matching binding. Only a Sentry-instrumented receiver strips that
|
|
78
|
+
* argument again. Anywhere else it arrives as a real argument and changes what the method was
|
|
79
|
+
* called with, so list only the bindings whose receiver you know runs Sentry.
|
|
82
80
|
*
|
|
83
|
-
*
|
|
81
|
+
* Propagation over `stub.fetch()` and service binding `fetch()` uses HTTP headers and is not
|
|
82
|
+
* affected by this option.
|
|
84
83
|
*
|
|
85
|
-
*
|
|
84
|
+
* When you build with the Sentry Cloudflare Vite plugin, bindings that resolve to *this* worker
|
|
85
|
+
* (its own Durable Objects, its self service bindings) are added for you, because the plugin
|
|
86
|
+
* instruments those receivers itself. Whatever you list here is added on top of them.
|
|
87
|
+
*
|
|
88
|
+
* Setting this takes precedence over `enableRpcTracePropagation`: an allow list is the more
|
|
89
|
+
* precise statement, so a worker that sets both propagates only to the listed bindings. An empty
|
|
90
|
+
* array propagates to nothing, which is how a receiver keeps `enableRpcTracePropagation: true`
|
|
91
|
+
* without propagating to anything itself.
|
|
92
|
+
*
|
|
93
|
+
* The receiver still needs `enableRpcTracePropagation: true` to continue the trace it is sent.
|
|
94
|
+
*
|
|
95
|
+
* @default []
|
|
86
96
|
* @example
|
|
87
97
|
* ```ts
|
|
88
|
-
* //
|
|
98
|
+
* // Propagate to `env.ORDERS` and every `env.SVC_*` binding
|
|
89
99
|
* export default Sentry.withSentry(
|
|
90
|
-
*
|
|
100
|
+
* env => ({
|
|
91
101
|
* dsn: env.SENTRY_DSN,
|
|
92
|
-
*
|
|
102
|
+
* rpcTracePropagationBindings: ['ORDERS', /^SVC_/],
|
|
93
103
|
* }),
|
|
94
104
|
* handler,
|
|
95
105
|
* );
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
rpcTracePropagationBindings?: TracePropagationTargets;
|
|
109
|
+
/**
|
|
110
|
+
* Whether trace context is propagated over RPC calls between Workers, Durable Objects, and
|
|
111
|
+
* Service Bindings.
|
|
96
112
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* enableRpcTracePropagation: true,
|
|
102
|
-
* }),
|
|
103
|
-
* MyDOBase,
|
|
104
|
-
* );
|
|
113
|
+
* On the caller side, `true` appends the trace context as a trailing argument to every RPC method
|
|
114
|
+
* call on `env`, including bindings whose receiver does not run Sentry and therefore never strips
|
|
115
|
+
* that argument again. On the receiver side, `true` continues an incoming trace, creates a span
|
|
116
|
+
* per RPC method invocation, and captures errors thrown by RPC methods.
|
|
105
117
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* );
|
|
111
|
-
* ```
|
|
118
|
+
* @deprecated Use `rpcTracePropagationBindings` to name the bindings you call. This option will
|
|
119
|
+
* be removed in a future major version. Receivers keep using it until then.
|
|
120
|
+
*
|
|
121
|
+
* @default false
|
|
112
122
|
*/
|
|
113
123
|
enableRpcTracePropagation?: boolean;
|
|
114
124
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OA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8BAA8B,CAAC,CAAC,SAAS,MAAM,EAC7D,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gCAAgC,EACzC,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACpC,CAAC,CA2BH;AAqHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iCAAiC,CAC/C,CAAC,EACD,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC1B,CAAC,SAAS,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EACtD,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,iBAAiB,EAAE,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAc1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,yBAAyB,CACvC,CAAC,EACD,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC1B,CAAC,SAAS,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EACtD,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,iBAAiB,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAoBlE"}
|
|
@@ -8,6 +8,7 @@ export declare const STUB_NON_RPC_METHODS: Set<string>;
|
|
|
8
8
|
* - `namespace.idFromName(name)` / `namespace.idFromString(id)` / `namespace.newUniqueId()` with breadcrumbs
|
|
9
9
|
*
|
|
10
10
|
* @param namespace - The DurableObjectNamespace to instrument
|
|
11
|
+
* @param propagateRpcTrace - Whether RPC method calls on the returned stubs carry trace context
|
|
11
12
|
*/
|
|
12
|
-
export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace): DurableObjectNamespace;
|
|
13
|
+
export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace, propagateRpcTrace?: boolean): DurableObjectNamespace;
|
|
13
14
|
//# sourceMappingURL=instrumentDurableObjectNamespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentDurableObjectNamespace.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,2BAA2B,CAAC;AAK3F,eAAO,MAAM,oBAAoB,aAAuC,CAAC;AAEzE
|
|
1
|
+
{"version":3,"file":"instrumentDurableObjectNamespace.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,2BAA2B,CAAC;AAK3F,eAAO,MAAM,oBAAoB,aAAuC,CAAC;AAEzE;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,sBAAsB,EACjC,iBAAiB,UAAQ,GACxB,sBAAsB,CAoBxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAsCnD,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,IAAI,KACnE,GAAG,EAAE,gBAAgB,EAGrB,GAAG,EAAE,GAAG,KACL,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAsCnD,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,IAAI,KACnE,GAAG,EAAE,gBAAgB,EAGrB,GAAG,EAAE,GAAG,KACL,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAoEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EACH,KAAK,EACL,CAAC,SAAS,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAC3D,CAAC,SAAS,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,EACpD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,GAAG,SAAS,EAAE,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAkF3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAyBtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAyBtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,CA2F7G"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CloudflareOptions } from '../client';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the per-binding predicate that decides whether a binding takes part in RPC trace
|
|
4
|
+
* propagation.
|
|
5
|
+
*
|
|
6
|
+
* `rpcTracePropagationBindings` wins over `enableRpcTracePropagation` as soon as it is set, an
|
|
7
|
+
* allow list is the more precise statement. An empty list therefore propagates to nothing, even
|
|
8
|
+
* next to `enableRpcTracePropagation: true`, which is how a receiver opts out of being a caller.
|
|
9
|
+
* Only leaving it unset falls back to the boolean.
|
|
10
|
+
*
|
|
11
|
+
* Callers only. Receivers continue an incoming trace whenever `enableRpcTracePropagation` is on,
|
|
12
|
+
* so they have nothing to match against.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createRpcPropagationResolver(options: CloudflareOptions | undefined): (bindingName: string) => boolean;
|
|
15
|
+
//# sourceMappingURL=rpcPropagation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpcPropagation.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcPropagation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAMnD;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAcrH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoInstrument.d.ts","sourceRoot":"","sources":["../../../src/vite/autoInstrument.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAgB/F,wBAAgB,oCAAoC,CAAC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO;;2BAUvE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;oBAkC5E,cAAc,GAAG;QAAE,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,QAC9E,MAAM,MACR,MAAM,GACT,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"autoInstrument.d.ts","sourceRoot":"","sources":["../../../src/vite/autoInstrument.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAgB/F,wBAAgB,oCAAoC,CAAC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO;;2BAUvE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;oBAkC5E,cAAc,GAAG;QAAE,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,QAC9E,MAAM,MACR,MAAM,GACT,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;EAkFzD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binding vocabulary shared by the wrangler config reader and the AST transform.
|
|
3
|
+
*
|
|
4
|
+
* It lives apart from `wranglerConfig.ts` so the transform never has to import that module, which
|
|
5
|
+
* pulls in `wrangler` and with it a Node 20+ runtime.
|
|
6
|
+
*/
|
|
7
|
+
/** Stands in for a class name where a binding targets the module's default export. */
|
|
8
|
+
export declare const DEFAULT_EXPORT: unique symbol;
|
|
9
|
+
/** The name a binding or an export is known by, either an exported class name or the default export. */
|
|
10
|
+
export type ExportName = string | typeof DEFAULT_EXPORT;
|
|
11
|
+
export interface SameWorkerBinding {
|
|
12
|
+
bindingName: string;
|
|
13
|
+
className: ExportName;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../../src/vite/bindings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sFAAsF;AACtF,eAAO,MAAM,cAAc,eAA0B,CAAC;AAEtD,wGAAwG;AACxG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,cAAc,CAAC;AAExD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,UAAU,CAAC;CACvB"}
|
|
@@ -40,6 +40,10 @@ export interface SentryCloudflareVitePluginOptions {
|
|
|
40
40
|
* Durable Object class with `instrumentDurableObjectWithSentry`. Both
|
|
41
41
|
* `vite build` and `vite dev` are instrumented.
|
|
42
42
|
*
|
|
43
|
+
* The plugin also adds the bindings that resolve to the wrapped classes (this worker's own
|
|
44
|
+
* Durable Objects and self service bindings) to `rpcTracePropagationBindings`. Bindings to
|
|
45
|
+
* other workers stay opt-in, their receivers may not run Sentry.
|
|
46
|
+
*
|
|
43
47
|
* @default false
|
|
44
48
|
* @experimental May change or be removed in any release.
|
|
45
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,aAAa,CAAC,EAAE;QACd;;;;;;;;;;;;;WAaG;QACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;QACzC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,aAAa,CAAC,EAAE;QACd;;;;;;;;;;;;;WAaG;QACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;QACzC;;;;;;;;;;;;;;WAcG;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,iCAAsC;;;;cAhElF,CAAC;;;;;YA2BmC,CAAC;mBAEtC,CAAC;gBAAQ,CAAC;;;;;;kCA4ChB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import MagicString from 'magic-string';
|
|
2
|
+
import { type SameWorkerBinding } from './bindings';
|
|
2
3
|
export interface BaseNode {
|
|
3
4
|
type: string;
|
|
4
5
|
start: number;
|
|
@@ -34,6 +35,8 @@ export interface TransformContext {
|
|
|
34
35
|
optionsFn: string;
|
|
35
36
|
/** Import statement prepended when `optionsFn` references a separate module. */
|
|
36
37
|
optionsImport?: string;
|
|
38
|
+
/** @see {@link import('./wranglerConfig').WranglerConfig.sameWorkerBindings} */
|
|
39
|
+
sameWorkerBindings?: readonly SameWorkerBinding[];
|
|
37
40
|
}
|
|
38
41
|
export interface TransformResult {
|
|
39
42
|
code: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/vite/transform.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/vite/transform.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAmC,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASrF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAuDD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAc3F,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C;;;;OAIG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,gBAAgB,GACpB,eAAe,GAAG,SAAS,CAsD7B"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DEFAULT_EXPORT, type ExportName, type SameWorkerBinding } from './bindings';
|
|
2
|
+
export { DEFAULT_EXPORT, type ExportName, type SameWorkerBinding };
|
|
1
3
|
/**
|
|
2
4
|
* The slice of the wrangler configuration the auto-instrument plugin cares
|
|
3
5
|
* about. `main` is an absolute path (wrangler resolves it against the config
|
|
@@ -20,6 +22,11 @@ export interface WranglerConfig {
|
|
|
20
22
|
* an export on a *different* worker, which this build can't wrap.
|
|
21
23
|
*/
|
|
22
24
|
workerEntrypoints: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Bindings whose RPC receiver lives in this worker, so this build instruments it. Not deduped by
|
|
27
|
+
* class, two bindings may point at the same class and both names have to be listed.
|
|
28
|
+
*/
|
|
29
|
+
sameWorkerBindings: SameWorkerBinding[];
|
|
23
30
|
}
|
|
24
31
|
/**
|
|
25
32
|
* Locate and resolve the wrangler configuration via wrangler's own
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wranglerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/wranglerConfig.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wranglerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/wranglerConfig.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA4B3D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClientOptions, Options } from '@sentry/core';
|
|
1
|
+
import { ClientOptions, Options, TracePropagationTargets } from '@sentry/core';
|
|
2
2
|
import { ServerRuntimeClient } from '@sentry/core';
|
|
3
3
|
import { ExecutionContextCompat } from './executionContext';
|
|
4
4
|
import { makeFlushLock } from './flush';
|
|
@@ -68,47 +68,57 @@ interface BaseCloudflareOptions {
|
|
|
68
68
|
*/
|
|
69
69
|
skipOpenTelemetrySetup?: boolean;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* The bindings on `env` that outgoing RPC calls propagate trace context to.
|
|
72
72
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* - Service binding `fetch()` calls (via HTTP headers)
|
|
76
|
-
* - RPC method calls to Durable Objects and WorkerEntrypoints (via trailing argument)
|
|
73
|
+
* Strings match a binding name exactly, regular expressions match by pattern. An empty array
|
|
74
|
+
* (the default) propagates to nothing.
|
|
77
75
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
76
|
+
* RPC has no headers to carry trace context, so the SDK appends it as a trailing argument to
|
|
77
|
+
* every RPC method call on a matching binding. Only a Sentry-instrumented receiver strips that
|
|
78
|
+
* argument again. Anywhere else it arrives as a real argument and changes what the method was
|
|
79
|
+
* called with, so list only the bindings whose receiver you know runs Sentry.
|
|
82
80
|
*
|
|
83
|
-
*
|
|
81
|
+
* Propagation over `stub.fetch()` and service binding `fetch()` uses HTTP headers and is not
|
|
82
|
+
* affected by this option.
|
|
84
83
|
*
|
|
85
|
-
*
|
|
84
|
+
* When you build with the Sentry Cloudflare Vite plugin, bindings that resolve to *this* worker
|
|
85
|
+
* (its own Durable Objects, its self service bindings) are added for you, because the plugin
|
|
86
|
+
* instruments those receivers itself. Whatever you list here is added on top of them.
|
|
87
|
+
*
|
|
88
|
+
* Setting this takes precedence over `enableRpcTracePropagation`: an allow list is the more
|
|
89
|
+
* precise statement, so a worker that sets both propagates only to the listed bindings. An empty
|
|
90
|
+
* array propagates to nothing, which is how a receiver keeps `enableRpcTracePropagation: true`
|
|
91
|
+
* without propagating to anything itself.
|
|
92
|
+
*
|
|
93
|
+
* The receiver still needs `enableRpcTracePropagation: true` to continue the trace it is sent.
|
|
94
|
+
*
|
|
95
|
+
* @default []
|
|
86
96
|
* @example
|
|
87
97
|
* ```ts
|
|
88
|
-
* //
|
|
98
|
+
* // Propagate to `env.ORDERS` and every `env.SVC_*` binding
|
|
89
99
|
* export default Sentry.withSentry(
|
|
90
|
-
*
|
|
100
|
+
* env => ({
|
|
91
101
|
* dsn: env.SENTRY_DSN,
|
|
92
|
-
*
|
|
102
|
+
* rpcTracePropagationBindings: ['ORDERS', /^SVC_/],
|
|
93
103
|
* }),
|
|
94
104
|
* handler,
|
|
95
105
|
* );
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
rpcTracePropagationBindings?: TracePropagationTargets;
|
|
109
|
+
/**
|
|
110
|
+
* Whether trace context is propagated over RPC calls between Workers, Durable Objects, and
|
|
111
|
+
* Service Bindings.
|
|
96
112
|
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* enableRpcTracePropagation: true,
|
|
102
|
-
* }),
|
|
103
|
-
* MyDOBase,
|
|
104
|
-
* );
|
|
113
|
+
* On the caller side, `true` appends the trace context as a trailing argument to every RPC method
|
|
114
|
+
* call on `env`, including bindings whose receiver does not run Sentry and therefore never strips
|
|
115
|
+
* that argument again. On the receiver side, `true` continues an incoming trace, creates a span
|
|
116
|
+
* per RPC method invocation, and captures errors thrown by RPC methods.
|
|
105
117
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* );
|
|
111
|
-
* ```
|
|
118
|
+
* @deprecated Use `rpcTracePropagationBindings` to name the bindings you call. This option will
|
|
119
|
+
* be removed in a future major version. Receivers keep using it until then.
|
|
120
|
+
*
|
|
121
|
+
* @default false
|
|
112
122
|
*/
|
|
113
123
|
enableRpcTracePropagation?: boolean;
|
|
114
124
|
/**
|
|
@@ -8,6 +8,7 @@ export declare const STUB_NON_RPC_METHODS: Set<string>;
|
|
|
8
8
|
* - `namespace.idFromName(name)` / `namespace.idFromString(id)` / `namespace.newUniqueId()` with breadcrumbs
|
|
9
9
|
*
|
|
10
10
|
* @param namespace - The DurableObjectNamespace to instrument
|
|
11
|
+
* @param propagateRpcTrace - Whether RPC method calls on the returned stubs carry trace context
|
|
11
12
|
*/
|
|
12
|
-
export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace): DurableObjectNamespace;
|
|
13
|
+
export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace, propagateRpcTrace?: boolean): DurableObjectNamespace;
|
|
13
14
|
//# sourceMappingURL=instrumentDurableObjectNamespace.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CloudflareOptions } from '../client';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the per-binding predicate that decides whether a binding takes part in RPC trace
|
|
4
|
+
* propagation.
|
|
5
|
+
*
|
|
6
|
+
* `rpcTracePropagationBindings` wins over `enableRpcTracePropagation` as soon as it is set, an
|
|
7
|
+
* allow list is the more precise statement. An empty list therefore propagates to nothing, even
|
|
8
|
+
* next to `enableRpcTracePropagation: true`, which is how a receiver opts out of being a caller.
|
|
9
|
+
* Only leaving it unset falls back to the boolean.
|
|
10
|
+
*
|
|
11
|
+
* Callers only. Receivers continue an incoming trace whenever `enableRpcTracePropagation` is on,
|
|
12
|
+
* so they have nothing to match against.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createRpcPropagationResolver(options: CloudflareOptions | undefined): (bindingName: string) => boolean;
|
|
15
|
+
//# sourceMappingURL=rpcPropagation.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binding vocabulary shared by the wrangler config reader and the AST transform.
|
|
3
|
+
*
|
|
4
|
+
* It lives apart from `wranglerConfig.ts` so the transform never has to import that module, which
|
|
5
|
+
* pulls in `wrangler` and with it a Node 20+ runtime.
|
|
6
|
+
*/
|
|
7
|
+
/** Stands in for a class name where a binding targets the module's default export. */
|
|
8
|
+
export declare const DEFAULT_EXPORT: unique symbol;
|
|
9
|
+
/** The name a binding or an export is known by, either an exported class name or the default export. */
|
|
10
|
+
export type ExportName = string | typeof DEFAULT_EXPORT;
|
|
11
|
+
export interface SameWorkerBinding {
|
|
12
|
+
bindingName: string;
|
|
13
|
+
className: ExportName;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=bindings.d.ts.map
|
|
@@ -40,6 +40,10 @@ export interface SentryCloudflareVitePluginOptions {
|
|
|
40
40
|
* Durable Object class with `instrumentDurableObjectWithSentry`. Both
|
|
41
41
|
* `vite build` and `vite dev` are instrumented.
|
|
42
42
|
*
|
|
43
|
+
* The plugin also adds the bindings that resolve to the wrapped classes (this worker's own
|
|
44
|
+
* Durable Objects and self service bindings) to `rpcTracePropagationBindings`. Bindings to
|
|
45
|
+
* other workers stay opt-in, their receivers may not run Sentry.
|
|
46
|
+
*
|
|
43
47
|
* @default false
|
|
44
48
|
* @experimental May change or be removed in any release.
|
|
45
49
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import MagicString from 'magic-string';
|
|
2
|
+
import { SameWorkerBinding } from './bindings';
|
|
2
3
|
export interface BaseNode {
|
|
3
4
|
type: string;
|
|
4
5
|
start: number;
|
|
@@ -34,6 +35,8 @@ export interface TransformContext {
|
|
|
34
35
|
optionsFn: string;
|
|
35
36
|
/** Import statement prepended when `optionsFn` references a separate module. */
|
|
36
37
|
optionsImport?: string;
|
|
38
|
+
/** @see {@link import('./wranglerConfig').WranglerConfig.sameWorkerBindings} */
|
|
39
|
+
sameWorkerBindings?: readonly SameWorkerBinding[];
|
|
37
40
|
}
|
|
38
41
|
export interface TransformResult {
|
|
39
42
|
code: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DEFAULT_EXPORT, ExportName, SameWorkerBinding } from './bindings';
|
|
2
|
+
export { DEFAULT_EXPORT, ExportName, SameWorkerBinding };
|
|
1
3
|
/**
|
|
2
4
|
* The slice of the wrangler configuration the auto-instrument plugin cares
|
|
3
5
|
* about. `main` is an absolute path (wrangler resolves it against the config
|
|
@@ -20,6 +22,11 @@ export interface WranglerConfig {
|
|
|
20
22
|
* an export on a *different* worker, which this build can't wrap.
|
|
21
23
|
*/
|
|
22
24
|
workerEntrypoints: string[];
|
|
25
|
+
/**
|
|
26
|
+
* Bindings whose RPC receiver lives in this worker, so this build instruments it. Not deduped by
|
|
27
|
+
* class, two bindings may point at the same class and both names have to be listed.
|
|
28
|
+
*/
|
|
29
|
+
sameWorkerBindings: SameWorkerBinding[];
|
|
23
30
|
}
|
|
24
31
|
/**
|
|
25
32
|
* Locate and resolve the wrangler configuration via wrangler's own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/cloudflare",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.72.0",
|
|
4
4
|
"description": "Official Sentry SDK for Cloudflare Workers and Pages",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@opentelemetry/api": "^1.9.1",
|
|
73
|
-
"@sentry/core": "10.
|
|
74
|
-
"@sentry/server-utils": "10.
|
|
73
|
+
"@sentry/core": "10.72.0",
|
|
74
|
+
"@sentry/server-utils": "10.72.0",
|
|
75
75
|
"magic-string": "~0.30.21"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|