import "Domain.bond"
import "ExceptionDetails.bond"
import "SeverityLevel.bond"

namespace AI

[Description("An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.")]
struct ExceptionData
    : Domain
{
    [Description("Schema version")]
    10: required int32 	 ver = 2;
    
    [Description("Exception chain - list of inner exceptions.")]
    50: required vector<ExceptionDetails> 	 exceptions;
    
    [Description("Severity level. Mostly used to indicate exception severity level when it is reported by logging library.")]
    60: nullable<AI.SeverityLevel> 	 severityLevel;
    
    [Description("Identifier of where the exception was thrown in code. Used for exceptions grouping. Typically a combination of exception type and a function from the call stack.")]
    [MaxStringLength("1024")]
    80: string 	 problemId;
    
    [Description("Collection of custom properties.")]
    [MaxKeyLength("150")]
    [MaxValueLength("8192")]
    100: map<string, string> 	 properties;
    
    [Description("Collection of custom measurements.")]
    [MaxKeyLength("150")]
    200: map<string, double> 	 measurements;
    
}
