using System;
namespace Amazon.AwsToolkit.Telemetry.Events.Core
{
///
/// Parent to all classes representing events to be recorded
///
public abstract class BaseTelemetryEvent
{
///
/// Indicates if the metric relates to something the user has initiated (false)
/// or something the Toolkit may have automatically induced (true).
///
/// Derived classes configure this value to match the telemetry definitions.
/// Most metrics are intended to be passive or active, but some can be both,
/// this property gives calling code the opportunity to adjust if needed.
///
public bool Passive = false;
///
/// Optional - The reason for a metric or exception depending on context. It describes a certain theme of errors usually the exception class name eg. FileIOException
/// This is often used in failure scenarios to provide additional details about why something failed.
///
public string Reason;
///
/// Optional - User-friendly error codes describing a failed operation
/// This is often used in failure scenarios to provide additional details about why something failed.
///
public string ErrorCode;
///
/// Optional - High level categorization indicating the cause of the error eg. client, user, service, unknown
/// This is often used in failure scenarios to provide additional details about why something failed.
///
public string CausedBy;
///
/// Optional - Describes the HTTP status code for request made. The semantics are contextual based off of other fields (e.g. `requestId`)
/// This is often used in failure scenarios to provide additional details about why something failed.
///
public string HttpStatusCode;
///
/// Optional - A generic request ID field. The semantics are contextual based off of other fields (e.g. `requestServiceType`). For example, an event with `requestServiceType: s3` means that the request ID is associated with an S3 API call. Events that cover mutliple API calls should use the request ID of the most recent call.
/// This is often used in failure scenarios to provide additional details about why something failed.
///
public string RequestId;
///
/// Optional - Per-request service identifier. Unlike `serviceType` (which describes the originator of the request), this describes the request itself.
/// This is often used in failure scenarios to provide additional details about why something failed.
///
public string RequestServiceType;
///
/// Optional - The duration for the workflow associated with the metric
/// This is often used in multi-step workflows to provide additional details about how long did the action take
///
public double? Duration;
///
/// Optional - Language-related user preference information. Examples: en-US, en-GB, etc.
///
public string Locale;
public DateTime? CreatedOn;
public double? Value;
public string AwsAccount;
public string AwsRegion;
}
}