Skip to content

Commit 85d9acd

Browse files
authored
Merge pull request #133 from datalust/dev
2024.2.0 Release
2 parents 98cdcd2 + 6aad9ee commit 85d9acd

File tree

8 files changed

+36
-19
lines changed

8 files changed

+36
-19
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,3 +253,5 @@ paket-files/
253253

254254
.vscode/
255255
*.orig
256+
257+
.DS_Store

example/SeqEnableAAD/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ static async Task Run(string server, string? username, string? tenantId, string?
5454

5555
var user = await connection.Users.FindCurrentAsync();
5656
var provider = await connection.Settings.FindNamedAsync(SettingName.AuthenticationProvider);
57-
var cid = await connection.Settings.FindNamedAsync(SettingName.AzureADClientId);
58-
var ckey = await connection.Settings.FindNamedAsync(SettingName.AzureADClientKey);
59-
var aut = await connection.Settings.FindNamedAsync(SettingName.AzureADAuthority);
60-
var tid = await connection.Settings.FindNamedAsync(SettingName.AzureADTenantId);
57+
var cid = await connection.Settings.FindNamedAsync(SettingName.EntraIDClientId);
58+
var ckey = await connection.Settings.FindNamedAsync(SettingName.EntraIDClientKey);
59+
var aut = await connection.Settings.FindNamedAsync(SettingName.EntraIDAuthority);
60+
var tid = await connection.Settings.FindNamedAsync(SettingName.EntraIDTenantId);
6161

6262
user.Username = username;
6363
provider.Value = "Azure Active Directory";

seq-api.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{7DCED6
1313
Build.ps1 = Build.ps1
1414
LICENSE = LICENSE
1515
README.md = README.md
16+
.gitignore = .gitignore
1617
EndProjectSection
1718
EndProject
1819
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5E7A565B-A8EE-43E7-A225-5B640A5D29A0}"

src/Seq.Api/Client/SeqApiClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public sealed class SeqApiClient : IDisposable
4242
// Future versions of Seq may not completely support vN-1 features, however
4343
// providing this as an Accept header will ensure what compatibility is available
4444
// can be utilized.
45-
const string SeqApiV9MediaType = "application/vnd.datalust.seq.v9+json";
45+
const string SeqApiV10MediaType = "application/vnd.datalust.seq.v10+json";
4646

4747
readonly CookieContainer _cookies = new();
4848
readonly JsonSerializer _serializer = JsonSerializer.Create(
@@ -106,12 +106,12 @@ public SeqApiClient(string serverUrl, string apiKey = null, Func<CookieContainer
106106
_apiKey = apiKey;
107107

108108
var baseAddress = serverUrl;
109-
if (!baseAddress.EndsWith("/"))
109+
if (!baseAddress.EndsWith("/", StringComparison.Ordinal))
110110
baseAddress += "/";
111111

112112
HttpClient = new HttpClient(httpMessageHandler);
113113
HttpClient.BaseAddress = new Uri(baseAddress);
114-
HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(SeqApiV9MediaType));
114+
HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(SeqApiV10MediaType));
115115

116116
if (_apiKey != null)
117117
HttpClient.DefaultRequestHeaders.Add("X-Seq-ApiKey", _apiKey);

src/Seq.Api/Model/Events/EventEntity.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ public class EventEntity : Entity
8787
/// </summary>
8888
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
8989
public string ParentId { get; set; }
90+
91+
/// <summary>
92+
/// If the event is a span, its kind. This will typically be one of either <c>Client</c>, <c>Server</c>,
93+
/// <c>Producer</c>, <c>Consumer</c>, or <c>Internal</c>. The span kind records how the span relates to its
94+
/// parent or child span within a trace.
95+
/// </summary>
96+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
97+
public string SpanKind { get; set; }
9098

9199
/// <summary>
92100
/// A collection of properties describing the origin of the event, if any. These correspond to resource

src/Seq.Api/Model/Settings/SettingName.cs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum SettingName
2727
{
2828
/// <summary>
2929
/// The authentication provider to use. Allowed values are <c>null</c> (local username/password),
30-
/// <c>"Active Directory"</c>, <c>"Azure Active Directory"</c> and <c>"OpenID Connect"</c>.
30+
/// <c>"Active Directory"</c>, <c>"Microsoft Entra ID"</c> and <c>"OpenID Connect"</c>.
3131
/// </summary>
3232
AuthenticationProvider,
3333

@@ -38,7 +38,7 @@ public enum SettingName
3838
AutomaticAccessADGroup,
3939

4040
/// <summary>
41-
/// If <c>true</c>, Azure Active Directory accounts in the configured tenant will
41+
/// If <c>true</c>, Microsoft Entra ID accounts in the configured tenant will
4242
/// be automatically granted user access to Seq.
4343
/// </summary>
4444
[Obsolete("Use `AutomaticallyProvisionAuthenticatedUsers`.", error: true)]
@@ -51,25 +51,29 @@ public enum SettingName
5151
AutomaticallyProvisionAuthenticatedUsers,
5252

5353
/// <summary>
54-
/// The AAD authority. The default is <c>login.windows.net</c>; government cloud users may
54+
/// The Microsoft Entra ID authority. The default is <c>login.windows.net</c>; government cloud users may
5555
/// require <c>login.microsoftonline.us</c> or similar.
5656
/// </summary>
57-
AzureADAuthority,
57+
// ReSharper disable once InconsistentNaming
58+
EntraIDAuthority,
5859

5960
/// <summary>
60-
/// The Azure Active Directory client id.
61+
/// The Microsoft Entra ID client id.
6162
/// </summary>
62-
AzureADClientId,
63+
// ReSharper disable once InconsistentNaming
64+
EntraIDClientId,
6365

6466
/// <summary>
65-
/// The Azure Active Directory client key.
67+
/// The Microsoft Entra ID client key.
6668
/// </summary>
67-
AzureADClientKey,
69+
// ReSharper disable once InconsistentNaming
70+
EntraIDClientKey,
6871

6972
/// <summary>
70-
/// The Azure Active Directory tenant id.
73+
/// The Microsoft Entra ID tenant id.
7174
/// </summary>
72-
AzureADTenantId,
75+
// ReSharper disable once InconsistentNaming
76+
EntraIDTenantId,
7377

7478
/// <summary>
7579
/// Server-local filesystem location where automatic backups are stored.
@@ -170,7 +174,7 @@ public enum SettingName
170174
/// If using OpenID Connect, overrides the URI of the provider's metadata endpoint.
171175
/// </summary>
172176
OpenIdConnectMetadataAddress,
173-
177+
174178
/// <summary>
175179
/// If <c>true</c>, ingestion requests incoming via HTTP must be authenticated using an API key or
176180
/// logged-in user session. Only effective when <see cref="IsAuthenticationEnabled"/> is <c>true</c>.

src/Seq.Api/Seq.Api.csproj

Lines changed: 1 addition & 1 deletion
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>2024.1.0</VersionPrefix>
4+
<VersionPrefix>2024.2.0</VersionPrefix>
55
<Authors>Datalust;Contributors</Authors>
66
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
77
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

test/Seq.Api.Tests/SeqConnectionTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ public void WhenConstructedTheHandlerConfigurationCallbackIsCalled()
99
{
1010
var callCount = 0;
1111

12+
#pragma warning disable CS0618 // Type or member is obsolete
1213
using var _ = new SeqConnection("https://test.example.com", null, handler => {
1314
Assert.NotNull(handler);
1415
++callCount;
1516
});
17+
#pragma warning restore CS0618 // Type or member is obsolete
1618

1719
Assert.Equal(1, callCount);
1820
}

0 commit comments

Comments
 (0)