aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-04-29 11:36:05 +0200
committerGitHub <noreply@github.com>2020-04-29 11:36:05 +0200
commit690fb65cd89d619cab168a871cbdfdfd12120009 (patch)
tree6258f5ce76c15775ae940ab31d9ae686d5d34492 /Emby.Server.Implementations/ApplicationHost.cs
parentaff65adca93ef82d6c5d7765d18a69f7fd164f7c (diff)
parente3a42a8fe93727d43d02a9b560a53661f12230b8 (diff)
Merge pull request #2985 from sparky8251/prometheus
Add Prometheus exporters
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 4d906a1bf..ffc916b98 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)
+ {
+ DotNetRuntimeStatsBuilder.Default().StartCollecting();
+ }
+
fileSystem.AddShortcutHandler(new MbLinkShortcutHandler(fileSystem));
_networkManager.NetworkChanged += OnNetworkChanged;