Files
UnrealEngineUWP/Engine/Source/Programs/CrashReporter/CrashReportProcess/Config.cs
Ben Marsh 7c77078af1 Copying //UE4/Dev-Core to //UE4/Dev-Main (Source: //UE4/Dev-Core @ 3345728)
#lockdown Nick.Penwarden

==========================
MAJOR FEATURES + CHANGES
==========================

Change 3315219 on 2017/02/21 by Steve.Robb

	Fix for FObjectAndNameAsStringProxyArchive when serializing a TWeakObjectPtr.

Change 3315285 on 2017/02/21 by Steve.Robb

	Explicitly pass string builder into code generation functions.

Change 3315341 on 2017/02/21 by Ben.Marsh

	UAT: Clean up some formatting in StreamCopyDescription output - remove #fyi lines, exclude merge commits, and remove some blank lines.

Change 3315350 on 2017/02/21 by Ben.Marsh

	Fix shared resource files not being rebuilt if the version header changes.

Change 3315823 on 2017/02/21 by Ben.Marsh

	UAT: Use a class derived from AutomationException to return information specific to commandlets failing, rather than putting it in the base class.

Change 3315826 on 2017/02/21 by Ben.Marsh

	UAT: Move Distiller class from general use in UAT; FileFilter provides a much safer and fully featured implementation of the same concepts.

Change 3315857 on 2017/02/21 by Ben.Marsh

	UBT: Remove the StripBaseDirectory() and MakeRerootedFilePath() utility functions from UBT. These operations can now be done more safely with FileReference objects.

Change 3315942 on 2017/02/21 by Ben.Marsh

	UBT: Convert FileFilter to use FileReference and DirectoryReference arguments everywhere.

Change 3316236 on 2017/02/22 by Maciej.Mroz

	#jira UE-42045

	Nativization
	Fixed Warning: TEnumAsByte is not intended for use with enum

Change 3316253 on 2017/02/22 by Robert.Manuszewski

	Fixes for the async log file writer hangs and crashes.

	- potential fix for the logging system hang when running out of disk space while flushing log
	- fix for unexpected concurrency assert when flushing the log buffer to disk

Change 3316293 on 2017/02/22 by Steve.Robb

	GetTypeHash and lexicographical comparison operators (operator<() etc.) for TTuple.

Change 3316342 on 2017/02/22 by Maciej.Mroz

	Nativization: Wrappers (stubs) required only by other wrappers are properly generated.

	#codereview: Mike.Beach

Change 3316344 on 2017/02/22 by Maciej.Mroz

	Fixed crash in nativized Odin
	Async loading properly handles nativized structs.

Change 3316359 on 2017/02/22 by Steve.Robb

	GitHub #3287 : Ignore #pragma in USTRUCTs

	#jira UE-42248

Change 3316389 on 2017/02/22 by Matthew.Griffin

	Switched Installed Engine Filters to multiline properties to make them more readable
	Added Oodle to list of excluded plugins
	#jira UE-42030

Change 3316392 on 2017/02/22 by Ben.Marsh

	UBT: Split out FileReference/DirectoryReference classes into their own file.

Change 3316394 on 2017/02/22 by Ben.Marsh

	UBT: Move FileReference/DirectoryReference extension methods into the appropriate file.

Change 3316411 on 2017/02/22 by Ben.Marsh

	UAT: Remove file functions that take multiple arguments. There's not really a compelling use case for these to exist over looping from the calling code.

Change 3316446 on 2017/02/22 by Ben.Marsh

	UAT: Try disabling function name prefix to log output from UAT, to see if it improves readability. Function names are still included in the log file for debugging.

Change 3316575 on 2017/02/22 by Ben.Marsh

	UAT: Remove unused functionality for dealing with labels, and output a more human readable list of P4 settings at startup.

Change 3318481 on 2017/02/22 by Steve.Robb

	Use of FMath::IsPowerOfTwo in check.
	Static assert to ensure that an inline set allocator will have a hash size of a power of two.

Change 3318496 on 2017/02/22 by Steve.Robb

	Fix for TSet visualizers.

