Where to send error reports to. Will ultimately represent a Google Project or Organization.
May be set by setting ProjectId.
May be null if running on Google Cloud in which case the
Google Cloud Platform project ID will be detected from the platform
and used to build the event target.
The Google Cloud Project ID to store the logs in.
May be null if running on Google Cloud, in which case, and if EventTarget is
also null the project ID will be detected from the platform
and used to build the log target.
This is an alternate way to set EventTarget for Project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eErrorReportingServiceOptions\u003c/code\u003e class, which is used for configuring error reporting in Google Cloud Diagnostics.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eErrorReportingServiceOptions\u003c/code\u003e class allows developers to set properties like \u003ccode\u003eClient\u003c/code\u003e, \u003ccode\u003eEventTarget\u003c/code\u003e, \u003ccode\u003eOptions\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, \u003ccode\u003eServiceName\u003c/code\u003e, and \u003ccode\u003eVersion\u003c/code\u003e to customize error logging behavior.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eErrorReportingServiceOptions\u003c/code\u003e is 5.2.0, and older versions like 5.1.0, 5.0.0, 4.4.0, and 4.3.1 are also documented.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEventTarget\u003c/code\u003e and \u003ccode\u003eProjectId\u003c/code\u003e are key properties, and if they are not set and running on Google Cloud, the project ID will be automatically detected.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eobject\u003c/code\u003e and includes inherited members such as \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, \u003ccode\u003eMemberwiseClone()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.Diagnostics.Common - Class ErrorReportingServiceOptions (5.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)\n- [5.2.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)\n- [5.1.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)\n- [4.3.1](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions) \n\n public sealed class ErrorReportingServiceOptions\n\nReference documentation and code samples for the Google.Cloud.Diagnostics.Common class ErrorReportingServiceOptions.\n\nConfiguration for initializing Error Reporting. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ErrorReportingServiceOptions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Diagnostics.Common](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common)\n\nAssembly\n--------\n\nGoogle.Cloud.Diagnostics.Common.dll\n\nProperties\n----------\n\n### Client\n\n public LoggingServiceV2Client Client { get; set; }\n\nA client to log entries with. May be null.\n\n### EventTarget\n\n public EventTarget EventTarget { get; set; }\n\nWhere to send error reports to. Will ultimately represent a Google Project or Organization.\nMay be set by setting [ProjectId](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions#Google_Cloud_Diagnostics_Common_ErrorReportingServiceOptions_ProjectId).\nMay be null if running on Google Cloud in which case the\nGoogle Cloud Platform project ID will be detected from the platform\nand used to build the event target.\n\n### Options\n\n public ErrorReportingOptions Options { get; set; }\n\nError reporting options for exception logging. May be null.\n\n### ProjectId\n\n public string ProjectId { get; set; }\n\nThe Google Cloud Project ID to store the logs in.\nMay be null if running on Google Cloud, in which case, and if [EventTarget](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions#Google_Cloud_Diagnostics_Common_ErrorReportingServiceOptions_EventTarget) is\nalso null the project ID will be detected from the platform\nand used to build the log target.\nThis is an alternate way to set [EventTarget](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions#Google_Cloud_Diagnostics_Common_ErrorReportingServiceOptions_EventTarget) for [Project](/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.LogTargetKind#Google_Cloud_Diagnostics_Common_LogTargetKind_Project).\n\n### ServiceName\n\n public string ServiceName { get; set; }\n\nAn identifier of the service, such as the name of the executable or job. May be null.\n\n### Version\n\n public string Version { get; set; }\n\nRepresents the source code version that the developer provided. May be null."]]