Class GoogleDiagnosticsExtensions (4.3.1)

public static class GoogleDiagnosticsExtensions

Extensions to configure Google.Cloud.Diagnostics for non ASP.NET Core applications.

Inheritance

Object > GoogleDiagnosticsExtensions

Namespace

Google.Cloud.Diagnostics.Common

Assembly

Google.Cloud.Diagnostics.Common.dll

Methods

AddGoogleDiagnostics(IServiceCollection, TraceServiceOptions, LoggingServiceOptions, ErrorReportingServiceOptions)

public static IServiceCollection AddGoogleDiagnostics(this IServiceCollection services, TraceServiceOptions traceOptions = null, LoggingServiceOptions loggingOptions = null, ErrorReportingServiceOptions errorReportingOptions = null)

Configures Google Diagnostics to be used in non ASP.NET Core applications.

Parameters
Name Description
services IServiceCollection
traceOptions TraceServiceOptions
loggingOptions LoggingServiceOptions
errorReportingOptions ErrorReportingServiceOptions
Returns
Type Description
IServiceCollection
Remarks

Options may be null in which case defaults will be used. Note that the Google Cloud Project ID to use is required. If not set via options, it will be obtained from the environment, but only if running on GCP.

AddGoogleDiagnostics(IServiceCollection, String, String, String, TraceOptions, LoggingOptions, ErrorReportingOptions)

public static IServiceCollection AddGoogleDiagnostics(this IServiceCollection services, string projectId = null, string serviceName = null, string serviceVersion = null, TraceOptions traceOptions = null, LoggingOptions loggingOptions = null, ErrorReportingOptions errorReportingOptions = null)

Configures Google Diagnostics to be used in non ASP.NET Core applications.

Parameters
Name Description
services IServiceCollection
projectId String
serviceName String
serviceVersion String
traceOptions TraceOptions
loggingOptions LoggingOptions
errorReportingOptions ErrorReportingOptions
Returns
Type Description
IServiceCollection
Remarks

Options may be null in which case defaults will be used. Note that the Google Cloud Project ID to use is required. If not set via options, it will be obtained from the environment, but only if running on GCP.