Skip to content

Commit 3399980

Browse files
authored
Merge pull request #117 from datalust/dev
2023.1.0 Release
2 parents 4b8e1b4 + 8f1f184 commit 3399980

File tree

8 files changed

+16
-115
lines changed

8 files changed

+16
-115
lines changed

README.md

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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)
1+
# 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)
22

33
This library includes:
44

@@ -49,37 +49,15 @@ See the [signal-copy app](https://github.com/datalust/seq-api/blob/main/example/
4949

5050
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.
5151

52-
The snippet below demonstrates paging through results to retrieve the complete set.
52+
The snippet below demonstrates lazily enumerating through results to retrieve the complete set.
5353

5454
```csharp
55-
string lastReadEventId = null;
56-
57-
while(true)
58-
{
59-
var resultSet = await connection.Events.InSignalAsync(
60-
filter: "Environment = 'Test'",
61-
render: true,
62-
afterId: lastReadEventId);
63-
64-
foreach (var evt in resultSet.Events)
65-
Console.WriteLine(evt.RenderedMessage);
66-
67-
if (resultSet.Statistics.Status == ResultSetStatus.Complete)
68-
break;
69-
70-
lastReadEventId = resultSet.Statistics.LastReadEventId;
71-
}
72-
```
73-
74-
If the result set is expected to be small, `ListAsync()` will buffer results and return a complete list:
75-
76-
```csharp
77-
var resultSet = await connection.Events.ListAsync(
55+
var resultSet = await connection.Events.EnumerateAsync(
7856
filter: "Environment = 'Test'",
7957
render: true,
8058
count: 1000);
81-
82-
foreach (var evt in resultSet)
59+
60+
await foreach (var evt in resultSet)
8361
Console.WriteLine(evt.RenderedMessage);
8462
```
8563

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ artifacts:
99
deploy:
1010
- provider: NuGet
1111
api_key:
12-
secure: 29fNPaMVCbTVioV8D4/8PbTWEU3xwAuN4iFxqDcI8T60kfNzE4YvrvCPdXO9gl2q
12+
secure: lfUaaMDeL9aQf/rG4TLmWWYBF1oj1uaJtWnmXoy3QNyauOuJIkKRjX7ZH9p/TGKM
1313
skip_symbols: true
1414
on:
1515
branch: /^(main|dev)$/

src/Seq.Api/Model/Data/QueryExecutionStatisticsPart.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,9 @@ namespace Seq.Api.Model.Data
1919
/// </summary>
2020
public class QueryExecutionStatisticsPart
2121
{
22-
/// <summary>
23-
/// The number of events inspected in the course of computing the query result. This will
24-
/// not include events that could be skipped based on index information or text pre-filtering.
25-
/// </summary>
26-
public ulong ScannedEventCount { get; set; }
27-
28-
/// <summary>
29-
/// The number of events that contributed to the query result.
30-
/// </summary>
31-
public ulong MatchingEventCount { get; set; }
32-
33-
/// <summary>
34-
/// Whether the query needed to search disk-backed storage.
35-
/// </summary>
36-
public bool UncachedSegmentsScanned { get; set; }
37-
3822
/// <summary>
3923
/// The server-side elapsed time taken to compute the query result.
4024
/// </summary>
4125
public double ElapsedMilliseconds { get; set; }
4226
}
43-
}
27+
}

src/Seq.Api/Model/Diagnostics/ServerMetricsEntity.cs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,6 @@ public class ServerMetricsEntity : Entity
2828
public ServerMetricsEntity()
2929
{
3030
}
31-
32-
/// <summary>
33-
/// The start time in UTC of the events in the memory cache.
34-
/// </summary>
35-
public DateTime? EventStoreCacheStart { get; set; }
36-
37-
/// <summary>
38-
/// The end time in UTC of the events in the memory cache.
39-
/// </summary>
40-
public DateTime? EventStoreCacheEnd { get; set; }
41-
42-
/// <summary>
43-
/// The number of days of events able to fit in the memory cache.
44-
/// </summary>
45-
public double EventStoreDaysCached { get; set; }
46-
47-
/// <summary>
48-
/// The number of events able to fit in the memory cache.
49-
/// </summary>
50-
public int EventStoreEventsCached { get; set; }
5131

5232
/// <summary>
5333
/// Bytes of free space remaining on the disk used for event storage.
@@ -100,18 +80,8 @@ public ServerMetricsEntity()
10080
public double SystemMemoryUtilization { get; set; }
10181

