[Obsolete("Use Google.Cloud.Diagnostics.AspNetCore.AspNetCoreGoogleDiagnosticsExtensions instead.")]
public static class GoogleDiagnosticsWebHostBuilderExtensions
Extensions to configure Google Diagnostics on the IWebHostBuilder.
Namespace
Google.Cloud.Diagnostics.AspNetCoreAssembly
Google.Cloud.Diagnostics.AspNetCore.dll
Methods
UseGoogleDiagnostics(IWebHostBuilder, Func<WebHostBuilderContext, String>, Func<WebHostBuilderContext, String>, Func<WebHostBuilderContext, String>, Func<WebHostBuilderContext, LoggerOptions>, Func<WebHostBuilderContext, TraceOptions>, Func<WebHostBuilderContext, ErrorReportingOptions>)
[Obsolete("Use Google.Cloud.Diagnostics.AspNetCore.AspNetCoreGoogleDiagnosticsExtensions instead.")]
public static IWebHostBuilder UseGoogleDiagnostics(this IWebHostBuilder builder, Func<WebHostBuilderContext, string> projectIdGetter, Func<WebHostBuilderContext, string> serviceNameGetter, Func<WebHostBuilderContext, string> serviceVersionGetter, Func<WebHostBuilderContext, LoggerOptions> loggerOptionsGetter = null, Func<WebHostBuilderContext, TraceOptions> traceOptionsGetter = null, Func<WebHostBuilderContext, ErrorReportingOptions> errorReportingOptionsGetter = null)
Configures Google Diagnostics services for Logging, Tracing and Error Reporting middleware.
Parameters | |
---|---|
Name | Description |
builder | IWebHostBuilder The IWebHostBuilder instance. |
projectIdGetter | Func<WebHostBuilderContext, String> A function that takes a WebHostBuilderContext and retrieves the Google Cloud Platform project ID. Cannot be null but can return a null value for the project ID, in such a case and if running on GAE/GCE/GKE the project ID will be detected from the platform. |
serviceNameGetter | Func<WebHostBuilderContext, String> A function that takes a WebHostBuilderContext and retrieves the identifier of the service used for exception logging, such as the name of the executable or job. Cannot be null but can return a null value for the service name, in such a case and if running on GAE the service name will be detected from the platform. |
serviceVersionGetter | Func<WebHostBuilderContext, String> A function that takes a WebHostBuilderContext and retrieves the version of the service or the source code used for exception logging. Cannot be null but can return a null value for the service version, in such a case and if running on GAE the service version will be detected from the platform. |
loggerOptionsGetter | Func<WebHostBuilderContext, LoggerOptions> A function that takes a WebHostBuilderContext and retrieves the options to use for logging. May be null or return a null value for the options; in either of these cases the default options will be used. |
traceOptionsGetter | Func<WebHostBuilderContext, TraceOptions> A function that takes a WebHostBuilderContext and retrieves the options to use for tracing. May be null or return a null value for the options; in either of these cases the default options will be used. |
errorReportingOptionsGetter | Func<WebHostBuilderContext, ErrorReportingOptions> A function that takes a WebHostBuilderContext and retrieves the options to use for errorReporting. May be null or return a null value for the options; in either of these cases the default options will be used. |
Returns | |
---|---|
Type | Description |
IWebHostBuilder | The IWebHostBuilder instance. |
UseGoogleDiagnostics(IWebHostBuilder, String, String, String, LoggerOptions, TraceOptions, ErrorReportingOptions)
[Obsolete("Use Google.Cloud.Diagnostics.AspNetCore.AspNetCoreGoogleDiagnosticsExtensions instead.")]
public static IWebHostBuilder UseGoogleDiagnostics(this IWebHostBuilder builder, string projectId = null, string serviceName = null, string serviceVersion = null, LoggerOptions loggerOptions = null, TraceOptions traceOptions = null, ErrorReportingOptions errorReportingOptions = null)
Configures Google Diagnostics services for Logging, Tracing and Error Reporting middleware.
Parameters | |
---|---|
Name | Description |
builder | IWebHostBuilder The IWebHostBuilder instance. |
projectId | String The Google Cloud Platform project ID. If unspecified and running on GAE/GCE/GKE the project ID will be detected from the platform. |
serviceName | String An identifier of the service used for exception logging (through Error Reporting), such as the name of the executable or job. If unspecified and running on GAE the service name will be detected from the platform. This may be different from ServiceName which is used for log entries logged with GoogleLogger. |
serviceVersion | String A string that represents the version of the service or the source code used for exception logging. If unspecified and running on GAE the service version will be detected from the platform. This may be different from Version which is used for log entries logged with GoogleLogger. |
loggerOptions | LoggerOptions The options for logging. May be null, in which case default options will be used. |
traceOptions | TraceOptions The options for tracing. May be null, in which case default options will be used. |
errorReportingOptions | ErrorReportingOptions The options for error reporting. May be null, in which case default options will be used. |
Returns | |
---|---|
Type | Description |
IWebHostBuilder | The IWebHostBuilder instance. |