aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorsparky8251 <sparky@possumlodge.me>2020-04-26 11:28:17 -0400
committersparky8251 <sparky@possumlodge.me>2020-04-26 11:28:17 -0400
commit68c7a914c3acbd21a9ca879829bf6a670d4cf185 (patch)
treef50c61ce67e6f55bbd6e0bf45d610aa36ecdbe71 /Emby.Server.Implementations/ApplicationHost.cs
parent233337256fc997c05bd6f0093a532cea0d54f227 (diff)
Added option to disable metrics collection and defaulted it to off
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 33aec1a06..7e7b785d8 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -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;