@sentry/cloudflare 10.50.0 → 10.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/build/cjs/durableobject.js +68 -130
  2. package/build/cjs/durableobject.js.map +1 -1
  3. package/build/cjs/index.js +3 -0
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/instrumentations/instrumentDurableObjectNamespace.js +14 -4
  6. package/build/cjs/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  7. package/build/cjs/instrumentations/instrumentWorkerEntrypoint.js +12 -1
  8. package/build/cjs/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  9. package/build/cjs/instrumentations/worker/instrumentEnv.js +23 -11
  10. package/build/cjs/instrumentations/worker/instrumentEnv.js.map +1 -1
  11. package/build/cjs/instrumentations/worker/instrumentQueue.js +2 -0
  12. package/build/cjs/instrumentations/worker/instrumentQueue.js.map +1 -1
  13. package/build/cjs/instrumentations/worker/instrumentQueueProducer.js +106 -0
  14. package/build/cjs/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
  15. package/build/cjs/integrations/httpServer.js +68 -0
  16. package/build/cjs/integrations/httpServer.js.map +1 -0
  17. package/build/cjs/request.js +5 -0
  18. package/build/cjs/request.js.map +1 -1
  19. package/build/cjs/sdk.js +2 -0
  20. package/build/cjs/sdk.js.map +1 -1
  21. package/build/cjs/utils/isBinding.js +9 -0
  22. package/build/cjs/utils/isBinding.js.map +1 -1
  23. package/build/cjs/utils/rpcMeta.js +60 -0
  24. package/build/cjs/utils/rpcMeta.js.map +1 -0
  25. package/build/cjs/utils/rpcOptions.js +1 -36
  26. package/build/cjs/utils/rpcOptions.js.map +1 -1
  27. package/build/cjs/wrapMethodWithSentry.js +21 -1
  28. package/build/cjs/wrapMethodWithSentry.js.map +1 -1
  29. package/build/esm/durableobject.js +70 -132
  30. package/build/esm/durableobject.js.map +1 -1
  31. package/build/esm/index.js +2 -1
  32. package/build/esm/index.js.map +1 -1
  33. package/build/esm/instrumentations/instrumentDurableObjectNamespace.js +14 -5
  34. package/build/esm/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  35. package/build/esm/instrumentations/instrumentWorkerEntrypoint.js +12 -1
  36. package/build/esm/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  37. package/build/esm/instrumentations/worker/instrumentEnv.js +25 -13
  38. package/build/esm/instrumentations/worker/instrumentEnv.js.map +1 -1
  39. package/build/esm/instrumentations/worker/instrumentQueue.js +2 -0
  40. package/build/esm/instrumentations/worker/instrumentQueue.js.map +1 -1
  41. package/build/esm/instrumentations/worker/instrumentQueueProducer.js +104 -0
  42. package/build/esm/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
  43. package/build/esm/integrations/httpServer.js +65 -0
  44. package/build/esm/integrations/httpServer.js.map +1 -0
  45. package/build/esm/package.json +1 -1
  46. package/build/esm/request.js +5 -0
  47. package/build/esm/request.js.map +1 -1
  48. package/build/esm/sdk.js +2 -0
  49. package/build/esm/sdk.js.map +1 -1
  50. package/build/esm/utils/isBinding.js +9 -1
  51. package/build/esm/utils/isBinding.js.map +1 -1
  52. package/build/esm/utils/rpcMeta.js +57 -0
  53. package/build/esm/utils/rpcMeta.js.map +1 -0
  54. package/build/esm/utils/rpcOptions.js +2 -36
  55. package/build/esm/utils/rpcOptions.js.map +1 -1
  56. package/build/esm/wrapMethodWithSentry.js +22 -2
  57. package/build/esm/wrapMethodWithSentry.js.map +1 -1
  58. package/build/types/durableobject.d.ts +2 -2
  59. package/build/types/durableobject.d.ts.map +1 -1
  60. package/build/types/index.d.ts +2 -1
  61. package/build/types/index.d.ts.map +1 -1
  62. package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts +1 -0
  63. package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts.map +1 -1
  64. package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
  65. package/build/types/instrumentations/worker/instrumentEnv.d.ts +3 -2
  66. package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
  67. package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
  68. package/build/types/instrumentations/worker/instrumentQueueProducer.d.ts +10 -0
  69. package/build/types/instrumentations/worker/instrumentQueueProducer.d.ts.map +1 -0
  70. package/build/types/integrations/httpServer.d.ts +61 -0
  71. package/build/types/integrations/httpServer.d.ts.map +1 -0
  72. package/build/types/request.d.ts.map +1 -1
  73. package/build/types/sdk.d.ts.map +1 -1
  74. package/build/types/utils/isBinding.d.ts +6 -1
  75. package/build/types/utils/isBinding.d.ts.map +1 -1
  76. package/build/types/utils/rpcMeta.d.ts +15 -0
  77. package/build/types/utils/rpcMeta.d.ts.map +1 -0
  78. package/build/types/utils/rpcOptions.d.ts +1 -12
  79. package/build/types/utils/rpcOptions.d.ts.map +1 -1
  80. package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
  81. package/build/types-ts3.8/durableobject.d.ts +2 -2
  82. package/build/types-ts3.8/index.d.ts +2 -1
  83. package/build/types-ts3.8/instrumentations/instrumentDurableObjectNamespace.d.ts +1 -0
  84. package/build/types-ts3.8/instrumentations/worker/instrumentEnv.d.ts +3 -2
  85. package/build/types-ts3.8/instrumentations/worker/instrumentQueueProducer.d.ts +10 -0
  86. package/build/types-ts3.8/integrations/httpServer.d.ts +61 -0
  87. package/build/types-ts3.8/utils/isBinding.d.ts +6 -1
  88. package/build/types-ts3.8/utils/rpcMeta.d.ts +15 -0
  89. package/build/types-ts3.8/utils/rpcOptions.d.ts +1 -12
  90. package/package.json +2 -2
