From 744cfbe4a692d9c821033f20829e9f0b4db93858 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Tue, 15 Mar 2022 13:12:59 +1000 Subject: [PATCH 1/5] Dev version bump [skip ci] --- src/Seq.Api/Seq.Api.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Seq.Api/Seq.Api.csproj b/src/Seq.Api/Seq.Api.csproj index caa9edf..a478cb2 100644 --- a/src/Seq.Api/Seq.Api.csproj +++ b/src/Seq.Api/Seq.Api.csproj @@ -1,7 +1,7 @@ Client library for the Seq HTTP API. - 2022.1.0 + 2022.1.1 Datalust;Contributors netstandard2.0;net6.0 true From bb7c7615d199611f8e60f97d7446fdee8fdcda5f Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Tue, 17 May 2022 09:27:56 +1000 Subject: [PATCH 2/5] update the events snippet --- README.md | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 51a4d52..75e5867 100644 --- a/README.md +++ b/README.md @@ -49,37 +49,15 @@ See the [signal-copy app](https://github.com/datalust/seq-api/blob/main/example/ Seq internally limits the resources a query is allowed to consume. The query methods on `SeqConnection.Events` include a _status_ with each result set - a `Partial` status indicates that further results must be retrieved. -The snippet below demonstrates paging through results to retrieve the complete set. +The snippet below demonstrates lazily enumerating through results to retrieve the complete set. ```csharp -string lastReadEventId = null; - -while(true) -{ - var resultSet = await connection.Events.InSignalAsync( - filter: "Environment = 'Test'", - render: true, - afterId: lastReadEventId); - - foreach (var evt in resultSet.Events) - Console.WriteLine(evt.RenderedMessage); - - if (resultSet.Statistics.Status == ResultSetStatus.Complete) - break; - - lastReadEventId = resultSet.Statistics.LastReadEventId; -} -``` - -If the result set is expected to be small, `ListAsync()` will buffer results and return a complete list: - -```csharp -var resultSet = await connection.Events.ListAsync( +var resultSet = await connection.Events.EnumerateAsync( filter: "Environment = 'Test'", render: true, count: 1000); - -foreach (var evt in resultSet) + +await foreach (var evt in resultSet) Console.WriteLine(evt.RenderedMessage); ``` From 075edfaf5521ac18fd30bac08567fc0558c00b41 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Thu, 12 Jan 2023 15:37:37 +1000 Subject: [PATCH 3/5] Update for Seq 2023.1 - Update dependencies - Remove obsolete direct app installation methods - Remove obsolete cache metrics/update query counter metrics to match 2023.1 semantics - Remove obsolete query execution stats --- .../Data/QueryExecutionStatisticsPart.cs | 18 +---------- .../Model/Diagnostics/ServerMetricsEntity.cs | 32 +------------------ src/Seq.Api/Model/Shared/StatisticsPart.cs | 11 ------- .../Model/Users/SearchHistoryItemPart.cs | 2 +- .../ResourceGroups/AppsResourceGroup.cs | 22 ------------- src/Seq.Api/Seq.Api.csproj | 12 ++++--- 6 files changed, 10 insertions(+), 87 deletions(-) diff --git a/src/Seq.Api/Model/Data/QueryExecutionStatisticsPart.cs b/src/Seq.Api/Model/Data/QueryExecutionStatisticsPart.cs index ac3f6d7..20b9f04 100644 --- a/src/Seq.Api/Model/Data/QueryExecutionStatisticsPart.cs +++ b/src/Seq.Api/Model/Data/QueryExecutionStatisticsPart.cs @@ -19,25 +19,9 @@ namespace Seq.Api.Model.Data /// public class QueryExecutionStatisticsPart { - /// - /// The number of events inspected in the course of computing the query result. This will - /// not include events that could be skipped based on index information or text pre-filtering. - /// - public ulong ScannedEventCount { get; set; } - - /// - /// The number of events that contributed to the query result. - /// - public ulong MatchingEventCount { get; set; } - - /// - /// Whether the query needed to search disk-backed storage. - /// - public bool UncachedSegmentsScanned { get; set; } - /// /// The server-side elapsed time taken to compute the query result. /// public double ElapsedMilliseconds { get; set; } } -} \ No newline at end of file +} diff --git a/src/Seq.Api/Model/Diagnostics/ServerMetricsEntity.cs b/src/Seq.Api/Model/Diagnostics/ServerMetricsEntity.cs index 09928ca..94a4d5f 100644 --- a/src/Seq.Api/Model/Diagnostics/ServerMetricsEntity.cs +++ b/src/Seq.Api/Model/Diagnostics/ServerMetricsEntity.cs @@ -28,26 +28,6 @@ public class ServerMetricsEntity : Entity public ServerMetricsEntity() { } - - /// - /// The start time in UTC of the events in the memory cache. - /// - public DateTime? EventStoreCacheStart { get; set; } - - /// - /// The end time in UTC of the events in the memory cache. - /// - public DateTime? EventStoreCacheEnd { get; set; } - - /// - /// The number of days of events able to fit in the memory cache. - /// - public double EventStoreDaysCached { get; set; } - - /// - /// The number of events able to fit in the memory cache. - /// - public int EventStoreEventsCached { get; set; } /// /// Bytes of free space remaining on the disk used for event storage. @@ -100,18 +80,8 @@ public ServerMetricsEntity() public double SystemMemoryUtilization { get; set; } /// - /// The number of SQL-style queries executed in the past minute. + /// The number of queries and searches executed in the past minute. /// public int QueriesPerMinute { get; set; } - - /// - /// The number of time slices from SQL-style queries that could be read from cache in the past minute. - /// - public int QueryCacheTimeSliceHitsPerMinute { get; set; } - - /// - /// The number of cached SQL query time slices invalidated in the past minute. - /// - public int QueryCacheInvalidationsPerMinute { get; set; } } } diff --git a/src/Seq.Api/Model/Shared/StatisticsPart.cs b/src/Seq.Api/Model/Shared/StatisticsPart.cs index a560132..8dc6c7b 100644 --- a/src/Seq.Api/Model/Shared/StatisticsPart.cs +++ b/src/Seq.Api/Model/Shared/StatisticsPart.cs @@ -26,12 +26,6 @@ public class StatisticsPart /// public TimeSpan Elapsed { get; set; } - /// - /// The number of events that were scanned in the search (and were not - /// able to be excluded based on index information or pre-filtering). - /// - public ulong ScannedEventCount { get; set; } - /// /// The id of the last event inspected in the search. /// @@ -46,10 +40,5 @@ public class StatisticsPart /// Status of the result set. /// public ResultSetStatus Status { get; set; } - - /// - /// Whether it was necessary to read from disk in processing this request. - /// - public bool UncachedSegmentsScanned { get; set; } } } diff --git a/src/Seq.Api/Model/Users/SearchHistoryItemPart.cs b/src/Seq.Api/Model/Users/SearchHistoryItemPart.cs index 6465910..ae8199e 100644 --- a/src/Seq.Api/Model/Users/SearchHistoryItemPart.cs +++ b/src/Seq.Api/Model/Users/SearchHistoryItemPart.cs @@ -31,4 +31,4 @@ public class SearchHistoryItemPart /// public SearchHistoryItemAction Action { get; set; } } -} +} \ No newline at end of file diff --git a/src/Seq.Api/ResourceGroups/AppsResourceGroup.cs b/src/Seq.Api/ResourceGroups/AppsResourceGroup.cs index 727c555..6d18374 100644 --- a/src/Seq.Api/ResourceGroups/AppsResourceGroup.cs +++ b/src/Seq.Api/ResourceGroups/AppsResourceGroup.cs @@ -63,17 +63,6 @@ public async Task TemplateAsync(CancellationToken cancellationToken = return await GroupGetAsync("Template", cancellationToken: cancellationToken).ConfigureAwait(false); } - /// - /// Add a new app. - /// - /// The app to add. - /// A allowing the operation to be canceled. - /// The app, with server-allocated properties such as initialized. - public async Task AddAsync(AppEntity entity, CancellationToken cancellationToken = default) - { - return await GroupCreateAsync(entity, cancellationToken: cancellationToken).ConfigureAwait(false); - } - /// /// Remove an existing app. /// @@ -85,17 +74,6 @@ public async Task RemoveAsync(AppEntity entity, CancellationToken cancellationTo await Client.DeleteAsync(entity, "Self", entity, cancellationToken: cancellationToken).ConfigureAwait(false); } - /// - /// Update an existing app. - /// - /// The app to update. - /// A allowing the operation to be canceled. - /// A task indicating completion. - public async Task UpdateAsync(AppEntity entity, CancellationToken cancellationToken = default) - { - await Client.PutAsync(entity, "Self", entity, cancellationToken: cancellationToken).ConfigureAwait(false); - } - /// /// Create a new app by installing a NuGet package. /// diff --git a/src/Seq.Api/Seq.Api.csproj b/src/Seq.Api/Seq.Api.csproj index a478cb2..3d8c5cf 100644 --- a/src/Seq.Api/Seq.Api.csproj +++ b/src/Seq.Api/Seq.Api.csproj @@ -1,7 +1,7 @@ Client library for the Seq HTTP API. - 2022.1.1 + 2023.1.0 Datalust;Contributors netstandard2.0;net6.0 true @@ -15,13 +15,15 @@ - - + + - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive + From 895d77410c314b764391ef582891065548820522 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Thu, 12 Jan 2023 15:38:46 +1000 Subject: [PATCH 4/5] Remove Gitter link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 75e5867..ba2750c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Seq HTTP API Client [![Build status](https://ci.appveyor.com/api/projects/status/bhtx25hyqmmdqhvt?svg=true)](https://ci.appveyor.com/project/datalust/seq-api) [![NuGet Pre Release](https://img.shields.io/nuget/vpre/Seq.Api.svg)](https://nuget.org/packages/seq.api) [![Join the chat at https://gitter.im/datalust/seq](https://img.shields.io/gitter/room/datalust/seq.svg)](https://gitter.im/datalust/seq) +# Seq HTTP API Client [![Build status](https://ci.appveyor.com/api/projects/status/bhtx25hyqmmdqhvt?svg=true)](https://ci.appveyor.com/project/datalust/seq-api) [![NuGet Pre Release](https://img.shields.io/nuget/vpre/Seq.Api.svg)](https://nuget.org/packages/seq.api) This library includes: From f792ee93a9f91858b42971589886c2041fd985e2 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Mon, 16 Jan 2023 12:01:57 +1000 Subject: [PATCH 5/5] Update appveyor.yml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index d07e56f..c59da7b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,7 +9,7 @@ artifacts: deploy: - provider: NuGet api_key: - secure: 29fNPaMVCbTVioV8D4/8PbTWEU3xwAuN4iFxqDcI8T60kfNzE4YvrvCPdXO9gl2q + secure: lfUaaMDeL9aQf/rG4TLmWWYBF1oj1uaJtWnmXoy3QNyauOuJIkKRjX7ZH9p/TGKM skip_symbols: true on: branch: /^(main|dev)$/