import { BaseClient } from "https://deno.land/x/sentry_deno@v0.2.2/packages/core/src/baseclient.ts";
Base implementation for all JavaScript SDK clients.
Call the constructor with the corresponding options specific to the client subclass. To access these options later, use Client.getOptions.
If a Dsn is specified in the options, it will be parsed and stored. Use Client.getDsn to retrieve the Dsn at any moment. In case the Dsn is invalid, the constructor will throw a SentryException. Note that without a valid Dsn, the SDK will not send any events to Sentry.
Before sending an event, it is passed through BaseClient._prepareEvent to add SDK information and scope data (breadcrumbs and context). To add more custom information, override this method and extend the resulting prepared event.
To issue automatically created events (e.g. via instrumentation), use Client.captureEvent. It will prepare the event and pass it through the callback lifecycle. To issue auto-breadcrumbs, use Client.addBreadcrumb.
Type Parameters
Properties
The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled.
Methods
Enhances event using the client configuration.
It takes care of all "static" values like environment, release and dist
,
as well as truncating overly long values.
This function adds all used integrations to the SDK info in the event.
Processes the event and logs an error in case of rejection
Determine if the client is finished processing. Returns a promise because it will wait timeout
ms before saying
"no" (resolving to false
) in order to give the client a chance to potentially finish first.
Applies normalize
function on necessary Event
attributes to make them safe for serialization.
Normalized keys:
breadcrumbs.data
user
contexts
extra
Adds common information to events.
The information includes release and environment from options
,
breadcrumbs and context (extra, tags and user) from the scope.
Information that is already present in the event is never overwritten. For nested objects, such as the context, keys are merged.
Processes an event (either error or message) and sends it to Sentry.
This also adds breadcrumbs and context information to the event. However, platform specific meta data (such as the User's IP address) must be added by the SDK implementor.
Updates existing session based on the provided event
Gets an installed integration by its id
.