diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 6657b3030cb1..d1635cdada54 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -92,11 +92,35 @@ export { setupHapiErrorHandler, spotlightIntegration, addOpenTelemetryInstrumentation, + metrics, + NodeClient, + addIntegration, + anrIntegration, + captureConsoleIntegration, + captureSession, + connectIntegration, + createGetModuleFromFilename, + debugIntegration, + dedupeIntegration, + endSession, + extraErrorDataIntegration, + getAutoPerformanceIntegrations, + httpIntegration, + initOpenTelemetry, + koaIntegration, + nativeNodeFetchIntegration, + rewriteFramesIntegration, + sessionTimingIntegration, + setupConnectErrorHandler, + setupKoaErrorHandler, + spanToBaggageHeader, + spanToJSON, + spanToTraceHeader, + startSession, + trpcMiddleware, + zodErrorsIntegration, } from '@sentry/node'; -// We can still leave this for the carrier init and type exports -export * from '@sentry/node'; - export { init } from './server/sdk'; export default sentryAstro; diff --git a/packages/astro/src/index.types.ts b/packages/astro/src/index.types.ts index e5fe8fd965b4..2227679dff21 100644 --- a/packages/astro/src/index.types.ts +++ b/packages/astro/src/index.types.ts @@ -3,6 +3,9 @@ // exports in this file - which we do below. export * from './index.client'; export * from './index.server'; +export * from '@sentry/node'; + +import type { NodeOptions } from '@sentry/node'; import type { Integration, Options, StackParser } from '@sentry/types'; @@ -11,7 +14,7 @@ import type * as serverSdk from './index.server'; import sentryAstro from './index.server'; /** Initializes Sentry Astro SDK */ -export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): void; +export declare function init(options: Options | clientSdk.BrowserOptions | NodeOptions): void; export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration; export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration; @@ -29,5 +32,5 @@ export declare const continueTrace: typeof clientSdk.continueTrace; export declare const Span: clientSdk.Span; -export declare const metrics: typeof clientSdk.metrics & typeof serverSdk.metrics; +export declare const metrics: typeof clientSdk.metrics & typeof serverSdk; export default sentryAstro; diff --git a/packages/astro/src/server/sdk.ts b/packages/astro/src/server/sdk.ts index c2398c7d019f..503557d6d7cd 100644 --- a/packages/astro/src/server/sdk.ts +++ b/packages/astro/src/server/sdk.ts @@ -10,6 +10,7 @@ export function init(options: NodeOptions): void { const opts = { ...options, }; + applySdkMetadata(opts, 'astro', ['astro', 'node']); initNodeSdk(opts);