Optional
addAdd an integration to the client.
This can be used to e.g. lazy load integrations.
In most cases, this should not be necessary, and you're better off just passing the integrations via integrations: []
at initialization time.
However, if you find the need to conditionally load & add an integration, you can use addIntegration
to do so.
TODO (v8): Make this a required method.
Optional
captureCreate a cron monitor check in and send it to Sentry. This method is not available on all clients.
An object that describes a check in.
Optional
monitorConfig: MonitorConfigA string representing the id of the check in.
Optional
captureFlush the event queue and set the client to enabled = false
. See flush.
Optional
timeout: numberMaximum time in ms the client should wait before shutting down. Omitting this parameter will cause the client to wait until all events are sent before disabling itself.
A promise which resolves to true
if the flush completes successfully before the timeout, or false
if
it doesn't.
Optional
emitFire a hook event for transaction start and finish. Expects to be given a transaction as the second argument.
Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.
Optional
hint: BreadcrumbHintFire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.
Wait for all events to be sent or the timeout to expire, whichever comes first.
Optional
timeout: numberMaximum time in ms the client should wait for events to be flushed. Omitting this parameter will cause the client to wait until all events are sent before resolving the promise.
A promise that will resolve with true
if all events are sent before the timeout, or false
if there are
still events in the queue when the timeout is reached.
Returns the current Dsn.
Returns the client's instance of the given integration class, it any.
Optional
getOptional
onRegister a callback for transaction start and finish.
Register a callback for transaction start and finish.
Register a callback for when an event has been sent.
Register a callback before a breadcrumb is added.
Optional
hint: BreadcrumbHintRegister a callback whena DSC (Dynamic Sampling Context) is created.
Record on the client that an event got dropped (ie, an event that will not be sent to sentry).
The reason why the event got dropped.
Optional
event: EventThe dropped event.
Submits the session to Sentry
Generated using TypeDoc
User-Facing Sentry SDK Client.
This interface contains all methods to interface with the SDK once it has been installed. It allows to send events to Sentry, record breadcrumbs and set a context included in every event. Since the SDK mutates its environment, there will only be one instance during runtime.