Change 3318919 on 2017/02/23 by Steve.Robb

	Fix for hot reloading UScriptStruct-derived objects in a module, where the CDOs of these objects haven't had PrepareCppStructOps() called on them.

	#jira UE-42178

Change 3318942 on 2017/02/23 by Steve.Robb

	Removal of a redundant insertion which can cause problems on reallocation of the map.

Change 3319010 on 2017/02/23 by Ben.Marsh

	UBT: Fix exception when a file that was previously part of the working set is deleted.

Change 3319134 on 2017/02/23 by Robert.Manuszewski

	Better fix for a deadlock when flushing log while it's already being flushed due to flush timer on the async log writer thread.

Change 3319249 on 2017/02/23 by Matthew.Griffin

	Added a function to check if running with debug game libs instead of checking command line in multiple places
	Added -RunConfig parameter, which has equivalent result to -debug if value of parameter starts with 'debug'
	Added -RunConfig=$(Configuration) as a default commandline argument for Mac so that editor can use debug game libs
	Removed -Shipping argument from VCProject generation as it's not used anymore

Change 3319253 on 2017/02/23 by Maciej.Mroz

	#jira UE-41846

	New mechanism to gather modules necessary for Nativized Assets. The modules are listed based on included headers. Previously the dependencies was gathered only in FBlueprintNativeCodeGenManifest::GatherModuleDependencies.

Change 3319591 on 2017/02/23 by Ben.Marsh

	Don't strip prefixes beginning with WARNING: or ERROR: using the Postp filter.

Change 3320357 on 2017/02/23 by Steven.Hutton

	Slight changes to Add Crash method - Returning select fields instead of entity objects in queries for perf reasons.

Change 3320361 on 2017/02/23 by Steven.Hutton

	Performance improvements subsequent to the recent database changes.

Change 3320446 on 2017/02/23 by Steven.Hutton

	adding my temporary performance tracker class - reports to a private slack channel with add crash performance data.

Change 3320479 on 2017/02/23 by Ben.Marsh

	Fix CIS errors.

Change 3320576 on 2017/02/23 by Jin.Zhang

	Update CrashReporter to use AWS

Change 3320742 on 2017/02/23 by Jin.Zhang

	Merging crash caching

Change 3321119 on 2017/02/24 by Robert.Manuszewski

	DLL injection protection support for non-monolithic builds

Change 3323308 on 2017/02/27 by Matthew.Griffin

	Moved compilation of SwarmInterface after its dependencies so that we will see a build failure immediately if they change version in future

Change 3323423 on 2017/02/27 by Chad.Garyet

	Adding a script to check and warn about csproj targeted .net versions being mismatched

	#JIRA UE-39624

Change 3323442 on 2017/02/27 by Ben.Marsh

	UBT: Output an error if an engine module references a game module.

Change 3323743 on 2017/02/27 by Ben.Marsh

	PR #3303: Resolved PVS scan issues (Contributed by projectgheist)

Change 3323748 on 2017/02/27 by Ben.Marsh

	Convert whitespace to tabs.

Change 3324851 on 2017/02/28 by Chris.Wood

	Add Odin symbol locations to engine config for MDD on CR server.

	NotForLicensees

Change 3324979 on 2017/02/28 by Gil.Gribb

	Fixed bad merge of priority change in the EDL.

Change 3326889 on 2017/03/01 by Steven.Hutton

	Update to buggs controller to generate faster queries.

Change 3326910 on 2017/03/01 by Robert.Manuszewski

	Removing legacy #if from PackageFileSummary.

Change 3327118 on 2017/03/01 by Gil.Gribb

	UE4 - Fixed race that resulted in a memory leak when reading compressed paks.

Change 3327633 on 2017/03/01 by Gil.Gribb

	UE4 - Added a cvar to control the pak precacher thottle.

Change 3327674 on 2017/03/01 by Steve.Robb

	Unified boilerplate between all generated code files.

Change 3328544 on 2017/03/01 by Chris.Wood

	CrashReportProcess.config update (CRP v1.2.17)

	Tweaks to a few values.
	Update website URL to explicitly point to old, non-cloud site on devweb-02.

