private static ExpectedDependencyBuilder CreateExpectedDependencies() { var expected = new ExpectedDependencyBuilder(); expected.ExpectNone <IScriptEventManager>(); expected.ExpectNone <IEventGenerator>(); expected.Expect <ILoggerFactory, ScriptLoggerFactory>(); expected.Expect <IMetricsLogger, WebHostMetricsLogger>(); expected.Expect <IEventCollectorFactory>("Microsoft.Azure.WebJobs.Logging.EventCollectorFactory"); expected.ExpectCollection <IEventCollectorProvider>() .Expect <FunctionInstanceLogCollectorProvider>() .Expect("Microsoft.Azure.WebJobs.Logging.FunctionResultAggregatorProvider"); expected.ExpectCollection <IHostedService>() .Expect <JobHostService>() .Expect <JobHostService>("Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService") .Expect <PrimaryHostCoordinator>() .Expect <HttpInitializationService>() .Expect <FileMonitoringService>() .Expect <LanguageWorkerConsoleLogService>() .Optional <FunctionsSyncService>(); // This service is conditionally registered. expected.ExpectSubcollection <ILoggerProvider>() .Expect <AzureMonitorDiagnosticLoggerProvider>() .Expect <FunctionFileLoggerProvider>() .Expect <HostFileLoggerProvider>() .Expect <SystemLoggerProvider>() .Expect <UserLogMetricsLoggerProvider>(); return(expected); }
private static ExpectedDependencyBuilder CreateExpectedDependencies() { var expected = new ExpectedDependencyBuilder(); expected.ExpectNone <IScriptEventManager>(); expected.ExpectNone <IEventGenerator>(); expected.Expect <ILoggerFactory, ScriptLoggerFactory>(); expected.ExpectFactory <IMetricsLogger, NonDisposableMetricsLogger>(); expected.Expect <IWebJobsExceptionHandler, WebScriptHostExceptionHandler>(); expected.Expect <IEventCollectorFactory>("Microsoft.Azure.WebJobs.Logging.EventCollectorFactory"); expected.ExpectCollection <IEventCollectorProvider>() .Expect <FunctionInstanceLogCollectorProvider>() .Expect("Microsoft.Azure.WebJobs.Logging.FunctionResultAggregatorProvider"); expected.ExpectCollection <IHostedService>() .Expect <JobHostService>("Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService") .ExpectFactory <ExternalConfigurationStartupValidatorService>() .ExpectFactory <IFileMonitoringService>() .Expect <WorkerConsoleLogService>() .Expect <FunctionInvocationDispatcherShutdownManager>() .Expect <WorkerConcurrencyManager>() .Optional <FunctionsScaleMonitorService>() .Optional <FuncAppFileProvisioningService>() // Used by powershell. .Optional <JobHostService>() // Missing when host is offline. .Optional <FunctionsSyncService>() // Conditionally registered. .OptionalExternal("Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService", "Microsoft.AspNetCore.DataProtection", "adb9793829ddae60") // Popularly-registered by DataProtection. .OptionalExternal("Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckPublisherHostedService", "Microsoft.Extensions.Diagnostics.HealthChecks", "adb9793829ddae60") // Popularly-registered by Health Check Monitor. .OptionalExternal("OpenTelemetry.Extensions.Hosting.Implementation.TelemetryHostedService", "OpenTelemetry.Extensions.Hosting", "7bd6737fe5b67e3c") // Enable OpenTelemetry.Net instrumentation library .OptionalExternal("Microsoft.Azure.WebJobs.Hosting.PrimaryHostCoordinator", "Microsoft.Azure.WebJobs.Host", "31bf3856ad364e35") .OptionalExternal("Microsoft.Azure.WebJobs.Host.Scale.ConcurrencyManagerService", "Microsoft.Azure.WebJobs.Host", "31bf3856ad364e35"); expected.ExpectSubcollection <ILoggerProvider>() .Expect <FunctionFileLoggerProvider>() .Expect <HostFileLoggerProvider>() .Expect <SystemLoggerProvider>(); return(expected); }
private static ExpectedDependencyBuilder CreateExpectedDependencies() { var expected = new ExpectedDependencyBuilder(); expected.ExpectNone <IScriptEventManager>(); expected.ExpectNone <IEventGenerator>(); expected.Expect <ILoggerFactory, ScriptLoggerFactory>(); expected.ExpectFactory <IMetricsLogger, NonDisposableMetricsLogger>(); expected.Expect <IWebJobsExceptionHandler, WebScriptHostExceptionHandler>(); expected.Expect <IEventCollectorFactory>("Microsoft.Azure.WebJobs.Logging.EventCollectorFactory"); expected.ExpectCollection <IEventCollectorProvider>() .Expect <FunctionInstanceLogCollectorProvider>() .Expect("Microsoft.Azure.WebJobs.Logging.FunctionResultAggregatorProvider"); expected.ExpectCollection <IHostedService>() .Expect <JobHostService>("Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService") .ExpectFactory <ExternalConfigurationStartupValidatorService>() .Expect <PrimaryHostCoordinator>() .Expect <FileMonitoringService>() .Expect <WorkerConsoleLogService>() .Expect <FunctionInvocationDispatcherShutdownManager>() .Optional <ChangeAnalysisService>() .Optional <FunctionsScaleMonitorService>() .Optional <FuncAppFileProvisioningService>() // Used by powershell. .Optional <JobHostService>() // Missing when host is offline. .Optional <FunctionsSyncService>() // Conditionally registered. .OptionalExternal("Microsoft.AspNetCore.DataProtection.Internal.DataProtectionHostedService", "Microsoft.AspNetCore.DataProtection", "adb9793829ddae60"); // Popularly-registered by DataProtection. expected.ExpectSubcollection <ILoggerProvider>() .Expect <AzureMonitorDiagnosticLoggerProvider>() .Expect <FunctionFileLoggerProvider>() .Expect <HostFileLoggerProvider>() .Expect <SystemLoggerProvider>(); return(expected); }
private static ExpectedDependencyBuilder CreateExpectedDependencies() { var expected = new ExpectedDependencyBuilder(); expected.ExpectNone <IScriptEventManager>(); expected.ExpectNone <IEventGenerator>(); expected.Expect <ILoggerFactory, ScriptLoggerFactory>(); expected.Expect <IMetricsLogger, WebHostMetricsLogger>(); expected.Expect <IWebJobsExceptionHandler, WebScriptHostExceptionHandler>(); expected.Expect <IEventCollectorFactory>("Microsoft.Azure.WebJobs.Logging.EventCollectorFactory"); expected.ExpectCollection <IEventCollectorProvider>() .Expect <FunctionInstanceLogCollectorProvider>() .Expect("Microsoft.Azure.WebJobs.Logging.FunctionResultAggregatorProvider"); expected.ExpectCollection <IHostedService>() .Expect <JobHostService>("Microsoft.Azure.WebJobs.Hosting.OptionsLoggingService") .Expect <PrimaryHostCoordinator>() .Expect <FileMonitoringService>() .Expect <LanguageWorkerConsoleLogService>() .Optional <FunctionsScaleMonitorService>() .Optional <FuncAppFileProvisioningService>() // Used by powershell. .Optional <JobHostService>() // Missing when host is offline. .Optional <FunctionsSyncService>(); // Conditionally registered. expected.ExpectSubcollection <ILoggerProvider>() .Expect <AzureMonitorDiagnosticLoggerProvider>() .Expect <FunctionFileLoggerProvider>() .Expect <HostFileLoggerProvider>() .Expect <SystemLoggerProvider>() .Expect <UserLogMetricsLoggerProvider>(); return(expected); }