@@ -1,12 +1,13 @@
1
1
  export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, FeatureFlagsIntegration, Session, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, Metric, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
2
2
  export type { CloudflareOptions } from './client';
3
- export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, inboundFiltersIntegration, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentAnthropicAiClient, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, createLangChainCallbackHandler, instrumentLangChainEmbeddings, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStreamedSpan, spanStreamingIntegration, instrumentLangGraph, } from '@sentry/core';
3
+ export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, inboundFiltersIntegration, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentAnthropicAiClient, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, createLangChainCallbackHandler, instrumentLangChainEmbeddings, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStreamedSpan, spanStreamingIntegration, instrumentLangGraph, instrumentCreateReactAgent, } from '@sentry/core';
4
4
  export { withSentry } from './withSentry';
5
5
  export { instrumentDurableObjectWithSentry } from './durableobject';
6
6
  export { sentryPagesPlugin } from './pages-plugin';
7
7
  export { wrapRequestHandler } from './request';
8
8
  export { CloudflareClient } from './client';
9
9
  export { getDefaultIntegrations } from './sdk';
10
+ export { httpServerIntegration } from './integrations/httpServer';
10
11
  export { fetchIntegration } from './integrations/fetch';
11
12
  export { vercelAIIntegration } from './integrations/tracing/vercelai';
12
13
  export { honoIntegration } from './integrations/hono';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,OAAO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AE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,SAAS,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { DurableObjectNamespace } from '@cloudflare/workers-types';
