Interface: LoggerSentryConfigInterface
Interface for Sentry configuration to define the log level mapping to be used on Sentry transport.
Extends
NodeOptions
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
_experiments? | object | Options which are in beta, or otherwise not guaranteed to be stable. | SentryNodeOptions._experiments |
_metadata? | SdkMetadata | Set of metadata about the SDK that can be internally used to enhance envelopes and events, and provide additional data about every request. | SentryNodeOptions._metadata |
attachStacktrace? | boolean | Attaches stacktraces to pure capture message / log integrations | SentryNodeOptions.attachStacktrace |
autoSessionTracking? | boolean | A flag enabling Sessions Tracking feature. By default, Sessions Tracking is enabled. | SentryNodeOptions.autoSessionTracking |
beforeBreadcrumb? | (breadcrumb : Breadcrumb , hint ?: BreadcrumbHint ) => null | Breadcrumb | A callback invoked when adding a breadcrumb, allowing to optionally modify it before adding it to future events. Note that you must return a valid breadcrumb from this callback. If you do not wish to modify the breadcrumb, simply return it at the end. Returning null will cause the breadcrumb to be dropped. | SentryNodeOptions.beforeBreadcrumb |
beforeSend? | (event : Event , hint ?: EventHint ) => null | Event | PromiseLike <null | Event > | A callback invoked during event submission, allowing to optionally modify the event before it is sent to Sentry. Note that you must return a valid event from this callback. If you do not wish to modify the event, simply return it at the end. Returning null will cause the event to be dropped. | SentryNodeOptions.beforeSend |
caCerts? | string | HTTPS proxy certificates path | SentryNodeOptions.caCerts |
debug? | boolean | Enable debug functionality in the SDK itself | SentryNodeOptions.debug |
defaultIntegrations? | false | Integration [] | If this is set to false, default integrations will not be added, otherwise this will internally be set to the recommended default integrations. TODO: We should consider changing this to `boolean | Integration[]` |
dist? | string | Sets the distribution for all events | SentryNodeOptions.dist |
dsn? | string | The Dsn used to connect to Sentry and identify the project. If omitted, the SDK will not send any data to Sentry. | SentryNodeOptions.dsn |
enabled? | boolean | Specifies whether this SDK should send events to Sentry. Defaults to true. | SentryNodeOptions.enabled |
environment? | string | The current environment of your application (e.g. "production"). | SentryNodeOptions.environment |
frameContextLines? | number | Sets the number of context lines for each frame when loading a file. Deprecated Context lines configuration has moved to the ContextLines integration, and can be used like this: init({ dsn: '__DSN__', integrations: [new ContextLines({ frameContextLines: 10 })] }) | SentryNodeOptions.frameContextLines |
httpProxy? | string | Set a HTTP proxy that should be used for outbound requests. | SentryNodeOptions.httpProxy |
httpsProxy? | string | Set a HTTPS proxy that should be used for outbound requests. | SentryNodeOptions.httpsProxy |
ignoreErrors? | (string | RegExp )[] | A pattern for error messages which should not be sent to Sentry. By default, all errors will be sent. | SentryNodeOptions.ignoreErrors |
initialScope? | CaptureContext | Initial data to populate scope. | SentryNodeOptions.initialScope |
integrations? | Integration [] | (integrations ) => Integration [] | List of integrations that should be installed after SDK was initialized. Accepts either a list of integrations or a function that receives default integrations and returns a new, updated list. | SentryNodeOptions.integrations |
logLevelMap | (logLevel : LogLevel ) => Severity | Method to map the log level from the config with sentry log levels | - |
maxBreadcrumbs? | number | The maximum number of breadcrumbs sent with events. Defaults to 100. Values over 100 will be ignored and 100 used instead. | SentryNodeOptions.maxBreadcrumbs |
maxValueLength? | number | Maximum number of chars a single value can have before it will be truncated. | SentryNodeOptions.maxValueLength |
normalizeDepth? | number | Maximum number of levels that normalization algorithm will traverse in objects and arrays. Used when normalizing an event before sending, on all of the listed attributes: - breadcrumbs.data - user - contexts - extra Defaults to 3 . Set to 0 to disable. | SentryNodeOptions.normalizeDepth |
normalizeMaxBreadth? | number | Maximum number of properties or elements that the normalization algorithm will output in any single array or object included in the normalized event. Used when normalizing an event before sending, on all of the listed attributes: - breadcrumbs.data - user - contexts - extra Defaults to 1000 | SentryNodeOptions.normalizeMaxBreadth |
release? | string | The release identifier used when uploading respective source maps. Specify this value to allow Sentry to resolve the correct source maps when processing events. | SentryNodeOptions.release |
sampleRate? | number | A global sample rate to apply to all events (0 - 1). | SentryNodeOptions.sampleRate |
sendClientReports? | boolean | Send SDK Client Reports. By default, Client Reports are enabled. | SentryNodeOptions.sendClientReports |
serverName? | string | Sets an optional server name (device name) | SentryNodeOptions.serverName |
shutdownTimeout? | number | Maximum time in milliseconds to wait to drain the request queue, before the process is allowed to exit. | SentryNodeOptions.shutdownTimeout |
tracesSampleRate? | number | Sample rate to determine trace sampling. 0.0 = 0% chance of a given trace being sent (send no traces) 1.0 = 100% chance of a given trace being sent (send all traces) Tracing is enabled if either this or tracesSampler is defined. If both are defined, tracesSampleRate is ignored. | SentryNodeOptions.tracesSampleRate |
tracesSampler? | (samplingContext : SamplingContext ) => number | boolean | Function to compute tracing sample rate dynamically and filter unwanted traces. Tracing is enabled if either this or tracesSampleRate is defined. If both are defined, tracesSampleRate is ignored. Will automatically be passed a context object of default and optional custom data. See Transaction.samplingContext and Hub.startTransaction. | SentryNodeOptions.tracesSampler |
transport? | TransportClass <Transport > | Transport object that should be used to send events to Sentry | SentryNodeOptions.transport |
transportOptions? | TransportOptions | Options for the default transport that the SDK uses. | SentryNodeOptions.transportOptions |
tunnel? | string | A URL to an envelope tunnel endpoint. An envelope tunnel is an HTTP endpoint that accepts Sentry envelopes for forwarding. This can be used to force data through a custom server independent of the type of data. | SentryNodeOptions.tunnel |
Methods
onFatalError()?
optional
onFatalError(error
):void
Callback that is executed when a fatal global error occurs.
Parameters
Parameter | Type |
---|---|
error | Error |
Returns
void
Inherited from
SentryNodeOptions.onFatalError
Defined in
node_modules/@sentry/node/types/types.d.ts:32