aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Telemetry
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-12-07 16:08:34 -0600
committerJP Dillingham <jp@dillingham.me>2025-12-07 16:08:34 -0600
commitf2460e95bfdcf7c800a2ef2b26af17dcf9210e65 (patch)
treedc1d8728f51fb8786c68cd836766eb9f8cb6f74e /src/slskd/Telemetry
parent280186e2fb4e67bdef85ef15f107194c0aa55e02 (diff)
downloadslskd-f2460e95bfdcf7c800a2ef2b26af17dcf9210e65.tar.gz
Statistics -> Reports
Diffstat (limited to 'src/slskd/Telemetry')
-rw-r--r--src/slskd/Telemetry/API/ReportsController.cs (renamed from src/slskd/Telemetry/API/StatisticsController.cs)30
-rw-r--r--src/slskd/Telemetry/ReportsService.cs (renamed from src/slskd/Telemetry/StatisticsService.cs)12
-rw-r--r--src/slskd/Telemetry/TelemetryService.cs6
3 files changed, 24 insertions, 24 deletions
diff --git a/src/slskd/Telemetry/API/StatisticsController.cs b/src/slskd/Telemetry/API/ReportsController.cs
index b535d31d..da088800 100644
--- a/src/slskd/Telemetry/API/StatisticsController.cs
+++ b/src/slskd/Telemetry/API/ReportsController.cs
@@ -1,4 +1,4 @@
-// <copyright file="StatisticsController.cs" company="slskd Team">
+// <copyright file="ReportsController.cs" company="slskd Team">
// Copyright (c) slskd Team. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
@@ -28,25 +28,25 @@ using Serilog;
using Soulseek;
/// <summary>
-/// Statistics.
+/// Reports.
/// </summary>
[Route("api/v{version:apiVersion}/telemetry/[controller]")]
[Tags("Telemetry")]
[ApiVersion("0")]
[ApiController]
[Produces("application/json")]
-public class StatisticsController : ControllerBase
+public class ReportsController : ControllerBase
{
/// <summary>
- /// Initializes a new instance of the <see cref="StatisticsController"/> class.
+ /// Initializes a new instance of the <see cref="ReportsController"/> class.
/// </summary>
- public StatisticsController(TelemetryService telemetryService)
+ public ReportsController(TelemetryService telemetryService)
{
Telemetry = telemetryService;
}
private TelemetryService Telemetry { get; }
- private ILogger Log { get; } = Serilog.Log.ForContext<MetricsController>();
+ private ILogger Log { get; } = Serilog.Log.ForContext<ReportsController>();
/// <summary>
/// Gets a summary of all transfer activity over the specified timeframe, grouped by direction and final state.
@@ -94,7 +94,7 @@ public class StatisticsController : ControllerBase
try
{
- return Ok(Telemetry.Statistics.GetTransferSummary(
+ return Ok(Telemetry.Reports.GetTransferSummary(
start: start.Value,
end: end,
direction: transferDirection,
@@ -171,7 +171,7 @@ public class StatisticsController : ControllerBase
try
{
- return Ok(Telemetry.Statistics.GetTransferHistogram(
+ return Ok(Telemetry.Reports.GetTransferHistogram(
start: start.Value,
end: end.Value,
interval: intervalTimeSpan,
@@ -253,7 +253,7 @@ public class StatisticsController : ControllerBase
try
{
- return Ok(Telemetry.Statistics.GetTransferLeaderboard(
+ return Ok(Telemetry.Reports.GetTransferLeaderboard(
direction: parsedDirection,
start: start.Value,
end: end,
@@ -322,20 +322,20 @@ public class StatisticsController : ControllerBase
{
var results = new Dictionary<TransferDirection, UserDirectionTransferSummary>();
- var summary = Telemetry.Statistics.GetTransferSummary(start, end, username: username);
+ var summary = Telemetry.Reports.GetTransferSummary(start, end, username: username);
results.Add(TransferDirection.Upload, new UserDirectionTransferSummary
{
Summary = summary[TransferDirection.Upload],
Statistics = GetStatistics(summary[TransferDirection.Upload]),
- Exceptions = Telemetry.Statistics.GetTransferExceptionsPareto(TransferDirection.Upload, start, end, username: username, limit: 25, offset: 0),
+ Exceptions = Telemetry.Reports.GetTransferExceptionsPareto(TransferDirection.Upload, start, end, username: username, limit: 25, offset: 0),
});
results.Add(TransferDirection.Download, new UserDirectionTransferSummary
{
Summary = summary[TransferDirection.Download],
Statistics = GetStatistics(summary[TransferDirection.Download]),
- Exceptions = Telemetry.Statistics.GetTransferExceptionsPareto(TransferDirection.Download, start, end, username: username, limit: 25, offset: 0),
+ Exceptions = Telemetry.Reports.GetTransferExceptionsPareto(TransferDirection.Download, start, end, username: username, limit: 25, offset: 0),
});
return Ok(results);
@@ -410,7 +410,7 @@ public class StatisticsController : ControllerBase
try
{
- return Ok(Telemetry.Statistics.GetTransferExceptions(
+ return Ok(Telemetry.Reports.GetTransferExceptions(
direction: parsedDirection,
start: start.Value,
end: end.Value,
@@ -482,7 +482,7 @@ public class StatisticsController : ControllerBase
try
{
- return Ok(Telemetry.Statistics.GetTransferExceptionsPareto(
+ return Ok(Telemetry.Reports.GetTransferExceptionsPareto(
direction: parsedDirection,
start: start.Value,
end: end.Value,
@@ -541,7 +541,7 @@ public class StatisticsController : ControllerBase
try
{
- return Ok(Telemetry.Statistics.GetTransferDirectoryFrequency(
+ return Ok(Telemetry.Reports.GetTransferDirectoryFrequency(
start: start,
end: end,
username: username,
diff --git a/src/slskd/Telemetry/StatisticsService.cs b/src/slskd/Telemetry/ReportsService.cs
index 53b543f4..da325dc0 100644
--- a/src/slskd/Telemetry/StatisticsService.cs
+++ b/src/slskd/Telemetry/ReportsService.cs
@@ -1,4 +1,4 @@
-// <copyright file="StatisticsService.cs" company="slskd Team">
+// <copyright file="ReportsService.cs" company="slskd Team">
// Copyright (c) slskd Team. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
@@ -26,20 +26,20 @@ using Serilog;
using Soulseek;
/// <summary>
-/// Statistics.
+/// Reports.
/// </summary>
-public class StatisticsService
+public class ReportsService
{
/// <summary>
- /// Initializes a new instance of the <see cref="StatisticsService"/> class.
+ /// Initializes a new instance of the <see cref="ReportsService"/> class.
/// </summary>
- public StatisticsService(ConnectionStringDictionary connectionStringDictionary)
+ public ReportsService(ConnectionStringDictionary connectionStringDictionary)
{
ConnectionStrings = connectionStringDictionary;
}
private ConnectionStringDictionary ConnectionStrings { get; }
- private ILogger Log { get; } = Serilog.Log.ForContext<MetricsController>();
+ private ILogger Log { get; } = Serilog.Log.ForContext<ReportsService>();
/// <summary>
/// Returns a summary of all transfer data grouped by direction and final transfer state. Includes only
diff --git a/src/slskd/Telemetry/TelemetryService.cs b/src/slskd/Telemetry/TelemetryService.cs
index f0914fb8..e122cbe4 100644
--- a/src/slskd/Telemetry/TelemetryService.cs
+++ b/src/slskd/Telemetry/TelemetryService.cs
@@ -19,12 +19,12 @@ namespace slskd.Telemetry;
public class TelemetryService
{
- public TelemetryService(PrometheusService prometheusService, StatisticsService statisticsService)
+ public TelemetryService(PrometheusService prometheusService, ReportsService reportsService)
{
Prometheus = prometheusService;
- Statistics = statisticsService;
+ Reports = reportsService;
}
public PrometheusService Prometheus { get; }
- public StatisticsService Statistics { get; }
+ public ReportsService Reports { get; }
} \ No newline at end of file