2
+ export declare const STUB_NON_RPC_METHODS: Set<string>;
2
3
  /**
3
4
  * Instruments a DurableObjectNamespace binding to create spans for DO interactions.
4
5
  *
@@ -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;AAG3F;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,sBAAsB,GAAG,sBAAsB,CAoB1G"}
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;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,sBAAsB,GAAG,sBAAsB,CAoB1G"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAQnD,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,aAAa,EAAE,KAAK,GAAG,EAAE,IAAI,KAChF,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,OAAO,aAAa,KACtB,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,2BAA2B,EAC9E,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,EAC7E,qBAAqB,EAAE,CAAC,GACvB,CAAC,CA+CH"}
1
+ {"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AASnD,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,aAAa,EAAE,KAAK,GAAG,EAAE,IAAI,KAChF,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,OAAO,aAAa,KACtB,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,2BAA2B,EAC9E,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,EAC7E,qBAAqB,EAAE,CAAC,GACvB,CAAC,CAyDH"}
@@ -5,9 +5,10 @@ import type { CloudflareOptions } from '../../client';
5
5
  *
6
6
  * Currently detects:
7
7
  * - DurableObjectNamespace (via `idFromName` duck-typing)
8
- * - Service bindings / JSRPC proxies (wraps `fetch` for trace propagation)
8
+ * - Service bindings / JSRPC proxies
9
+ * - Queue producers (via `send` + `sendBatch` duck-typing)
9
10
  *
10
- * Extensible for future binding types (KV, D1, Queue, etc.).
11
+ * Extensible for future binding types (KV, D1, etc.).
11
12
  *
12
13
  * @param env - The Cloudflare env object to instrument
13
14
  * @param options - Optional CloudflareOptions to control RPC trace propagation
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAYtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAqD7G"}
1
+ {"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AActD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,CA8D7G"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentQueue.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AASjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAuDtD;;GAEG;AAEH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACrF,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,gBAAgB,EACxE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
1
+ {"version":3,"file":"instrumentQueue.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAgB,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AASjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAyDtD;;GAEG;AAEH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EACrF,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,gBAAgB,EACxE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
@@ -0,0 +1,10 @@
1
+ import type { Queue } from '@cloudflare/workers-types';
2
+ /**
3
+ * Wraps a Queue producer binding to create `queue.publish` spans on
4
+ * `send` and `sendBatch` calls.
5
+ *
6
+ * The queue's own name is not available on the binding object, so we use
7
+ * the env binding key (e.g. `MY_QUEUE`) as `messaging.destination.name`.
8
+ */
9
+ export declare function instrumentQueueProducer<T extends Queue>(queue: T, bindingName: string): T;
10
+ //# sourceMappingURL=instrumentQueueProducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentQueueProducer.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueueProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,KAAK,EAA2C,MAAM,2BAA2B,CAAC;AA0DpH;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAsCzF"}
@@ -0,0 +1,61 @@
1
+ import type { Client, MaxRequestBodySize } from '@sentry/core';
2
+ export interface HttpServerIntegrationOptions {
3
+ /**
4
+ * Controls the maximum size of incoming request bodies attached to events.
5
+ *
6
+ * Only applies to requests with textual content types (text/*, application/json,
7
+ * application/x-www-form-urlencoded, application/xml, application/graphql).
8
+ * Binary data is not captured.
9
+ *
10
+ * Available options:
11
+ * - `'none'`: No request bodies will be attached
12
+ * - `'small'`: Request bodies up to 1,000 bytes will be attached
13
+ * - `'medium'`: Request bodies up to 10,000 bytes will be attached (default)
14
+ * - `'always'`: Request bodies will always be attached (up to 1MB limit)
15
+ *
16
+ * @default 'medium'
17
+ */
18
+ maxRequestBodySize?: MaxRequestBodySize;
19
+ /**
20
+ * Do not capture the request body for incoming HTTP requests to URLs where the given callback returns `true`.
21
+ * This can be useful for long running requests where the body is not needed, health check endpoints,
22
+ * or requests containing sensitive data that should not be captured.
23
+ *
24
+ * @param url The full URL of the incoming request, including query string, protocol, host, etc.
25
+ * @param request The incoming Request object.
26
+ * @returns `true` to skip body capture for this request, `false` to capture normally.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * Sentry.httpServerIntegration({
31
+ * ignoreRequestBody: (url) => url.includes('/health') || url.includes('/upload'),
32
+ * })
33
+ * ```
34
+ */
35
+ ignoreRequestBody?: (url: string, request: Request) => boolean;
36
+ }
37
+ /**
38
+ * Configures incoming HTTP request handling for Cloudflare Workers.
39
+ *
40
+ * This integration controls how incoming HTTP request data is captured,
41
+ * matching the API of `httpServerIntegration` in Node.js.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * Sentry.init({
46
+ * integrations: [
47
+ * Sentry.httpServerIntegration({
48
+ * maxRequestBodySize: 'medium',
49
+ * ignoreRequestBody: (url) => url.includes('/health'),
50
+ * }),
51
+ * ],
52
+ * });
53
+ * ```
54
+ */
55
+ export declare const httpServerIntegration: (options?: HttpServerIntegrationOptions | undefined) => import("@sentry/core").Integration;
56
+ /**
57
+ * Capture the request body based on the HttpServer integration config.
58
+ * Called internally by `wrapRequestHandler`.
59
+ */
60
+ export declare function captureIncomingRequestBody(client: Client, request: Request): Promise<void>;
61
+ //# sourceMappingURL=httpServer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpServer.d.ts","sourceRoot":"","sources":["../../../src/integrations/httpServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAiB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAK9E,MAAM,WAAW,4BAA4B;IAC3C;;;;;;;;;;;;;;OAcG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CAChE;AAgBD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB,4FAA4C,CAAC;AAE/E;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBhG"}
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAc7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAMlD,UAAU,4BAA4B;IACpC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACxF,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACtC;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CA4InB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAe7G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAMlD,UAAU,4BAA4B;IACpC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACxF,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACtC;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAgJnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAchD,OAAO,KAAK,EAA2B,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQ5C,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAkBhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAiC7E"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAchD,OAAO,KAAK,EAA2B,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAS5C,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAmBhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAiC7E"}
@@ -30,7 +30,7 @@
30
30
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
31
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
32
  */
