hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
48 lines • 1.65 kB
TypeScript
import type { Transport } from "@sentry/core";
interface GlobalCustomSentryReporterOptions {
/**
* Sentry's DSN
*/
dsn: string;
/**
* The environment used to report the events
*/
environment: string;
/**
* The release of Hardhat
*/
release: string;
/**
* A transport that customizes how we send envelopes to Sentry's server.
*
* See the transport module for the different options.
*/
transport: Transport;
/**
* If `true`, the global unhandled rejection and uncaught exception handlers
* will be installed.
*/
installGlobalHandlers?: boolean;
}
/**
* This function initializes a custom global sentry reporter/client.
*
* There are two reasons why we customize it, instead of using the default one
* provided by @sentry/node:
* - @sentry/node has an astronomical amount of dependencies -- See https://github.com/getsentry/sentry-javascript/discussions/13846
* - We customize the transport to avoid blocking the main Hardhat process
* while reporting errors.
*
* Once you initialize the custom global sentry reporter, you can use the usual
* `captureException` and `captureMessage` functions exposed by @sentry/core.
*
* The reason that this uses the global instance of sentry (by calling
* initAndBind), is that using the client directly doesn't work with the linked
* errors integration.
*
* Calling `init` also has an option to set global unhandled rejection and
* uncaught exception handlers.
*/
export declare function init(options: GlobalCustomSentryReporterOptions): void;
export {};
//# sourceMappingURL=init.d.ts.map