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
20 changes: 6 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
# If this file is renamed, the incrementing run attempt number will be reset.

name: CI

# Pull requests only: pushes to `dev` and `main` are built, tested, and published by `publish.yml`.
on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]

env:
CI_BUILD_NUMBER_BASE: ${{ github.run_number }}
CI_TARGET_BRANCH: ${{ github.head_ref || github.ref_name }}
CI_BUILD_NUMBER: ${{ github.run_number }}
CI_TARGET_BRANCH: ${{ github.head_ref }}

jobs:
build:

runs-on: ubuntu-24.04

permissions:
contents: write
contents: read

steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Compute build number
run: |
echo "CI_BUILD_NUMBER=$(($CI_BUILD_NUMBER_BASE+200))" >> $GITHUB_ENV
- name: Build and Publish
- name: Build
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
./Build.ps1
65 changes: 65 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Publishes packages to NuGet.org using trusted publishing. The NuGet.org trusted publishing policy
# identifies this workflow by file name; if this file is renamed, the policy must be updated, and the
# incrementing run number used to version pre-release packages will be reset.

name: Publish

on:
push:
branches: [ "dev", "main" ]

env:
CI_BUILD_NUMBER_BASE: ${{ github.run_number }}
CI_TARGET_BRANCH: ${{ github.ref_name }}

jobs:
publish:

runs-on: ubuntu-24.04

permissions:
# Required for NuGet.org trusted publishing.
id-token: write
# Required for creating GitHub releases.
contents: write

steps:
- uses: actions/checkout@v4
- name: Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.x
- name: Compute build number
shell: bash
run: |
echo "CI_BUILD_NUMBER=$(($CI_BUILD_NUMBER_BASE+500))" >> $GITHUB_ENV
- name: Build
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
shell: pwsh
run: |
./Build.ps1
- name: Log in to NuGet
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push to NuGet
shell: pwsh
run: |
$packages = @(Get-ChildItem ./artifacts/*.nupkg)
if ($packages.Count -eq 0) { throw "No packages found in ./artifacts" }
foreach ($nupkg in $packages) {
dotnet nuget push "$nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json
if ($LASTEXITCODE -ne 0) { throw "Publishing failed" }
}
- name: Create GitHub release
# Builds from `main` are versioned without a pre-release suffix; see `Build.ps1`.
if: github.ref_name == 'main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
$version = ([Xml] (Get-Content ./Directory.Build.props)).Project.PropertyGroup.VersionPrefix
gh release create "v$version" --title "v$version" --target "${{ github.sha }}" --generate-notes (Get-Item ./artifacts/*.nupkg, ./artifacts/*.snupkg)
if ($LASTEXITCODE -ne 0) { throw "Release creation failed" }
18 changes: 0 additions & 18 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,3 @@ foreach ($test in Get-ChildItem test/*.Tests) {
}

Pop-Location

if ($env:NUGET_API_KEY) {
# GitHub Actions will only supply this to branch builds and not PRs. We publish
# builds from any branch this action targets (i.e. main and dev).

Write-Output "build: Publishing NuGet packages"

foreach ($nupkg in Get-ChildItem artifacts/*.nupkg) {
& dotnet nuget push -k $env:NUGET_API_KEY -s https://api.nuget.org/v3/index.json "$nupkg"
if($LASTEXITCODE -ne 0) { throw "Publishing failed" }
}

if (!($suffix)) {
Write-Output "build: Creating release for version $versionPrefix"

iex "gh release create v$versionPrefix --title v$versionPrefix --generate-notes $(get-item ./artifacts/*.nupkg) $(get-item ./artifacts/*.snupkg)"
}
}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<VersionPrefix>2026.1.0</VersionPrefix>
<VersionPrefix>2026.2.0</VersionPrefix>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down
22 changes: 0 additions & 22 deletions appveyor.yml

This file was deleted.

8 changes: 4 additions & 4 deletions example/SeqEnableAAD/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ static async Task Run(string server, string? username, string? tenantId, string?

var user = await connection.Users.FindCurrentAsync();
var provider = await connection.Settings.FindNamedAsync(SettingName.AuthenticationProvider);
var cid = await connection.Settings.FindNamedAsync(SettingName.EntraIDClientId);
var ckey = await connection.Settings.FindNamedAsync(SettingName.EntraIDClientKey);
var aut = await connection.Settings.FindNamedAsync(SettingName.EntraIDAuthority);
var tid = await connection.Settings.FindNamedAsync(SettingName.EntraIDTenantId);
var cid = await connection.Settings.FindNamedAsync(SettingName.EntraIdClientId);
var ckey = await connection.Settings.FindNamedAsync(SettingName.EntraIdClientKey);
var aut = await connection.Settings.FindNamedAsync(SettingName.EntraIdAuthority);
var tid = await connection.Settings.FindNamedAsync(SettingName.EntraIdTenantId);

user.Username = username;
provider.Value = "Microsoft Entra ID";
Expand Down
2 changes: 1 addition & 1 deletion src/Seq.Api/Client/SeqApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class SeqApiClient : IDisposable
// Future versions of Seq may not completely support vN-1 features, however
// providing this as an Accept header will ensure what compatibility is available
// can be utilized.
const string SeqApiVersionedMediaType = "application/vnd.datalust.seq.v14+json";
const string SeqApiVersionedMediaType = "application/vnd.datalust.seq.v15+json";
const string ApiKeyHeaderName = "X-Seq-ApiKey";
const string CsrfTokenHeaderName = "X-Seq-CsrfToken";

Expand Down
6 changes: 6 additions & 0 deletions src/Seq.Api/Model/Events/EventEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ public class EventEntity : Entity
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string SpanKind { get; set; }

/// <summary>
/// If the event is a span, any links it carries.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<object> SpanLinks { get; set; }

/// <summary>
/// A collection of properties describing the origin of the event, if any. These correspond to resource
Expand Down
5 changes: 5 additions & 0 deletions src/Seq.Api/Model/Indexes/IndexEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ public class IndexEntity: Entity
/// The storage used by this index.
/// </summary>
public ulong StorageBytes { get; set; }

/// <summary>
/// If the last attempt at indexing failed to build this index.
/// </summary>
public bool IsIndexingFailing { get; set; }
}
}
33 changes: 33 additions & 0 deletions src/Seq.Api/Model/Settings/AuthenticationSettingsTestResultPart.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright © Datalust and contributors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Seq.Api.Model.Settings
{
/// <summary>
/// The outcome of testing proposed authentication settings.
/// </summary>
public class AuthenticationSettingsTestResultPart
{
/// <summary>
/// If <c>true</c>, the settings passed testing. Some aspects of the configuration can only be verified
/// by signing in, so passing does not guarantee that sign-in will work.
/// </summary>
public bool Passed { get; set; }

/// <summary>
/// If the test failed, a human-readable description of the problem.
/// </summary>
public string Error { get; set; }
}
}
14 changes: 14 additions & 0 deletions src/Seq.Api/Model/Settings/SettingEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,19 @@ public class SettingEntity : Entity
/// The value of the setting.
/// </summary>
public object Value { get; set; }

/// <summary>
/// Indicates that the setting has a value, even when the server redacts that value and
/// returns it as <c>null</c> (the case for passwords and similar secrets). Ignored when
/// saving values: <c>null</c> will always clear a setting, irrespective of the value sent
/// for this property.
/// </summary>
public bool HasValue { get; set; }

/// <summary>
/// Indicates that the setting's value is overridden in the server's configuration, and can't be changed through
/// the API. Ignored when saving values.
/// </summary>
public bool IsReadOnly { get; set; }
}
}
Loading
Loading