Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
// limitations under the License.

using System;
using System.Collections.Generic;

namespace Seq.Api.Model.Diagnostics
{
/// <summary>
/// Metrics describing the state and performance of the Seq server.
/// </summary>
public class ServerMetricsEntity : Entity
/// <remarks>This information is not preserved across server restarts or fail-over.</remarks>
public class ServerMetricsPart
{
/// <summary>
/// Construct a <see cref="ServerMetricsEntity"/>.
/// Construct a <see cref="ServerMetricsPart"/>.
/// </summary>
public ServerMetricsEntity()
public ServerMetricsPart()
{
}

Expand All @@ -34,6 +34,16 @@ public ServerMetricsEntity()
/// </summary>
public long? EventStoreDiskRemainingBytes { get; set; }

/// <summary>
/// The total time spent indexing the event store in the last 24 hours.
/// </summary>
public TimeSpan EventStoreIndexingTimeLastDay { get; set; }

/// <summary>
/// The total time spent writing events to disk in the last minute.
/// </summary>
public TimeSpan EventStoreWriteTimeLastMinute { get; set; }

/// <summary>
/// The number of events that arrived at the ingestion endpoint in the past minute.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Seq.Api/Model/Indexes/IndexEntity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Seq.Api.Model.Indexes
namespace Seq.Api.Model.Indexes
{
/// <summary>
/// An index over the event stream. May be one of several types discriminated by <see cref="IndexedEntityType"/>.
Expand Down
4 changes: 2 additions & 2 deletions src/Seq.Api/ResourceGroups/DiagnosticsResourceGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ internal DiagnosticsResourceGroup(ILoadResourceGroup connection)
/// </summary>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
/// <returns>Current server metrics.</returns>
public async Task<ServerMetricsEntity> GetServerMetricsAsync(CancellationToken cancellationToken = default)
public async Task<ServerMetricsPart> GetServerMetricsAsync(CancellationToken cancellationToken = default)
{
return await GroupGetAsync<ServerMetricsEntity>("ServerMetrics", cancellationToken: cancellationToken).ConfigureAwait(false);
return await GroupGetAsync<ServerMetricsPart>("ServerMetrics", cancellationToken: cancellationToken).ConfigureAwait(false);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading;
using System.Threading.Tasks;
using Seq.Api.Model;
using Seq.Api.Model.Indexes;
using Seq.Api.Model.Indexing;

namespace Seq.Api.ResourceGroups
Expand Down