@sentry/node
Version:
Sentry Node SDK using OpenTelemetry for performance instrumentation
32 lines • 1.5 kB
TypeScript
import * as http from 'node:http';
import type { BaseTransportOptions, Transport } from '@sentry/core';
import type { HTTPModule } from './http-module';
export interface NodeTransportOptions extends BaseTransportOptions {
/**
* Set a proxy that should be used for outbound requests.
* Set to `false` to never use a proxy, even when `http_proxy` or `https_proxy` are set.
*/
proxy?: string | false;
/** HTTPS proxy CA certificates */
caCerts?: string | Buffer | Array<string | Buffer>;
/** Custom HTTP module. Defaults to the native 'http' and 'https' modules. */
httpModule?: HTTPModule;
/** Allow overriding connection keepAlive, defaults to true */
keepAlive?: boolean;
}
/**
* Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry.
*/
export declare function makeNodeTransport(options: NodeTransportOptions): Transport;
/**
* Returns the agent for requests to `url`: a proxy agent when a proxy applies, otherwise a plain keep-alive agent.
*
* Proxy prioritization: http => `options.proxy` | `process.env.http_proxy`
* Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy`
* Hosts listed in `process.env.no_proxy` are never proxied, and `options.proxy: false` disables proxying entirely.
*/
export declare function getHttpAgent(url: URL, options?: {
proxy?: string | false;
keepAlive?: boolean;
}): http.Agent;
//# sourceMappingURL=http.d.ts.map