// -*- Protocol-Buffers -*- //============================================================================== /// @file status.proto /// @brief Status details pertaining to an exception or event. /// @author Tor Slettnes //============================================================================== syntax = "proto3"; package picarro.status; import "variant.proto"; import "google/protobuf/timestamp.proto"; // Data pertaining to errors // This message structure is // - serialized by the server and included in the `error_details()` field of // `::grpc::Status()` responses after a failure // - used for asynchronous error reporting message Error { // One of the error domains listed below. Domain domain = 1; // Domain specific origin, e.g. "Linux", "MyApplication", "HTTP" string origin = 2; // Priority/Severity level Level level = 3; // Origin specific numeric id sint64 code = 4; // Source specfic symbolic name // This is normally unique within each domain, regardless of origin. string symbol = 5; // Time of occurence google.protobuf.Timestamp timestamp = 7; // Event attributes picarro.variant.KeyValueMap attributes = 14; // Description of error, possibly expanded with attribute values. string text = 15; } enum Domain { DOMAIN_NONE = 0; // No error DOMAIN_APPLICATION = 1; // Error from application, name indicated in `origin` DOMAIN_SYSTEM = 2; // OS errors, origin indicates code space (e.g. `"Linux"`) DOMAIN_PROCESS = 3; // Process exit; see `kill -l` to interpret `code`/`symbol` DOMAIN_DEVICE = 4; // Error code from a subsystem, name indicated in `origin` DOMAIN_SERVICE = 5; // Error code from a (network) service (e.g. HTTP, SMTP, ...) } enum Level { LEVEL_NONE = 0; // No event LEVEL_TRACE = 1; // Trace event for detailed troubleshooting LEVEL_DEBUG = 2; // Debug event for normal troubleshooting LEVEL_INFO = 3; // Informational event only, no error LEVEL_NOTICE = 4; // Important event LEVEL_WARNING = 5; // Abnormal event, operation continues LEVEL_ERROR = 6; // Operation failed, entity is still functional LEVEL_CRITICAL = 7; // Operation failed, entity is disabled LEVEL_FATAL = 8; // Reporting entity is disabled and cannot recover }