33
- import type { DurableObjectNamespace } from '@cloudflare/workers-types';
33
+ import type { DurableObjectNamespace, Queue } from '@cloudflare/workers-types';
34
34
  /**
35
35
  * Checks if a value is a JSRPC proxy (service binding).
36
36
  *
@@ -46,4 +46,9 @@ export declare function isJSRPC(item: unknown): item is Service;
46
46
  * DurableObjectNamespace has `idFromName`, `idFromString`, `get`, `newUniqueId`.
47
47
  */
48
48
  export declare function isDurableObjectNamespace(item: unknown): item is DurableObjectNamespace;
49
+ /**
50
+ * Duck-type check for Queue producer bindings.
51
+ * Queue has `send` and `sendBatch` async methods.
52
+ */
53
+ export declare function isQueue(item: unknown): item is Queue;
49
54
  //# sourceMappingURL=isBinding.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isBinding.d.ts","sourceRoot":"","sources":["../../../src/utils/isBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,CAMtD;AAID;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,sBAAsB,CAEtF"}
1
+ {"version":3,"file":"isBinding.d.ts","sourceRoot":"","sources":["../../../src/utils/isBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAE/E;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,CAMtD;AAID;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,sBAAsB,CAEtF;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,KAAK,CAEpD"}
@@ -0,0 +1,15 @@
1
+ import { type SerializedTraceData } from '@sentry/core';
2
+ /**
3
+ * Appends Sentry RPC metadata to an args array for trace propagation.
4
+ * If no active trace exists, returns the original args unchanged.
5
+ */
6
+ export declare function appendRpcMeta(args: unknown[]): unknown[];
7
+ /**
8
+ * Extracts Sentry RPC metadata from the trailing argument of an args array.
9
+ * Returns cleaned args (without meta) and the extracted trace data if found.
10
+ */
11
+ export declare function extractRpcMeta<T extends unknown[]>(args: T): {
12
+ args: T;
13
+ rpcMeta?: SerializedTraceData;
14
+ };
15
+ //# sourceMappingURL=rpcMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpcMeta.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAqBtE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAQxD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAAE,EAChD,IAAI,EAAE,CAAC,GACN;IACD,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,CAAC,EAAE,mBAAmB,CAAC;CAC/B,CAcA"}
@@ -4,21 +4,10 @@ import type { CloudflareOptions } from '../client';
4
4
  *
5
5
  * Priority:
6
6
  * 1. If `enableRpcTracePropagation` is set, use it (ignore `instrumentPrototypeMethods`)
7
- * 2. If only `instrumentPrototypeMethods` is set, use it with deprecation warning (converted to boolean)
7
+ * 2. If only `instrumentPrototypeMethods` is set, use it with deprecation warning
8
8
  * 3. If neither is set, return `false`
9
9
  *
10
10
  * @returns The effective setting for RPC trace propagation
11
11
  */
12
12
  export declare function getEffectiveRpcPropagation(options: CloudflareOptions): boolean;
13
- /**
14
- * Gets the method filter for prototype method instrumentation.
15
- *
16
- * Returns:
17
- * - `null` if no instrumentation should occur
18
- * - `true` if all methods should be instrumented
19
- * - `string[]` if only specific methods should be instrumented (deprecated behavior)
20
- *
21
- * @returns The method filter or null if no instrumentation
22
- */
23
- export declare function getPrototypeMethodFilter(options: CloudflareOptions): boolean | string[];
24
13
  //# sourceMappingURL=rpcOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rpcOptions.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGnD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CA8B9E;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,GAAG,MAAM,EAAE,CAsBvF"}
1
+ {"version":3,"file":"rpcOptions.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGnD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CA8B9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"wrapMethodWithSentry.d.ts","sourceRoot":"","sources":["../../src/wrapMethodWithSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAatE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAMlD,oFAAoF;AACpF,UAAU,8BAA+B,SAAQ,kBAAkB;IACjE,eAAe,CAAC,EAAE,oBAAoB,CAAC;CACxC;AAED,KAAK,oBAAoB,GAAG;IAC1B,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D,KAAK,cAAc,GAAG,eAAe,CAAC;AAEtC;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,cAAc,EAC3D,cAAc,EAAE,oBAAoB,EACpC,OAAO,EAAE,CAAC,EACV,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,MAAM,CAAC,EAAE,IAAI,GACZ,CAAC,CAyLH"}
@@ -3,14 +3,14 @@ import { CloudflareOptions } from './client';
3
3
  /**
4
4
  * Instruments a Durable Object class to capture errors and performance data.
5
5
  *
6
- * Instruments the following methods:
6
+ * Instruments the following methods by default:
7
7
  * - fetch
8
8
  * - alarm
9
9
  * - webSocketMessage
10
10
  * - webSocketClose
11
11
  * - webSocketError
12
12
  *
13
- * as well as any other public RPC methods on the Durable Object instance.
13
+ * To instrument RPC methods (prototype methods), enable the `enableRpcTracePropagation` option.
14
14
  *
15
15
  * @param optionsCallback Function that returns the options for the SDK initialization.
16
16
  * @param DurableObjectClass The Durable Object class to instrument.
@@ -1,12 +1,13 @@
1
1
  export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, FeatureFlagsIntegration, Session, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, Metric, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
2
2
  export { CloudflareOptions } from './client';
3
- export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, inboundFiltersIntegration, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentAnthropicAiClient, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, createLangChainCallbackHandler, instrumentLangChainEmbeddings, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStreamedSpan, spanStreamingIntegration, instrumentLangGraph, } from '@sentry/core';
3
+ export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, inboundFiltersIntegration, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentAnthropicAiClient, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, createLangChainCallbackHandler, instrumentLangChainEmbeddings, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStreamedSpan, spanStreamingIntegration, instrumentLangGraph, instrumentCreateReactAgent, } from '@sentry/core';
4
4
  export { withSentry } from './withSentry';
5
5
  export { instrumentDurableObjectWithSentry } from './durableobject';
6
6
  export { sentryPagesPlugin } from './pages-plugin';
7
7
  export { wrapRequestHandler } from './request';
8
8
  export { CloudflareClient } from './client';
9
9
  export { getDefaultIntegrations } from './sdk';
10
+ export { httpServerIntegration } from './integrations/httpServer';
10
11
  export { fetchIntegration } from './integrations/fetch';
11
12
  export { vercelAIIntegration } from './integrations/tracing/vercelai';
12
13
  export { honoIntegration } from './integrations/hono';
@@ -1,4 +1,5 @@
1
1
  import { DurableObjectNamespace } from '@cloudflare/workers-types';
2
+ export declare const STUB_NON_RPC_METHODS: Set<string>;
2
3
  /**
3
4
  * Instruments a DurableObjectNamespace binding to create spans for DO interactions.
4
5
  *
@@ -5,9 +5,10 @@ import { CloudflareOptions } from '../../client';
5
5
  *
6
6
  * Currently detects:
7
7
  * - DurableObjectNamespace (via `idFromName` duck-typing)
8
- * - Service bindings / JSRPC proxies (wraps `fetch` for trace propagation)
8
+ * - Service bindings / JSRPC proxies
9
+ * - Queue producers (via `send` + `sendBatch` duck-typing)
9
10
  *
10
- * Extensible for future binding types (KV, D1, Queue, etc.).
11
+ * Extensible for future binding types (KV, D1, etc.).
11
12
  *
12
13
  * @param env - The Cloudflare env object to instrument
13
14
  * @param options - Optional CloudflareOptions to control RPC trace propagation
@@ -0,0 +1,10 @@
1
+ import { Queue } from '@cloudflare/workers-types';
2
+ /**
3
+ * Wraps a Queue producer binding to create `queue.publish` spans on
4
+ * `send` and `sendBatch` calls.
5
+ *
6
+ * The queue's own name is not available on the binding object, so we use
7
+ * the env binding key (e.g. `MY_QUEUE`) as `messaging.destination.name`.
8
+ */
9
+ export declare function instrumentQueueProducer<T extends Queue>(queue: T, bindingName: string): T;
10
+ //# sourceMappingURL=instrumentQueueProducer.d.ts.map
@@ -0,0 +1,61 @@
1
+ import { Client, MaxRequestBodySize } from '@sentry/core';
2
+ export interface HttpServerIntegrationOptions {
3
+ /**
4
+ * Controls the maximum size of incoming request bodies attached to events.
5
+ *
6
+ * Only applies to requests with textual content types (text/*, application/json,
7
+ * application/x-www-form-urlencoded, application/xml, application/graphql).
8
+ * Binary data is not captured.
9
+ *
10
+ * Available options:
11
+ * - `'none'`: No request bodies will be attached
12
+ * - `'small'`: Request bodies up to 1,000 bytes will be attached
13
+ * - `'medium'`: Request bodies up to 10,000 bytes will be attached (default)
14
+ * - `'always'`: Request bodies will always be attached (up to 1MB limit)
15
+ *
16
+ * @default 'medium'
17
+ */
18
+ maxRequestBodySize?: MaxRequestBodySize;
19
+ /**
20
+ * Do not capture the request body for incoming HTTP requests to URLs where the given callback returns `true`.
21
+ * This can be useful for long running requests where the body is not needed, health check endpoints,
22
+ * or requests containing sensitive data that should not be captured.
23
+ *
24
+ * @param url The full URL of the incoming request, including query string, protocol, host, etc.
25
+ * @param request The incoming Request object.
26
+ * @returns `true` to skip body capture for this request, `false` to capture normally.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * Sentry.httpServerIntegration({
31
+ * ignoreRequestBody: (url) => url.includes('/health') || url.includes('/upload'),
32
+ * })
33
+ * ```
34
+ */
35
+ ignoreRequestBody?: (url: string, request: Request) => boolean;
36
+ }
37
+ /**
38
+ * Configures incoming HTTP request handling for Cloudflare Workers.
39
+ *
40
+ * This integration controls how incoming HTTP request data is captured,
41
+ * matching the API of `httpServerIntegration` in Node.js.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * Sentry.init({
46
+ * integrations: [
47
+ * Sentry.httpServerIntegration({
48
+ * maxRequestBodySize: 'medium',
49
+ * ignoreRequestBody: (url) => url.includes('/health'),
50
+ * }),
51
+ * ],
52
+ * });
53
+ * ```
54
+ */
55
+ export declare const httpServerIntegration: (options?: HttpServerIntegrationOptions | undefined) => import("@sentry/core").Integration;
56
+ /**
57
+ * Capture the request body based on the HttpServer integration config.
58
+ * Called internally by `wrapRequestHandler`.
59
+ */
60
+ export declare function captureIncomingRequestBody(client: Client, request: Request): Promise<void>;
61
+ //# sourceMappingURL=httpServer.d.ts.map
@@ -30,7 +30,7 @@
30
30
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31
31
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
32
  */
33
- import { DurableObjectNamespace } from '@cloudflare/workers-types';
33
+ import { DurableObjectNamespace, Queue } from '@cloudflare/workers-types';
34
34
  /**
35
35
  * Checks if a value is a JSRPC proxy (service binding).
36
36
  *
@@ -46,4 +46,9 @@ export declare function isJSRPC(item: unknown): item is Service;
46
46
  * DurableObjectNamespace has `idFromName`, `idFromString`, `get`, `newUniqueId`.
47
47
  */
48
48
  export declare function isDurableObjectNamespace(item: unknown): item is DurableObjectNamespace;
49
+ /**
50
+ * Duck-type check for Queue producer bindings.
51
+ * Queue has `send` and `sendBatch` async methods.
52
+ */
53
+ export declare function isQueue(item: unknown): item is Queue;
49
54
  //# sourceMappingURL=isBinding.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { SerializedTraceData } from '@sentry/core';
2
+ /**
3
+ * Appends Sentry RPC metadata to an args array for trace propagation.
4
+ * If no active trace exists, returns the original args unchanged.
5
+ */
6
+ export declare function appendRpcMeta(args: unknown[]): unknown[];
7
+ /**
8
+ * Extracts Sentry RPC metadata from the trailing argument of an args array.
9
+ * Returns cleaned args (without meta) and the extracted trace data if found.
10
+ */
11
+ export declare function extractRpcMeta<T extends unknown[]>(args: T): {
12
+ args: T;
13
+ rpcMeta?: SerializedTraceData;
14
+ };
15
+ //# sourceMappingURL=rpcMeta.d.ts.map
@@ -4,21 +4,10 @@ import { CloudflareOptions } from '../client';
4
4
  *
5
5
  * Priority:
6
6
  * 1. If `enableRpcTracePropagation` is set, use it (ignore `instrumentPrototypeMethods`)
7
- * 2. If only `instrumentPrototypeMethods` is set, use it with deprecation warning (converted to boolean)
7
+ * 2. If only `instrumentPrototypeMethods` is set, use it with deprecation warning
8
8
  * 3. If neither is set, return `false`
9
9
  *
10
10
  * @returns The effective setting for RPC trace propagation
11
11
  */
12
12
  export declare function getEffectiveRpcPropagation(options: CloudflareOptions): boolean;
13
- /**
14
- * Gets the method filter for prototype method instrumentation.
15
- *
16
- * Returns:
17
- * - `null` if no instrumentation should occur
18
- * - `true` if all methods should be instrumented
19
- * - `string[]` if only specific methods should be instrumented (deprecated behavior)
20
- *
21
- * @returns The method filter or null if no instrumentation
22
- */
23
- export declare function getPrototypeMethodFilter(options: CloudflareOptions): boolean | string[];
24
13
  //# sourceMappingURL=rpcOptions.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/cloudflare",
3
- "version": "10.50.0",
3
+ "version": "10.52.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",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@opentelemetry/api": "^1.9.1",
53
- "@sentry/core": "10.50.0"
53
+ "@sentry/core": "10.52.0"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@cloudflare/workers-types": "^4.x"