Change 3328714 on 2017/03/01 by Chris.Wood

	Correct CRP config regression. Point website at new cloud site. Still v1.2.17

Change 3329192 on 2017/03/02 by Matthew.Griffin

	Added Shared Build Id file to the list of Precompiled Build Dependencies in a target receipt so that it's brought into an installed build

Change 3329285 on 2017/03/02 by Ben.Marsh

	UGS: Allow a project to specify a filters for the streams that should be displayed for fast-switching to. The QuickSelectStreamList seting in the [Options] section of the project settings references a depot path containing a list of strings used to filter the stream list. An option is shown to switch back to showing all available streams, if desired.

Change 3330636 on 2017/03/02 by Ben.Marsh

	UBT: Bump version number of C++ include cache to force it to be rebuilt with additional include information for the default RC files.

Change 3331262 on 2017/03/03 by Robert.Manuszewski

	Merging Dev-LoadTimes to Dev-Core (Garbage Collection performance improvements)

	- Improved GC multithreading
	- Improved BeginDestroy performance
	- Introduced ULevelActorCluster for StaticMeshActor and ReflectionCapture actor clustering (can be toggled through project settings or console command gc.ActorClusterEnabled)
	- A few improvements to AddReferencedObjects functions
	- Misc improvements to GC code
	- Garbage Collector now properly handles clusters which had their objects marked as pending kill
	- Blueprints can now create clusters too (can be toggled through project settings or console command gc.BlueprintClusteringEnabled, defaults to disabled)

Change 3331285 on 2017/03/03 by Robert.Manuszewski

	A few fixes for the previous check-in.

Change 3332001 on 2017/03/03 by Ben.Marsh

	UBT: Add support for generating a UDN file containing the valid settings for BuildConfiguration.xml. Pass -configdoc=<filename> on the command line to generate such a file.

Change 3332022 on 2017/03/03 by Ben.Marsh

	Update documentation for where to find the BuildConfiguration settings.

Change 3332031 on 2017/03/03 by Ben.Marsh

	Remove documentation for Windows XP support; it has been removed in the 4.16 release.

Change 3332256 on 2017/03/03 by Ben.Marsh

	UBT: Add support for generating a UDN page containing module and target settings.

Change 3332458 on 2017/03/03 by Ben.Marsh

	UBT: Improvements to generated documentation.

Change 3332459 on 2017/03/03 by Ben.Marsh

	Add generated documentation for .target.cs files, .build.cs files, and BuildConfiguration.xml files.

Change 3332460 on 2017/03/03 by Ben.Marsh

	UBT: Make LinkTypePrivate actually private, so it doesn't show up in the docs.

Change 3332899 on 2017/03/06 by Robert.Manuszewski

	Making sure actor clustering is not used in the editor (fix for actors being deleted when GC runs in the editor)

	#jira UE-42548

Change 3332955 on 2017/03/06 by Maciej.Mroz

	Nativization distinguishes client and server platform:
	- Separated lists on additional assets, additional modules, excluded assets, excluded modules, excluded paths (in config)
	- Context (compilation options, nativization options and platform) is deliveren to BPCOmpilerCppBackend in FCompilerNativizationOptions struct.
	- Wrappers (for unconverted BPs) are created only when they are directly called.

	- Fortnite dedicated server can be nativized

Change 3332990 on 2017/03/06 by Ben.Marsh

	UBT: Add more comprehensive wrapper methods for System.IO.File and System.IO.Directory to FileReference and DirectoryReference.

Change 3333032 on 2017/03/06 by Ben.Marsh

	Documentation for build tools

Change 3333037 on 2017/03/06 by Ben.Marsh

	Add a build step to extract UAT and UBT documentation from XML comments.

Change 3333089 on 2017/03/06 by Ben.Marsh

	UAT: Re-enable logging the calling function to the console in UAT. Needs a pass for readability first.

Change 3333651 on 2017/03/06 by Gil.Gribb

	UE4 - Fix a werid recursive situation where StaticLoadObject could return an object that has not finished loading. Also produces a fatal error if this sometimes happens. EDL only.

Change 3335236 on 2017/03/07 by Ben.Marsh

	UGS: Set the sync changelist separately to the compatibility changelist.