10282
/// <summary>
103-
/// The number of SQL-style queries executed in the past minute.
83+
/// The number of queries and searches executed in the past minute.
10484
/// </summary>
10585
public int QueriesPerMinute { get; set; }
106-
107-
/// <summary>
108-
/// The number of time slices from SQL-style queries that could be read from cache in the past minute.
109-
/// </summary>
110-
public int QueryCacheTimeSliceHitsPerMinute { get; set; }
111-
112-
/// <summary>
113-
/// The number of cached SQL query time slices invalidated in the past minute.
114-
/// </summary>
115-
public int QueryCacheInvalidationsPerMinute { get; set; }
11686
}
11787
}

src/Seq.Api/Model/Shared/StatisticsPart.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ public class StatisticsPart
2626
/// </summary>
2727
public TimeSpan Elapsed { get; set; }
2828

29-
/// <summary>
30-
/// The number of events that were scanned in the search (and were not
31-
/// able to be excluded based on index information or pre-filtering).
32-
/// </summary>
33-
public ulong ScannedEventCount { get; set; }
34-
3529
/// <summary>
3630
/// The id of the last event inspected in the search.
3731
/// </summary>
@@ -46,10 +40,5 @@ public class StatisticsPart
4640
/// Status of the result set.
4741
/// </summary>
4842
public ResultSetStatus Status { get; set; }
49-
50-
/// <summary>
51-
/// Whether it was necessary to read from disk in processing this request.
52-
/// </summary>
53-
public bool UncachedSegmentsScanned { get; set; }
5443
}
5544
}

src/Seq.Api/Model/Users/SearchHistoryItemPart.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ public class SearchHistoryItemPart
3131
/// </summary>
3232
public SearchHistoryItemAction Action { get; set; }
3333
}
34-
}
34+
}

src/Seq.Api/ResourceGroups/AppsResourceGroup.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,6 @@ public async Task<AppEntity> TemplateAsync(CancellationToken cancellationToken =
6363
return await GroupGetAsync<AppEntity>("Template", cancellationToken: cancellationToken).ConfigureAwait(false);
6464
}
6565

66-
/// <summary>
67-
/// Add a new app.
68-
/// </summary>
69-
/// <param name="entity">The app to add.</param>
70-
/// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
71-
/// <returns>The app, with server-allocated properties such as <see cref="Entity.Id"/> initialized.</returns>
72-
public async Task<AppEntity> AddAsync(AppEntity entity, CancellationToken cancellationToken = default)
73-
{
74-
return await GroupCreateAsync<AppEntity, AppEntity>(entity, cancellationToken: cancellationToken).ConfigureAwait(false);
75-
}
76-
7766
/// <summary>
7867
/// Remove an existing app.
7968
/// </summary>
@@ -85,17 +74,6 @@ public async Task RemoveAsync(AppEntity entity, CancellationToken cancellationTo
8574
await Client.DeleteAsync(entity, "Self", entity, cancellationToken: cancellationToken).ConfigureAwait(false);
8675
}
8776

88-
/// <summary>
89-
/// Update an existing app.
90-
/// </summary>
91-
/// <param name="entity">The app to update.</param>
92-
/// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
93-
/// <returns>A task indicating completion.</returns>
94-
public async Task UpdateAsync(AppEntity entity, CancellationToken cancellationToken = default)
95-
{
96-
await Client.PutAsync(entity, "Self", entity, cancellationToken: cancellationToken).ConfigureAwait(false);
97-
}
98-
9977
/// <summary>
10078
/// Create a new app by installing a NuGet package.
10179
/// </summary>

src/Seq.Api/Seq.Api.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>Client library for the Seq HTTP API.</Description>
4-
<VersionPrefix>2022.1.0</VersionPrefix>
4+
<VersionPrefix>2023.1.0</VersionPrefix>
55
<Authors>Datalust;Contributors</Authors>
66
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -15,13 +15,15 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18-
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
19-
<PackageReference Include="Tavis.UriTemplates" Version="1.1.1" />
18+
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
19+
<PackageReference Include="Tavis.UriTemplates" Version="2.0.0" />
2020
</ItemGroup>
2121

2222
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
23-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
24-
<PackageReference Include="Nullable" Version="1.3.0" PrivateAssets="all" />
23+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
24+
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all">
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
</PackageReference>
2527
</ItemGroup>
2628

2729
<ItemGroup>

0 commit comments

Comments
 (0)