@sentry/node
Version:
Sentry Node SDK using OpenTelemetry for performance instrumentation
35 lines • 1.33 kB
TypeScript
/**
* Lets every `node:http` server answer managed tunnel requests before the app sees them. Nothing is answered until the
* tunnel is on. For framework SDKs that enable the tunnel after `init`, like TanStack Start's `tunnelRoute`.
*/
export declare function installTunnelHooks(): void;
/**
* Lets your server forward the events of a browser SDK set up with `tunnel: true` to Sentry.
*
* With this integration on the server and `tunnel: true` in the browser `init`, the browser sends its events to your
* own server instead of Sentry, where ad-blockers can't drop them, and your server forwards them to Sentry.
*
* Every `node:http` server answers the tunnel requests before the app sees them. To serve them from your own code
* instead, set `intercept: false` and call `handleTunnelRequestIfMatched`.
*
* By default only envelopes for the server's own DSN are forwarded.
*
* @example
* ```js
* // Server
* Sentry.init({
* dsn: '__DSN__',
* integrations: [Sentry.serveTunnelIntegration()],
* });
*
* // Browser
* Sentry.init({
* dsn: '__DSN__',
* tunnel: true,
* });
* ```
*/
export declare const serveTunnelIntegration: (options?: import("@sentry/core").ServerTunnelOptions | undefined) => import("@sentry/core").Integration & {
name: string;
};
//# sourceMappingURL=serveTunnel.d.ts.map