# Google.Cloud.Diagnostics.Common - Class ErrorReportingServiceOptions (5.3.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [5.3.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)
- [5.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)
- [5.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)
- [5.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions)

    public sealed class ErrorReportingServiceOptions

Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class ErrorReportingServiceOptions.

Configuration for initializing Error Reporting.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ErrorReportingServiceOptions

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Diagnostics.Common](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common)

## Assembly

Google.Cloud.Diagnostics.Common.dll

## Properties

### Client

    public LoggingServiceV2Client Client { get; set; }

A client to log entries with. May be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Logging.V2/latest/Google.Cloud.Logging.V2.LoggingServiceV2Client.html` |   |

### EventTarget

    public EventTarget EventTarget { get; set; }

Where to send error reports to. Will ultimately represent a Google Project or Organization.
May be set by setting [ProjectId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions#Google_Cloud_Diagnostics_Common_ErrorReportingServiceOptions_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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.EventTarget` |   |

### Options

    public ErrorReportingOptions Options { get; set; }

Error reporting options for exception logging. May be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingOptions` |   |

### ProjectId

    public string ProjectId { get; set; }

The Google Cloud Project ID to store the logs in.
May be null if running on Google Cloud, in which case, and if [EventTarget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions#Google_Cloud_Diagnostics_Common_ErrorReportingServiceOptions_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](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions#Google_Cloud_Diagnostics_Common_ErrorReportingServiceOptions_EventTarget) for [Project](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.LogTargetKind#Google_Cloud_Diagnostics_Common_LogTargetKind_Project).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServiceName

    public string ServiceName { get; set; }

An identifier of the service, such as the name of the executable or job. May be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Version

    public string Version { get; set; }

Represents the source code version that the developer provided. May be null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |