API Reference
Rockets Core API
nestjs-logger
interfaces
LoggerSentryConfigInterface

Interface: LoggerSentryConfigInterface

Interface for Sentry configuration to define the log level mapping to be used on Sentry transport.

Extends

  • NodeOptions

Properties

PropertyTypeDescriptionInherited from
_experiments?objectOptions which are in beta, or otherwise not guaranteed to be stable.SentryNodeOptions._experiments
_metadata?SdkMetadataSet 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?booleanAttaches stacktraces to pure capture message / log integrationsSentryNodeOptions.attachStacktrace
autoSessionTracking?booleanA flag enabling Sessions Tracking feature. By default, Sessions Tracking is enabled.SentryNodeOptions.autoSessionTracking
beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => null | BreadcrumbA 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?stringHTTPS proxy certificates pathSentryNodeOptions.caCerts
debug?booleanEnable debug functionality in the SDK itselfSentryNodeOptions.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 `booleanIntegration[]`
dist?stringSets the distribution for all eventsSentryNodeOptions.dist
dsn?stringThe Dsn used to connect to Sentry and identify the project. If omitted, the SDK will not send any data to Sentry.SentryNodeOptions.dsn
enabled?booleanSpecifies whether this SDK should send events to Sentry. Defaults to true.SentryNodeOptions.enabled
environment?stringThe current environment of your application (e.g. "production").SentryNodeOptions.environment
frameContextLines?numberSets 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?stringSet a HTTP proxy that should be used for outbound requests.SentryNodeOptions.httpProxy
httpsProxy?stringSet 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?CaptureContextInitial 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) => SeverityMethod to map the log level from the config with sentry log levels-
maxBreadcrumbs?numberThe maximum number of breadcrumbs sent with events. Defaults to 100. Values over 100 will be ignored and 100 used instead.SentryNodeOptions.maxBreadcrumbs
maxValueLength?numberMaximum number of chars a single value can have before it will be truncated.SentryNodeOptions.maxValueLength
normalizeDepth?numberMaximum 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?numberMaximum 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 1000SentryNodeOptions.normalizeMaxBreadth
release?stringThe 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?numberA global sample rate to apply to all events (0 - 1).SentryNodeOptions.sampleRate
sendClientReports?booleanSend SDK Client Reports. By default, Client Reports are enabled.SentryNodeOptions.sendClientReports
serverName?stringSets an optional server name (device name)SentryNodeOptions.serverName
shutdownTimeout?numberMaximum time in milliseconds to wait to drain the request queue, before the process is allowed to exit.SentryNodeOptions.shutdownTimeout
tracesSampleRate?numberSample 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 | booleanFunction 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 SentrySentryNodeOptions.transport
transportOptions?TransportOptionsOptions for the default transport that the SDK uses.SentryNodeOptions.transportOptions
tunnel?stringA 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

ParameterType
errorError

Returns

void

Inherited from

SentryNodeOptions.onFatalError

Defined in

node_modules/@sentry/node/types/types.d.ts:32