public sealed class ErrorReportingOptions
Optional configuration to be used when initializing Google Cloud Error Reporting.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
Google.Cloud.Diagnostics.Common.dll
Properties
BufferOptions
public BufferOptions BufferOptions { get; }
The buffer options for the error reporter.
Property Value | |
---|---|
Type | Description |
BufferOptions |
EventTarget
[Obsolete("Please use Google.Cloud.Diagnostics.Common.ErrorReportingServiceOptions.EventTarget instead.")]
public EventTarget EventTarget { get; }
Where the error events should be sent.
Property Value | |
---|---|
Type | Description |
EventTarget |
LogName
public string LogName { get; }
The name of the log.
Property Value | |
---|---|
Type | Description |
String |
MonitoredResource
public MonitoredResource MonitoredResource { get; }
The monitored resource. See: https://cloud.google.com/logging/docs/api/v2/resource-list
Property Value | |
---|---|
Type | Description |
MonitoredResource |
RetryOptions
public RetryOptions RetryOptions { get; }
The retry options for the error reporter.
Property Value | |
---|---|
Type | Description |
RetryOptions |
Methods
Create(EventTarget, BufferOptions, RetryOptions)
[Obsolete("Please use CreateInstance(string, MonitoredResource, BufferOptions, RetryOptions) instead.")]
public static ErrorReportingOptions Create(EventTarget eventTarget, BufferOptions bufferOptions = null, RetryOptions retryOptions = null)
Creates an ErrorReportingOptions.
Parameters | |
---|---|
Name | Description |
eventTarget | EventTarget Where the error events should be sent. Must not be null. |
bufferOptions | BufferOptions The buffer options for the error reporter. Defaults to no buffer. |
retryOptions | RetryOptions The retry options for the error reporter. Defaults to no retry. |
Returns | |
---|---|
Type | Description |
ErrorReportingOptions |
Create(String, BufferOptions, RetryOptions)
[Obsolete("Please use CreateInstance(string, MonitoredResource, BufferOptions, RetryOptions) instead.")]
public static ErrorReportingOptions Create(string projectId = null, BufferOptions bufferOptions = null, RetryOptions retryOptions = null)
Creates an ErrorReportingOptions that will send error events to the Google Cloud Logging API.
Parameters | |
---|---|
Name | Description |
projectId | String Optional if running on Google App Engine or Google Compute Engine. The Google Cloud Platform project ID. If running on GAE or GCE the project ID will be detected from the platform. |
bufferOptions | BufferOptions The buffer options for the error reporter. Defaults to no buffer. |
retryOptions | RetryOptions The retry options for the error reporter. Defaults to no retry. |
Returns | |
---|---|
Type | Description |
ErrorReportingOptions |
CreateInstance(String, MonitoredResource, BufferOptions, RetryOptions)
public static ErrorReportingOptions CreateInstance(string logName = null, MonitoredResource resource = null, BufferOptions bufferOptions = null, RetryOptions retryOptions = null)
Creates an ErrorReportingOptions.
Parameters | |
---|---|
Name | Description |
logName | String The log name to log to. May be null, in which case, a default name will be used. |
resource | MonitoredResource 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 | BufferOptions The buffer options for the error reporter. Defaults to no buffer. |
retryOptions | RetryOptions The retry options for the error reporter. Defaults to no retry. |
Returns | |
---|---|
Type | Description |
ErrorReportingOptions | A new ErrorReportingOptions instance with the specified parameters or defaults. |
The naming of this method CreateInstance(String, MonitoredResource, BufferOptions, RetryOptions) is not consistent with the naming of similar methods in other options classes to avoid taking a breaking change. The semantics of this method is the same as all other Create methods in option classes like Create(LogLevel, String, Dictionary<String, String>, MonitoredResource, BufferOptions, RetryOptions) or even the Obsolete Create(String, BufferOptions, RetryOptions).