Interface Breadcrumbs

    • Method Detail

      • enableBreadcrumbs

        boolean enableBreadcrumbs​(android.content.Context context)
        Enable logging of breadcrumbs and submission with crash reports
        Parameters:
        context - context of current state of the application
        Returns:
        true if we successfully enabled breadcrumbs
      • enableBreadcrumbs

        boolean enableBreadcrumbs​(android.content.Context context,
                                  java.util.EnumSet<BacktraceBreadcrumbType> breadcrumbTypesToEnable)
        Enable logging of breadcrumbs and submission with crash reports
        Parameters:
        context - context of current state of the application
        breadcrumbTypesToEnable - a set containing which breadcrumb types to enable
        Returns:
        true if we successfully enabled breadcrumbs
      • enableBreadcrumbs

        boolean enableBreadcrumbs​(android.content.Context context,
                                  int maxBreadcrumbLogSizeBytes)
        Enable logging of breadcrumbs and submission with crash reports
        Parameters:
        context - context of current state of the application
        maxBreadcrumbLogSizeBytes - breadcrumb log size limit in bytes, should be a power of 2
        Returns:
        true if we successfully enabled breadcrumbs
      • enableBreadcrumbs

        boolean enableBreadcrumbs​(android.content.Context context,
                                  java.util.EnumSet<BacktraceBreadcrumbType> breadcrumbTypesToEnable,
                                  int maxBreadcrumbLogSizeBytes)
        Enable logging of breadcrumbs and submission with crash reports
        Parameters:
        context - context of current state of the application
        breadcrumbTypesToEnable - a set containing which breadcrumb types to enable
        maxBreadcrumbLogSizeBytes - breadcrumb log size limit in bytes, should be a power of 2
        Returns:
        true if we successfully enabled breadcrumbs
      • getEnabledBreadcrumbTypes

        java.util.EnumSet<BacktraceBreadcrumbType> getEnabledBreadcrumbTypes()
        Gets the enabled breadcrumb types
        Returns:
        enabled breadcrumb types
      • clearBreadcrumbs

        boolean clearBreadcrumbs()
        Clear breadcrumb logs
        Returns:
        true if log was successfully cleared
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message)
        Add a breadcrumb of type "Manual" and level "Info" with the provided message string
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              BacktraceBreadcrumbLevel level)
        Add a breadcrumb of type "Manual" and the desired level with the provided message string
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        level - the severity level of this breadcrumb
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes)
        Add a breadcrumb of type "Manual" and level "Info" with the provided message string and attributes
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        attributes - key-value pairs to provide additional information about this breadcrumb (1KB max, including some overhead per key-value pair)
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              BacktraceBreadcrumbLevel level)
        Add a breadcrumb of type "Manual" and the desired level with the provided message string and attributes
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        attributes - key-value pairs to provide additional information about this breadcrumb (1KB max, including some overhead per key-value pair)
        level - the severity level of this breadcrumb
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              BacktraceBreadcrumbType type)
        Add a breadcrumb of the desired type and level "Info" with the provided message string
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        type - broadly describes the category of this breadcrumb
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              BacktraceBreadcrumbType type,
                              BacktraceBreadcrumbLevel level)
        Add a breadcrumb of the desired level and type with the provided message string
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        type - broadly describes the category of this breadcrumb
        level - the severity level of this breadcrumb
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              BacktraceBreadcrumbType type)
        Add a breadcrumb of the desired type and level "Info" with the provided message string and attributes
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        attributes - key-value pairs to provide additional information about this breadcrumb (1KB max, including some overhead per key-value pair)
        type - broadly describes the category of this breadcrumb
        Returns:
        true if the breadcrumb was successfully added
      • addBreadcrumb

        boolean addBreadcrumb​(java.lang.String message,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              BacktraceBreadcrumbType type,
                              BacktraceBreadcrumbLevel level)
        Add a breadcrumb of the desired level and type with the provided message string and attributes
        Parameters:
        message - a message which describes this breadcrumb (1KB max)
        attributes - key-value pairs to provide additional information about this breadcrumb (1KB max, including some overhead per key-value pair)
        type - broadly describes the category of this breadcrumb
        level - the severity level of this breadcrumb
        Returns:
        true if the breadcrumb was successfully added
      • processReportBreadcrumbs

        void processReportBreadcrumbs​(BacktraceReport report)
        Process a Backtrace Report to add breadcrumbs, if breadcrumbs is enabled
        Parameters:
        report -
      • getBreadcrumbLogPath

        java.lang.String getBreadcrumbLogPath()
        Get the location of the breadcrumb log
        Returns:
        Location of the breadcrumb log
      • setCurrentBreadcrumbId

        void setCurrentBreadcrumbId​(long breadcrumbId)
        NOTE: This should only be used for testing
        Parameters:
        breadcrumbId - Will force set the current breadcrumb ID
      • getCurrentBreadcrumbId

        long getCurrentBreadcrumbId()
        Get the current breadcrumb ID (exclusive). This is useful when breadcrumbs are queued and posted to an API because in the meantime before the breadcrumbs are finally posted we might get more breadcrumbs which are not relevant (because they occur after queueing up the breadcrumb sender). Therefore it is useful to mark the breadcrumb sender with the most current breadcrumb ID at the time of queuing up the request to post the breadcrumbs.
        Returns:
        current breadcrumb ID (exclusive)
      • isEnabled

        boolean isEnabled()
        Determinate if Breadcrumbs are enabled.
        Returns:
        true if breadcrumbs are enabled.
      • setOnSuccessfulBreadcrumbAddEventListener

        void setOnSuccessfulBreadcrumbAddEventListener​(OnSuccessfulBreadcrumbAddEventListener eventListener)
        Set event executed after adding a breadcrumb to the breadcrumb storage.
        Parameters:
        eventListener - object with method which will be executed.