RUM JavaScript API - 1.345.1
    Preparing search index...

    Function sendExceptionEvent

    • Async wrapper for dynatrace.sendExceptionEvent.

      Sends an exception event to Dynatrace RUM. The event is marked with characteristics.is_api_reported and error.source = api to distinguish API-reported errors from automatically captured ones. This function is only available if the Errors module is enabled.

      Parameters

      • error: Error

        Must be a valid instance of the Error class. If an invalid value is provided, the error will not be processed or sent.

      • Optionalfields: ApiCreatedEventPropertiesEvent

        Optional: Must be a valid JSON object and cannot contain functions, undefined, Infinity and NaN as values, otherwise they will be replaced with null. The fields need to be serializable using JSON.stringify. The resulting event will contain the provided fields, and is modified with additional properties, thus also empty objects are valid. Only properties prefixed with event_properties. are allowed. The duration property is not supported for exception events and will be dropped if provided. String properties are limited to 5000 characters, exceeding characters are cut off. All event property keys must contain only alphabetic characters, numbers, underscores or dots. Each dot must be followed by an alphabetic character. Each underscore must be followed by an alphabetic character or number.

      • timeout: number = DEFAULT_AGENT_TIMEOUT

        Timeout in milliseconds to wait for the RUM JavaScript to be available (default: 10000)

      Returns Promise<void>

      A DynatraceError if the RUM JavaScript is not available within the timeout, or the namespace is overridden with an incompatible object