Change 3335261 on 2017/03/07 by Gil.Gribb

	UE4 - Fixed batched render fences when BeginDestroy calls FlushRenderingCommands.

Change 3335740 on 2017/03/07 by Gil.Gribb

	maybe fix static analysis warning

Change 3335945 on 2017/03/07 by Steve.Robb

	Move FFindInstancedReferenceSubobjectHelper code out of header.
	Add map/set property support to allow instanced members of these container types to be handled during CPFUO.

	https://udn.unrealengine.com/questions/349232/tmap-with-instanced-object-as-value-gets-cleared-o.html

Change 3336693 on 2017/03/07 by Ben.Marsh

	UBT: Use shared PCHs for game plugins by default, to reduce time spent generating individual PCHs.

Change 3336694 on 2017/03/07 by Steve.Robb

	Static assert added to TMap to prevent the use of keys which don't implement a GetTypeHash.
	Fixes to types which relied on implicit conversions when calling GetTypeHash.
	Workaround in SAssetView.h and PropertyEditorModule.h for an apparent VC bug where the compiler wrongly instantiates TPointerIsConvertibleFromTo for certain forward-declared types, causing future TSharedPtr conversions to fail.

	#jira UE-42441

Change 3336698 on 2017/03/07 by Steve.Robb

	Hardcoded endpoint handling replaced with a generic string.
	Obsolete .proto and .java code generation removed.

Change 3336811 on 2017/03/07 by Wes.Hunt

	Add a game blacklist to the crash report processor. Fixed a syntax error in Config.cs, added a XML comment to shut up a warning.

Change 3336973 on 2017/03/08 by Steve.Robb

	Fix for missing GetTypeHash in a plugin.

Change 3336996 on 2017/03/08 by Steve.Robb

	Significant refactor of code generation, to try and make data flow more apparent.

Change 3337571 on 2017/03/08 by Steve.Robb

	CIS fixes for missing GetTypeHash functions.
	Non-unity fix.

Change 3337588 on 2017/03/08 by Gil.Gribb

	UE4 - Fixed obscure check with flushing rhi resources.

Change 3337620 on 2017/03/08 by Steve.Robb

	WITH_HOT_RELOAD_CTORS macros removed.
	UseVTableConstructors config option removed.

Change 3339369 on 2017/03/09 by Steve.Robb

	GetTypeHash overload for nn::account::Uid.

Change 3339464 on 2017/03/09 by Daniel.Lamb

	Fixed assert in 4.15 to do with trying to gather dependency info from invalid packages.
	#jira UE-42583
	#test Editor + Cook + Run shootergame

Change 3339465 on 2017/03/09 by Maciej.Mroz

	Fixed serialization issue, after UserDefinedEnum was used in EnumProperty.

Change 3339469 on 2017/03/09 by Maciej.Mroz

	Fixed Nativization problem, when default value is passed as non-const reference.

Change 3340178 on 2017/03/09 by Daniel.Lamb

	Added support for in memory only packages.  The Cooker ignores these and added core functions to recognize these packages.
	Other systems will need to add support where nessisary.

Change 3341002 on 2017/03/10 by Maciej.Mroz

	Nativization: Fixed FFindHeadersToInclude. Headers necessary for owners of subobjects are properly included.

Change 3341076 on 2017/03/10 by Steve.Robb

	Fix for FBakedTextureSourceInfo move semantics.

	#jira UE-42658

Change 3341160 on 2017/03/10 by Gil.Gribb

	UE4 - Fix hazard with SetMaterialUsage from a thread.

Change 3341409 on 2017/03/10 by Steve.Robb

	Reduction of the generated code size for StaticRegisterNatives functions.

Change 3341523 on 2017/03/10 by Steve.Robb

	Code generation simplified.

Change 3341800 on 2017/03/10 by Ben.Marsh

	UnrealVS: Fix UnrealVS compatibility with RTM version of Visual Studio 2017. 2017 toolchain for extensions is no longer able to build <= 2015 extensions due to validation of the VSIX manifest, so create a separate solution for it.

