Interface ErrorData


  • public interface ErrorData
    Interface that represents information about an exception to be reported to New Relic. And instance of a class that implements this interface will be supplied to the ErrorGroupCallback callback registered via the setErrorGroupCallback. This callback will then generate a key that will be used to group errors in the errors inbox.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​?> getCustomAttributes()
      Return a Map instance of all the attributes associated with this caught error
      java.lang.String getErrorClass()
      Return the Class of the underlying Throwable, if available; as a String
      java.lang.String getErrorMessage()
      Return the error message of the reportable error
      java.lang.Throwable getException()
      Return the Throwable for the error, if available.
      java.lang.String getHttpMethod()
      Return the HTTP method if the error was caught within a Transaction
      java.lang.String getHttpStatusCode()
      Return the HTTP status code as a String if the error was caught within a Transaction
      java.lang.String getRequestUri()
      Return the request URI if the error was caught within a Transaction
      java.lang.StackTraceElement[] getStackTraceElement()
      Return an array of StackTraceElement instances, representing the stack trace of the error, if available
      java.lang.String getTransactionName()
      Return the transaction name, if the error was caught within a Transaction
      java.lang.String getTransactionUiName()
      Return the transaction UI name, if the error was caught within a Transaction
      boolean isErrorExpected()
      Return true if the error was flagged as expected, false otherwise
    • Method Detail

      • getException

        java.lang.Throwable getException()
        Return the Throwable for the error, if available.
        Returns:
        the Throwable, if available; null otherwise
      • getErrorClass

        java.lang.String getErrorClass()
        Return the Class of the underlying Throwable, if available; as a String
        Returns:
        the Class of the underlying Throwable as a String, or an empty String if the Throwable isn't available
      • getErrorMessage

        java.lang.String getErrorMessage()
        Return the error message of the reportable error
        Returns:
        The error message, or an empty String if the error message is unavailable
      • getStackTraceElement

        java.lang.StackTraceElement[] getStackTraceElement()
        Return an array of StackTraceElement instances, representing the stack trace of the error, if available
        Returns:
        an array of StackTraceElements, if available or an empty StackTraceElement array if the stack trace is unavailable
      • getCustomAttributes

        java.util.Map<java.lang.String,​?> getCustomAttributes()
        Return a Map instance of all the attributes associated with this caught error
        Returns:
        a Map with all attributes associated with the error
      • getTransactionName

        java.lang.String getTransactionName()
        Return the transaction name, if the error was caught within a Transaction
        Returns:
        the transaction name, if available or an empty String otherwise
      • getTransactionUiName

        java.lang.String getTransactionUiName()
        Return the transaction UI name, if the error was caught within a Transaction
        Returns:
        the transaction UI name, if available or an empty String otherwise
      • getRequestUri

        java.lang.String getRequestUri()
        Return the request URI if the error was caught within a Transaction
        Returns:
        the request URI if available or an empty String otherwise
      • getHttpStatusCode

        java.lang.String getHttpStatusCode()
        Return the HTTP status code as a String if the error was caught within a Transaction
        Returns:
        the HTTP status code as a String, if available or an empty String otherwise
      • getHttpMethod

        java.lang.String getHttpMethod()
        Return the HTTP method if the error was caught within a Transaction
        Returns:
        the HTTP method, if available or an empty String otherwise
      • isErrorExpected

        boolean isErrorExpected()
        Return true if the error was flagged as expected, false otherwise
        Returns:
        true if the error was flagged as expected, false otherwise