# Google.Cloud.Diagnostics.Common - Class ErrorReportingOptions (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.ErrorReportingOptions)
- [5.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.2.0/Google.Cloud.Diagnostics.Common.ErrorReportingOptions)
- [5.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.1.0/Google.Cloud.Diagnostics.Common.ErrorReportingOptions)
- [5.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/5.0.0/Google.Cloud.Diagnostics.Common.ErrorReportingOptions)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.4.0/Google.Cloud.Diagnostics.Common.ErrorReportingOptions)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/4.3.1/Google.Cloud.Diagnostics.Common.ErrorReportingOptions)

    public sealed class ErrorReportingOptions

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

Optional configuration to be used when initializing
Google Cloud Error Reporting.

## Inheritance

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

## 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

### BufferOptions

    public BufferOptions BufferOptions { get; }

The buffer options for the error reporter.

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

### LogName

    public string LogName { get; }

The name of the log.

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

### MonitoredResource

    public MonitoredResource MonitoredResource { get; }

The monitored resource. See: <https://cloud.google.com/logging/docs/api/v2/resource-list>

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.MonitoredResource.html` |   |

### RetryOptions

    public RetryOptions RetryOptions { get; }

The retry options for the error reporter.

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

## Methods

### Create(string, MonitoredResource, BufferOptions, RetryOptions)

    public static ErrorReportingOptions Create(string logName = null, MonitoredResource resource = null, BufferOptions bufferOptions = null, RetryOptions retryOptions = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `logName` | `https://learn.microsoft.com/dotnet/api/system.string` The log name to log to. May be null, in which case, a default name will be used. |
| `resource` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.CommonProtos/latest/Google.Api.MonitoredResource.html` The monitored resource. May be null, in which case an attempt will be made to automatically detected it. If it is not detected, it will default to the global resource. See: <https://cloud.google.com/logging/docs/api/v2/resource-list> |
| `bufferOptions` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.BufferOptions` The buffer options for the error reporter. Defaults to no buffer. |
| `retryOptions` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.RetryOptions` The retry options for the error reporter. Defaults to no retry. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingOptions` | A new [ErrorReportingOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Diagnostics.Common/latest/Google.Cloud.Diagnostics.Common.ErrorReportingOptions) instance with the specified parameters or defaults. |