Change 3342034 on 2017/03/10 by Ben.Marsh

	Fix compiler setting not being loaded correctly into the Windows target settings dialog.

	#jira UE-42746

Change 3342041 on 2017/03/10 by Ben.Marsh

	Fix -ErrorOnEngineContentUse not being set in the cooker options correctly.

Change 3342094 on 2017/03/10 by Steve.Robb

	Fix to deteministic name order during code generation.

Change 3342251 on 2017/03/10 by Daniel.Lamb

	Integrate fix for resave lightmaps commandlet when upgrading from no mapbuilddatapackages to mapbuilddatapackages.
	#thanks Tim.Hagberg

	#test None

Change 3342961 on 2017/03/13 by Robert.Manuszewski

	Fixing memory leak when playing while running -nullrhi on the commandline in cooked games caused by shader resources not being destroyed.

	#jira FORT-38977

Change 3343022 on 2017/03/13 by Steve.Robb

	GetTypeHash fixes for FUniqueNetIdLive.

	#jira UE-42788

Change 3343448 on 2017/03/13 by Steve.Robb

	Compiled-in defer object order fixed.
	Debuggability of the deferred registration map improved.

	#jira UE-42828

[CL 3345747 by Ben Marsh in Main branch]
2017-03-14 15:48:33 -04:00

