diff --git a/packages/deno/src/index.ts b/packages/deno/src/index.ts index 58611921021d..f4bb4897d7e5 100644 --- a/packages/deno/src/index.ts +++ b/packages/deno/src/index.ts @@ -26,6 +26,7 @@ export type { DenoOptions } from './types'; export { addEventProcessor, addBreadcrumb, + addIntegration, captureException, captureEvent, captureMessage, @@ -52,6 +53,7 @@ export { setAttribute, setAttributes, setUser, + setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, @@ -69,6 +71,8 @@ export { startNewTrace, bindScopeToEmitter, suppressTracing, + withActiveSpan, + getSpanDescendants, // eslint-disable-next-line typescript/no-deprecated inboundFiltersIntegration, eventFiltersIntegration, @@ -79,6 +83,7 @@ export { dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, @@ -95,7 +100,17 @@ export { spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, + trpcMiddleware, + instrumentOpenAiClient, + instrumentAnthropicAiClient, + instrumentGoogleGenAIClient, + createLangChainCallbackHandler, + instrumentLangChainEmbeddings, + instrumentStateGraph, + instrumentCreateReactAgent, + createConsolaReporter, featureFlagsIntegration, + growthbookIntegration, metrics, withStreamedSpan, logger, @@ -103,6 +118,8 @@ export { spanStreamingIntegration, } from '@sentry/core'; +export { prismaIntegration } from '@sentry/server-utils'; + export { DenoClient } from './client'; export { getDefaultIntegrations, init } from './sdk'; diff --git a/packages/deno/test/exports.test.ts b/packages/deno/test/exports.test.ts new file mode 100644 index 000000000000..80aadc4a54d9 --- /dev/null +++ b/packages/deno/test/exports.test.ts @@ -0,0 +1,30 @@ +import { assertEquals } from 'https://deno.land/std@0.212.0/assert/assert_equals.ts'; +import * as Sentry from '../build/esm/index.js'; + +// Exports that Cloudflare ships and that need no Node APIs. +const EXPECTED_FUNCTION_EXPORTS = [ + // @sentry/core + 'addIntegration', + 'withActiveSpan', + 'getSpanDescendants', + 'setConversationId', + 'createConsolaReporter', + 'growthbookIntegration', + 'moduleMetadataIntegration', + // @sentry/core/server + 'trpcMiddleware', + 'prismaIntegration', + 'instrumentOpenAiClient', + 'instrumentAnthropicAiClient', + 'instrumentGoogleGenAIClient', + 'createLangChainCallbackHandler', + 'instrumentLangChainEmbeddings', + 'instrumentStateGraph', + 'instrumentCreateReactAgent', +]; + +for (const name of EXPECTED_FUNCTION_EXPORTS) { + Deno.test(`exports ${name}`, () => { + assertEquals(typeof (Sentry as Record)[name], 'function'); + }); +}