Ok, everything seems to be working except for the api explorer so now can turn back to that. (api explorer issues are caused by the api versioning system as removing it fixes the missing api explorer routes
This commit is contained in:
@@ -207,45 +207,45 @@ namespace AyaNova
|
||||
.UseUrls(ServerBootConfig.AYANOVA_USE_URLS)//default port and urls, set first can be overridden by any later setting here
|
||||
.UseConfiguration(configuration)//support command line override of port (dotnet run urls=http://*:8081)
|
||||
.UseIISIntegration()//support IIS integration just in case, it appears here to override prior settings if necessary (port)
|
||||
// .ConfigureMetricsWithDefaults(builder =>
|
||||
// {
|
||||
// if (ServerBootConfig.AYANOVA_METRICS_USE_INFLUXDB)
|
||||
// {
|
||||
// builder.Report.ToInfluxDb(
|
||||
// options =>
|
||||
// {
|
||||
.ConfigureMetricsWithDefaults(builder =>
|
||||
{
|
||||
if (ServerBootConfig.AYANOVA_METRICS_USE_INFLUXDB)
|
||||
{
|
||||
builder.Report.ToInfluxDb(
|
||||
options =>
|
||||
{
|
||||
|
||||
// options.InfluxDb.BaseUri = new Uri(ServerBootConfig.AYANOVA_METRICS_INFLUXDB_BASEURL);
|
||||
// options.InfluxDb.Database = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_DBNAME;
|
||||
// if (!string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_METRICS_INFLUXDB_CONSISTENCY))
|
||||
// {
|
||||
// options.InfluxDb.Consistenency = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_CONSISTENCY;
|
||||
// }
|
||||
// options.InfluxDb.UserName = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_USERNAME;
|
||||
// options.InfluxDb.Password = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_PASSWORD;
|
||||
// if (!string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_METRICS_INFLUXDB_RETENTION_POLICY))
|
||||
// {
|
||||
// options.InfluxDb.RetentionPolicy = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_RETENTION_POLICY;
|
||||
// }
|
||||
options.InfluxDb.BaseUri = new Uri(ServerBootConfig.AYANOVA_METRICS_INFLUXDB_BASEURL);
|
||||
options.InfluxDb.Database = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_DBNAME;
|
||||
if (!string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_METRICS_INFLUXDB_CONSISTENCY))
|
||||
{
|
||||
options.InfluxDb.Consistenency = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_CONSISTENCY;
|
||||
}
|
||||
options.InfluxDb.UserName = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_USERNAME;
|
||||
options.InfluxDb.Password = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_PASSWORD;
|
||||
if (!string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_METRICS_INFLUXDB_RETENTION_POLICY))
|
||||
{
|
||||
options.InfluxDb.RetentionPolicy = ServerBootConfig.AYANOVA_METRICS_INFLUXDB_RETENTION_POLICY;
|
||||
}
|
||||
|
||||
// options.InfluxDb.CreateDataBaseIfNotExists = true;
|
||||
// options.HttpPolicy.BackoffPeriod = TimeSpan.FromSeconds(30);
|
||||
// options.HttpPolicy.FailuresBeforeBackoff = 5;
|
||||
// options.HttpPolicy.Timeout = TimeSpan.FromSeconds(10);
|
||||
// //options.MetricsOutputFormatter = new App.Metrics.Formatters.Json.MetricsJsonOutputFormatter();
|
||||
// //options.Filter = filter;
|
||||
// options.FlushInterval = TimeSpan.FromSeconds(20);
|
||||
// });
|
||||
// }
|
||||
options.InfluxDb.CreateDataBaseIfNotExists = true;
|
||||
options.HttpPolicy.BackoffPeriod = TimeSpan.FromSeconds(30);
|
||||
options.HttpPolicy.FailuresBeforeBackoff = 5;
|
||||
options.HttpPolicy.Timeout = TimeSpan.FromSeconds(10);
|
||||
//options.MetricsOutputFormatter = new App.Metrics.Formatters.Json.MetricsJsonOutputFormatter();
|
||||
//options.Filter = filter;
|
||||
options.FlushInterval = TimeSpan.FromSeconds(20);
|
||||
});
|
||||
}
|
||||
|
||||
// })
|
||||
// .UseMetricsEndpoints(opt =>
|
||||
// {
|
||||
// opt.EnvironmentInfoEndpointEnabled = false;
|
||||
// opt.MetricsEndpointEnabled = false;
|
||||
// opt.MetricsTextEndpointEnabled = false;
|
||||
// })
|
||||
// .UseMetrics()
|
||||
})
|
||||
.UseMetricsEndpoints(opt =>
|
||||
{
|
||||
opt.EnvironmentInfoEndpointEnabled = false;
|
||||
opt.MetricsEndpointEnabled = false;
|
||||
opt.MetricsTextEndpointEnabled = false;
|
||||
})
|
||||
.UseMetrics()
|
||||
.UseStartup<Startup>()
|
||||
.ConfigureLogging((context, logging) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user