public static void StartActuators(this IContainer container) { var configuration = container.Resolve <IConfiguration>(); var dynamicLogger = container.Resolve <IEnumerable <ILoggerProvider> >().OfType <DynamicConsoleLoggerProvider>().First(); var healthContributors = container.Resolve <IEnumerable <IHealthContributor> >(); container.TryResolve <IApiExplorer>(out var apiExplorer); var loggerFactory = container.Resolve <ILoggerFactory>(); ActuatorConfigurator.UseAllActuators(configuration, dynamicLogger, healthContributors, apiExplorer, loggerFactory); }
public static void Register() { var configuration = ApplicationConfig.GetService <IConfiguration>(); var dynamicLoggerProvider = ApplicationConfig.GetService <ILoggerProvider>(); var healthContributors = ApplicationConfig.GetService <IEnumerable <IHealthContributor> >(); var loggerFactory = ApplicationConfig.GetService <ILoggerFactory>(); var apiExplorer = GlobalConfiguration.Configuration.Services.GetApiExplorer(); ActuatorConfigurator.UseCloudFoundryActuators(configuration, dynamicLoggerProvider, healthContributors, apiExplorer, loggerFactory); }
public static IList <IActuatorHandler> ConfigureManagementActuators(LoggerFactory loggerFactory = null, Dictionary <string, string> settings = null) { var configuration = new ConfigurationBuilder().AddInMemoryCollection(settings).Build(); ActuatorConfigurator.ConfiguredHandlers.Clear(); // Clear setup between tests ActuatorConfigurator.ClearManagementOptions(); ActuatorConfigurator.UseAllActuators(configuration, null, GetHealthContributors(configuration), null, loggerFactory); return(ActuatorConfigurator.ConfiguredHandlers); }
public void Configure() { var configuration = DependencyContainer.GetService <IConfiguration>(); var loggerFactory = GetLoggerFactory(configuration); ActuatorConfigurator.UseCloudFoundryActuators(configuration, dynamicLoggerProvider, MediaTypeVersion.V1, ActuatorContext.ActuatorAndCloudFoundry, GetHealthContributors(), GlobalConfiguration.Configuration.Services.GetApiExplorer(), loggerFactory); ActuatorConfigurator.UseMetricsActuator(configuration, loggerFactory); }
public static void ConfigureManagementActuators(IConfiguration configuration, ILoggerProvider dynamicLogger, IApiExplorer apiExplorer, ILoggerFactory loggerFactory = null) { ActuatorConfigurator.UseCloudFoundryActuators(configuration, dynamicLogger, GetHealthContributors(configuration), apiExplorer, loggerFactory); // You can individually configure actuators as shown below if you don't want all of them //ActuatorConfigurator.UseCloudFoundrySecurity(configuration, null, loggerFactory); //ActuatorConfigurator.UseCloudFoundryActuator(configuration, loggerFactory); //ActuatorConfigurator.UseHealthActuator(configuration, null, GetHealthContributors(configuration), loggerFactory); //ActuatorConfigurator.UseHeapDumpActuator(configuration, null, loggerFactory); //ActuatorConfigurator.UseThreadDumpActuator(configuration, null, loggerFactory); //ActuatorConfigurator.UseInfoActuator(configuration, null, loggerFactory); //ActuatorConfigurator.UseLoggerActuator(configuration, dynamicLogger, loggerFactory); //ActuatorConfigurator.UseTraceActuator(configuration, null, loggerFactory); //ActuatorConfigurator.UseMappingsActuator(configuration, apiExplorer, loggerFactory); // Uncomment if you want to enable metrics actuator endpoint, it's not enabled by default ActuatorConfigurator.UseMetricsActuator(configuration, loggerFactory); }
public static void ConfigureManagementActuators(IConfiguration configuration, ILoggerProvider dynamicLogger, IApiExplorer apiExplorer, ILoggerFactory loggerFactory = null) { ActuatorConfigurator.UseCloudFoundryActuators(configuration, dynamicLogger, GetHealthContributors(configuration), apiExplorer, loggerFactory); }