mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-11 12:46:20 +00:00
Merge pull request #2985 from sparky8251/prometheus
Add Prometheus exporters
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.3" />
|
||||
<PackageReference Include="Mono.Nat" Version="2.0.1" />
|
||||
<PackageReference Include="prometheus-net.DotNetRuntime" Version="3.3.1" />
|
||||
<PackageReference Include="ServiceStack.Text.Core" Version="5.8.0" />
|
||||
<PackageReference Include="sharpcompress" Version="0.25.0" />
|
||||
<PackageReference Include="SQLitePCL.pretty.netstandard" Version="2.1.0" />
|
||||
|
||||
Reference in New Issue
Block a user