465 lines
15 KiB
C#

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using System.Reflection;
namespace Tools.CrashReporter.CrashReportProcess
{
/// <summary>
/// Config values for the Crash Report Process. The binary expects to find an xml representation in the binary folder at runtime.
/// </summary>
[XmlRoot]
public class Config
{
/// <summary>
/// CRP version for displaying in status reports/logs etc
/// </summary>
[XmlElement]
public string VersionString { get; set; }
/// <summary>
/// Folder where the files that are linked from the website are stored.
/// </summary>
[XmlElement]
public string ProcessedReports { get; set; }
/// <summary>
/// Time after which old, unprocessed reports in landing zones are deleted.
/// </summary>
[XmlElement]
public int DeleteWaitingReportsDays { get; set; }
/// <summary>
/// The website domain to which we output crashes.
/// </summary>
[XmlElement]
public string CrashReportWebSite { get; set; }
/// <summary>
/// Folder where the video file that are linked from the website are stored.
/// </summary>
[XmlElement]
public string ProcessedVideos { get; set; }
/// <summary>
/// Folder where the Perforce depot is located.
/// </summary>
[XmlElement]
public string DepotRoot { get; set; }
/// <summary>
/// Perforce username used by the CRP and MDD.
/// </summary>
[XmlElement]
public string P4User { get; set; }
/// <summary>
/// Perforce workspace used by the CRP and MDD.
/// </summary>
[XmlElement]
public string P4Client { get; set; }
/// <summary>
/// Folder where new crash reports are queued from internal, company users.
/// </summary>
[XmlElement]
public string InternalLandingZone { get; set; }
/// <summary>
/// Folder where new crash reports are queued from external users.
/// </summary>
[XmlElement]
public string ExternalLandingZone { get; set; }
/// <summary>
/// Folder where new crash reports are queued from the data router S3 bucket.
/// </summary>
[XmlElement]
public string DataRouterLandingZone { get; set; }
/// <summary>
/// Folder where new crash reports are queued from the PS4 crash service.
/// </summary>
[XmlElement]
public string PS4LandingZone { get; set; }
/// <summary>
/// Number of reports in a queue at which reports will start to be discarded to stop a backlog from growing uncontrollably.
/// </summary>
[XmlElement]
public int QueueLowerLimitForDiscard { get; set; }
/// <summary>
/// Number of reports in a queue at which reports will all be discarded so this is the upper limit for a backlog.
/// </summary>
[XmlElement]
public int QueueUpperLimitForDiscard { get; set; }
/// <summary>
/// String passed to Minidump Diagnostics to modify its Perforce depot root.
/// </summary>
[XmlElement]
public string DepotIndex { get; set; }
/// <summary>
/// String specifying the local path of the MinidumpDiagnostics exe
/// </summary>
[XmlElement]
public string MDDExecutablePath { get; set; }
/// <summary>
/// String specifying the path to the folder used by MinidumpDiagnostics for the PDB cache
/// </summary>
[XmlElement]
public string MDDPDBCachePath { get; set; }
/// <summary>
/// Number telling MinidumpDiagnostics how large it can make the PDB cache
/// </summary>
[XmlElement]
public int MDDPDBCacheSizeGB { get; set; }
/// <summary>
/// Number telling MinidumpDiagnostics when it should start clearing cache entries to create more disk space
/// </summary>
[XmlElement]
public int MDDPDBCacheMinFreeSpaceGB { get; set; }
/// <summary>
/// Number telling MinidumpDiagnostics the minimum age if a cache entry that should be considered for deletion/stale
/// </summary>
[XmlElement]
public int MDDPDBCacheFileDeleteDays { get; set; }
/// <summary>
/// Timeout when waiting for MinidumpDiagnostics to complete
/// </summary>
[XmlElement]
public int MDDTimeoutMinutes { get; set; }
/// <summary>
/// The number of threads created by each main processor thread to upload crashes to the website. (relieves a bottleneck when using a single processor thread)
/// </summary>
[XmlElement]
public int AddReportsPerProcessor { get; set; }
/// <summary>
/// The number of main processor threads
/// </summary>
[XmlElement]
public int ProcessorThreadCount { get; set; }
/// <summary>
/// The number of parallel MDD instances allowed
/// </summary>
[XmlElement]
public int MaxConcurrentMDDs { get; set; }
/// <summary>
/// Incoming webhook URL for Slack integration.
/// </summary>
[XmlElement]
public string SlackWebhookUrl { get; set; }
/// <summary>
/// Slack channel to which messages are posted. Can be null or empty to use the webhook default.
/// </summary>
[XmlElement]
public string SlackChannel { get; set; }
/// <summary>
/// Slack username from which messages are posted. Can be null or empty to use the webhook default.
/// </summary>
[XmlElement]
public string SlackUsername { get; set; }
/// <summary>
/// Slack user icon name (e.g. ":someemoji:") from which messages are posted. Can be null or empty to use the webhook default.
/// </summary>
[XmlElement]
public string SlackEmoji { get; set; }
/// <summary>
/// The time period in which an alert with the same identifying key is not allowed to repeat.
/// </summary>
[XmlElement]
public int SlackAlertRepeatMinimumMinutes { get; set; }
/// <summary>
/// The time period in which a crash decimation (large backlog) alert with the same identifying key is not allowed to repeat.
/// </summary>
[XmlElement]
public int SlackDecimateAlertRepeatMinimumMinutes { get; set; }
/// <summary>
/// Local folder used to setup testing folders in Debug builds. Overrides other folder params in config.
/// </summary>
[XmlElement]
public string DebugTestingFolder { get; set; }
/// <summary>
/// Period between reports to Slack (if available).
/// </summary>
[XmlElement]
public int MinutesBetweenQueueSizeReports { get; set; }
/// <summary>
/// Size limit below which queues will attempt to enqueue more crashes into memory
/// Above this size, a queue will skip enqueueing until the next update.
/// </summary>
[XmlElement]
public int MinDesiredMemoryQueueSize { get; set; }
/// <summary>
/// Size limit beyond which crashes won't be enqueued into memory on each queue.
/// </summary>
[XmlElement]
public int MaxMemoryQueueSize { get; set; }
/// <summary>
/// AWSSDK AWS credentials filepath containing the keys used to access SQS and S3
/// </summary>
[XmlElement]
public string AWSCredentialsFilepath { get; set; }
/// <summary>
/// AWSSDK Profile name used in the AWS credentials file for reading crashes from DataRouter
/// </summary>
[XmlElement]
public string AWSProfileInputName { get; set; }
/// <summary>
/// AWSSDK service Url for S3 client reading crashes from DataRouter
/// </summary>
[XmlElement]
public string AWSS3ServiceInputURL { get; set; }
/// <summary>
/// AWSSDK service Url for SQS client reading crashes from DataRouter
/// </summary>
[XmlElement]
public string AWSSQSServiceInputURL { get; set; }
/// <summary>
/// AWSSDK queue Url for SQS client reading crashes from DataRouter
/// </summary>
[XmlElement]
public string AWSSQSQueueInputUrl { get; set; }
/// <summary>
/// AWSSDK Profile name used in the AWS credentials file for writing crashes to S3
/// </summary>
[XmlElement]
public string AWSProfileOutputName { get; set; }
/// <summary>
/// AWSSDK service Url for S3 client for writing crashes to S3
/// </summary>
[XmlElement]
public string AWSS3ServiceOutputURL { get; set; }
/// <summary>
/// Should we output a copy of the crash report files to disk? (ProcessedReports, ProcessedVideos)
/// </summary>
[XmlElement]
public bool CrashFilesToDisk { get; set; }
/// <summary>
/// Should we output a copy of the crash report files to S3?
/// </summary>
[XmlElement]
public bool CrashFilesToAWS { get; set; }
/// <summary>
/// Should large crash files saved to S3 be compressed? (crash context will never be compressed)
/// </summary>
[XmlElement]
public bool CompressCrashFilesOnAWS { get; set; }
/// <summary>
/// Should we save invalid reports that fail to process to S3?
/// </summary>
[XmlElement]
public bool InvalidReportsToAWS { get; set; }
/// <summary>
/// AWSSDK AWS S3 bucket used for output of crash reporter files (optional)
/// </summary>
[XmlElement]
public string AWSS3OutputBucket { get; set; }
/// <summary>
/// AWSSDK AWS S3 path/key prefix used for output of crash reporter files (suffix will be crash id and file name) (optional)
/// </summary>
[XmlElement]
public string AWSS3OutputKeyPrefix { get; set; }
/// <summary>
/// AWSSDK AWS S3 path/key prefix used for writing invalid reports (optional)
/// </summary>
[XmlElement]
public string AWSS3InvalidKeyPrefix { get; set; }
/// <summary>
/// AWSSDK AWS S3 path/key suffix used in place of the existing extension for writing compressed reports (optional)
/// </summary>
[XmlElement]
public string AWSS3CompressedSuffix { get; set; }
/// <summary>
/// Buffer size used to decompress zlib archives taken from S3
/// </summary>
[XmlElement]
public int MaxUncompressedS3RecordSize { get; set; }
/// <summary>
/// Index file used to store all processed crash names and times. Stops duplicates. Leave blank to disable.
/// </summary>
[XmlElement]
public string ProcessedReportsIndexPath { get; set; }
/// <summary>
/// Time that the ProcessedReportsIndex retains items for duplicate checking.
/// </summary>
[XmlElement]
public int ReportsIndexRetentionDays { get; set; }
/// <summary>
/// Timeout when calling AddCrash to submit crashes to the website/database.
/// </summary>
[XmlElement]
public int AddCrashRequestTimeoutSeconds { get; set; }
/// <summary>
/// Number of times to retry AddCrash after a bad response (doesn't count timeouts that are always retried).
/// </summary>
[XmlElement]
public int AddCrashRejectedRetries { get; set; }
/// <summary>
/// Time that we wait between a failed AddCrash call and a retry.
/// </summary>
[XmlElement]
public int AddCrashRetryDelaySeconds { get; set; }
/// <summary>
/// The time limit for consecutive failed AddCrash() calls after which an alert will be created.
/// </summary>
[XmlElement]
public int FailedWebAddAlertTimeSeconds { get; set; }
/// <summary>
/// Disk space available threshold that generates alerts. If a disk has less space than this, it will generate alerts.
/// </summary>
[XmlElement]
public float DiskSpaceAlertPercent { get; set; }
/// <summary>
/// Switch on perf monitoring via StatusReporting. Adds an extra report with perf info.
/// </summary>
[XmlElement]
public bool MonitorPerformance { get; set; }
/// <summary>
/// List of GameNames to blacklist. Since we take crashes from external games, we need to filter out stuff we don't want, especially high volume stuff.
/// </summary>
[XmlElement]
public string GameNamesToBlacklist { get; set; }
/// <summary>
/// Get the default config object (lazy loads it on first access)
/// </summary>
public static Config Default
{
get
{
if (DefaultSingleton == null)
{
LoadConfig();
}
return DefaultSingleton;
}
}
/// <summary>
/// Force reload default config object from disk
/// </summary>
public static void LoadConfig()
{
DefaultSingleton = LoadConfigPrivate();
}
private static Config LoadConfigPrivate()
{
Config LoadedConfig = new Config();
string ExePath = Assembly.GetEntryAssembly().Location;
string ExeFolder = Path.GetDirectoryName(ExePath);
string ConfigPath = Path.Combine(ExeFolder, "CrashReportProcess.config");
if (File.Exists(ConfigPath))
{
if (!string.IsNullOrEmpty(ConfigPath))
{
using (XmlReader Reader = XmlReader.Create(ConfigPath))
{
CrashReporterProcessServicer.WriteEvent("Loading config from " + ConfigPath);
XmlSerializer Xml = new XmlSerializer(typeof (Config));
LoadedConfig = Xml.Deserialize(Reader) as Config;
}
}
}
#if DEBUG
// Debug mode redirects to local folder in DebugTestingFolder
LoadedConfig.ProcessedReports = Path.Combine(LoadedConfig.DebugTestingFolder, "ProcessedReports");
LoadedConfig.ProcessedVideos = Path.Combine(LoadedConfig.DebugTestingFolder, "ProcessedVideos");
LoadedConfig.DepotRoot = Path.Combine(LoadedConfig.DebugTestingFolder, "DepotRoot");
if (!string.IsNullOrWhiteSpace(LoadedConfig.InternalLandingZone))
{
LoadedConfig.InternalLandingZone = Path.Combine(LoadedConfig.DebugTestingFolder, "InternalLandingZone");
}
if (!string.IsNullOrWhiteSpace(LoadedConfig.ExternalLandingZone))
{
LoadedConfig.ExternalLandingZone = Path.Combine(LoadedConfig.DebugTestingFolder, "ExternalLandingZone");
}
if (!string.IsNullOrWhiteSpace(LoadedConfig.DataRouterLandingZone))
{
LoadedConfig.DataRouterLandingZone = Path.Combine(LoadedConfig.DebugTestingFolder, "DataRouterLandingZone");
}
if (!string.IsNullOrWhiteSpace(LoadedConfig.PS4LandingZone))
{
LoadedConfig.PS4LandingZone = Path.Combine(LoadedConfig.DebugTestingFolder, "PS4LandingZone");
}
if (!string.IsNullOrWhiteSpace(LoadedConfig.MDDExecutablePath))
{
LoadedConfig.MDDExecutablePath = Path.Combine(LoadedConfig.DebugTestingFolder, "MinidumpDiagnostics", "Engine", "Binaries", "Win64", "MinidumpDiagnostics.exe");
}
LoadedConfig.VersionString += " debugbuild";
LoadedConfig.AWSCredentialsFilepath = Path.Combine(LoadedConfig.DebugTestingFolder, "AWS", "credentials.ini");
if (!string.IsNullOrWhiteSpace(LoadedConfig.ProcessedReportsIndexPath))
{
LoadedConfig.ProcessedReportsIndexPath = Path.Combine(LoadedConfig.DebugTestingFolder, "ProcessedReports.ini");
}
LoadedConfig.CrashReportWebSite = string.Empty;
LoadedConfig.AWSS3OutputKeyPrefix = LoadedConfig.AWSS3OutputKeyPrefix.Replace("prod", "test");
LoadedConfig.AWSS3InvalidKeyPrefix = LoadedConfig.AWSS3InvalidKeyPrefix.Replace("prod", "test");
LoadedConfig.MinDesiredMemoryQueueSize = 5;
LoadedConfig.MaxMemoryQueueSize = 15;
#if SLACKTESTING
LoadedConfig.SlackUsername = "CrashReportProcess_TESTING_IgnoreMe";
//LoadedConfig.SlackChannel = "OPTIONALTESTINGCHANNELHERE";
#else
LoadedConfig.SlackWebhookUrl = string.Empty; // no Slack in dbeug
#endif
#endif
return LoadedConfig;
}
private static Config DefaultSingleton;
}
}