···11using System.Diagnostics;
22using System.Diagnostics.Metrics;
33+using Iceshrimp.Backend.Core.Extensions;
34using Iceshrimp.Shared.Helpers;
4556namespace Iceshrimp.Backend.Core.Helpers;
···1011/// It is recommended to use a custom type to hold references for ActivitySource.
1112/// This avoids possible type collisions with other components in the DI container.
1213/// </summary>
1313-public static class Telemetry
1414+public sealed class Telemetry : IDisposable, ISingletonService
1415{
1516 public const string Source = "Iceshrimp.NET";
16171718 public static ActivitySource ActivitySource { get; } = new(Source, VersionHelpers.VersionInfo.Value.Version);
1819 public static Meter Meter { get; } = new(Source, VersionHelpers.VersionInfo.Value.Version);
19202020- public static void Dispose()
2121+ public void Dispose()
2122 {
2223 ActivitySource.Dispose();
2324 Meter.Dispose();