Class ErrorReportCollector.ErrorReport

java.lang.Object
com.ultikits.ultitools.manager.ErrorReportCollector.ErrorReport
Enclosing class:
ErrorReportCollector

static class ErrorReportCollector.ErrorReport extends Object
Error report data structure.
  • Field Details

    • fingerprint

      String fingerprint
    • errorCode

      String errorCode
    • message

      String message
    • stackTrace

      String stackTrace
    • moduleName

      String moduleName
    • moduleId

      String moduleId
      The module's UltiCloud identifier for the v2 report, or null; see ErrorReportCollector.moduleIdentifierOf(java.lang.String).
    • className

      String className
    • methodName

      String methodName
    • triggerType

      String triggerType
    • triggerDetail

      String triggerDetail
    • playerName

      String playerName
    • playerUUID

      String playerUUID
    • serverTPS

      double serverTPS
    • serverMemoryPct

      double serverMemoryPct
    • playerCount

      int playerCount
    • timestamp

      long timestamp
    • count

    • isFramework

      boolean isFramework
    • exceptionType

      String exceptionType
      The exception's binary class name, for the v2 report.
    • memUsedMb

      long memUsedMb
      Used heap in megabytes when the report was created, or -1.
    • memMaxMb

      long memMaxMb
      Maximum heap in megabytes, or -1 when unknown.
    • firstSeenAt

      volatile long firstSeenAt
      When the group was first seen, in milliseconds.
    • lastSeenAt

      volatile long lastSeenAt
      When the group was last counted, in milliseconds.
  • Constructor Details

    • ErrorReport

      ErrorReport()
  • Method Details

    • getFingerprint

      String getFingerprint()
    • getCount

      int getCount()
    • incrementCount

      void incrementCount()
    • mergeFrom

      void mergeFrom(ErrorReportCollector.ErrorReport other)
      Merge another report into this one (sum counts, keep latest context).
    • view

      The report's values for the v2 error.report encoder, field by field (plan 22-22): the raw group key as fingerprint (the encoder pads it), the exception class, the redacted message, stack trace and trigger detail, the module's UltiCloud identifier (null when the report names no loaded module), the trigger type name, the player name, className.methodName of the top frame as location, and the server snapshot with every unknown value (-1) as null.
      Returns:
      a view over this report
    • toJson

      com.google.gson.JsonObject toJson()
      Serialises the report for UltiCloud. message, stackTrace and triggerDetail pass through SensitiveCommandRegistry.redactText(java.lang.String) here, at serialisation time only: this report and its fingerprint keep the original text, so de-duplication groups exactly as before and nothing local changes. A trigger detail may carry a whole command line (TriggerContext.command(org.bukkit.command.CommandSender, java.lang.String)), and an exception message or stack trace may quote one.