Skip to content

Commit

Permalink
Merge pull request #130 from datalust/dev
Browse files Browse the repository at this point in the history
2024.1.0 Release
  • Loading branch information
nblumhardt authored Jan 24, 2024
2 parents 84e1f7f + a9dcffc commit 98cdcd2
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 5 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ artifacts:
deploy:
- provider: NuGet
api_key:
secure: lfUaaMDeL9aQf/rG4TLmWWYBF1oj1uaJtWnmXoy3QNyauOuJIkKRjX7ZH9p/TGKM
secure: uJjVQ3SRUEcaUqdyKuuIvtrpNrO+u9P07aLbUumFiqZhjj3uI+PlZULv8JtgrxR/
skip_symbols: true
on:
branch: /^(main|dev)$/
Expand Down
35 changes: 35 additions & 0 deletions src/Seq.Api/Model/Diagnostics/ClusterMetricsPart.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
namespace Seq.Api.Model.Diagnostics
{
/// <summary>
/// Metrics related to cluster activity.
/// </summary>
public class ClusterMetricsPart
{
/// <summary>
/// Construct a <see cref="ClusterMetricsPart"/>.
/// </summary>
public ClusterMetricsPart()
{
}

/// <summary>
/// A connection to the leader node was accepted.
/// </summary>
public ulong ConnectionAccepted { get; set; }

/// <summary>
/// A connection to the leader node was rejected due to an invalid authentication key.
/// </summary>
public ulong ConnectionInvalidKey { get; set; }

/// <summary>
/// A connection to the leader node was successfully authenticated and established.
/// </summary>
public ulong ConnectionEstablished { get; set; }

/// <summary>
/// A connection to the leader node was could not be established.
/// </summary>
public ulong ConnectionNotEstablished { get; set; }
}
}
29 changes: 28 additions & 1 deletion src/Seq.Api/Model/Events/EventEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Seq.Api.Model.Shared;
Expand All @@ -30,6 +31,12 @@ public class EventEntity : Entity
/// </summary>
public string Timestamp { get; set; }

/// <summary>
/// If the event represents a span, the ISO-8601 timestamp at which the span started.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string Start { get; set; }

/// <summary>
/// Properties associated with the event.
/// </summary>
Expand Down Expand Up @@ -75,11 +82,31 @@ public class EventEntity : Entity
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string SpanId { get; set; }

/// <summary>
/// The id of the event's parent span, if any.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string ParentId { get; set; }

/// <summary>
/// A collection of properties describing the origin of the event, if any. These correspond to resource
/// attributes in the OpenTelemetry spec.
/// attributes in the OpenTelemetry protocol.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<EventPropertyPart> Resource { get; set; }

/// <summary>
/// A collection of properties describing the instrumentation that produced an event, if any. These correspond
/// to instrumentation scope attributes in the OpenTelemetry protocol, and may include the OpenTelemetry scope name
/// in a well-known <c>name</c> property.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<EventPropertyPart> Scope { get; set; }

/// <summary>
/// If the event is a span, the elapsed time between the start and end of the span.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public TimeSpan? Elapsed { get; set; }
}
}
7 changes: 6 additions & 1 deletion src/Seq.Api/Model/Settings/SettingName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ public enum SettingName
/// list. For example, <c>openid, profile, email</c>.
/// </summary>
OpenIdConnectScopes,


/// <summary>
/// If using OpenID Connect, overrides the URI of the provider's metadata endpoint.
/// </summary>
OpenIdConnectMetadataAddress,

/// <summary>
/// If <c>true</c>, ingestion requests incoming via HTTP must be authenticated using an API key or
/// logged-in user session. Only effective when <see cref="IsAuthenticationEnabled"/> is <c>true</c>.
Expand Down
20 changes: 20 additions & 0 deletions src/Seq.Api/ResourceGroups/DiagnosticsResourceGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,25 @@ public async Task<StorageConsumptionPart> GetStorageConsumptionAsync(
};
return await GroupGetAsync<StorageConsumptionPart>("Storage", parameters, cancellationToken);
}

/// <summary>
/// Retrieve the cluster log.
/// </summary>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
/// <returns>The cluster log.</returns>
public async Task<string> GetClusterLogAsync(CancellationToken cancellationToken = default)
{
return await GroupGetStringAsync("ClusterLog", cancellationToken: cancellationToken);
}

/// <summary>
/// Retrieve metrics about cluster connections.
/// </summary>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> allowing the operation to be canceled.</param>
/// <returns>A set of metrics relating to cluster network activity.</returns>
public async Task<ClusterMetricsPart> GetClusterMetricsAsync(CancellationToken cancellationToken = default)
{
return await GroupGetAsync<ClusterMetricsPart>("ClusterMetrics", cancellationToken: cancellationToken);
}
}
}
4 changes: 2 additions & 2 deletions src/Seq.Api/Seq.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Client library for the Seq HTTP API.</Description>
<VersionPrefix>2023.4.0</VersionPrefix>
<VersionPrefix>2024.1.0</VersionPrefix>
<Authors>Datalust;Contributors</Authors>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand All @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 98cdcd2

Please sign in to comment.