Added option to disable metrics collection and defaulted it to off

This commit is contained in:
sparky8251
2020-04-26 11:28:17 -04:00
parent 233337256f
commit 68c7a914c3
7 changed files with 56 additions and 7 deletions

View File

@@ -106,6 +106,7 @@ using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
using Prometheus.DotNetRuntime;
namespace Emby.Server.Implementations
{
@@ -259,6 +260,12 @@ namespace Emby.Server.Implementations
_startupOptions = options;
// Initialize runtime stat collection
if (ServerConfigurationManager.Configuration.EnableMetrics)
{
IDisposable collector = DotNetRuntimeStatsBuilder.Default().StartCollecting();
}
fileSystem.AddShortcutHandler(new MbLinkShortcutHandler(fileSystem));
_networkManager.NetworkChanged += OnNetworkChanged;