Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion .github/workflows/build-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.*
dotnet-version: 10.0.*
dotnet-quality: ga
- name: Build Reason
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.*
dotnet-version: 10.0.*
dotnet-quality: ga

- name: Version
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.*
dotnet-version: 10.0.*
dotnet-quality: ga

- name: Start Services
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.*
dotnet-version: 10.0.*
dotnet-quality: ga

- name: Start Services
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/elasticsearch-docker-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.*
dotnet-version: 10.0.*
dotnet-quality: ga
- name: Build Reason
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/elasticsearch-docker-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.*
dotnet-version: 10.0.*
dotnet-quality: ga
- name: Build Reason
env:
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/Exceptionless.AppHost/bin/Debug/net9.0/Exceptionless.AppHost.dll",
"program": "${workspaceFolder}/src/Exceptionless.AppHost/bin/Debug/net10.0/Exceptionless.AppHost.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Exceptionless.AppHost",
"stopAtEntry": false,
Expand All @@ -23,7 +23,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/Exceptionless.Web/bin/Debug/net9.0/Exceptionless.Web.dll",
"program": "${workspaceFolder}/src/Exceptionless.Web/bin/Debug/net10.0/Exceptionless.Web.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Exceptionless.Web",
"stopAtEntry": false,
Expand All @@ -40,7 +40,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/Exceptionless.Job/bin/Debug/net9.0/Exceptionless.Job.dll",
"program": "${workspaceFolder}/src/Exceptionless.Job/bin/Debug/net10.0/Exceptionless.Job.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /app

COPY ./*.slnx ./NuGet.Config ./
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN dotnet publish -c Release -o out

# job

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS job
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS job
WORKDIR /app
COPY --from=job-publish /app/src/Exceptionless.Job/out ./

Expand All @@ -52,7 +52,7 @@ RUN dotnet publish -c Release -o out /p:SkipSpaPublish=true

# api

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS api
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS api
WORKDIR /app
COPY --from=api-publish /app/src/Exceptionless.Web/out ./

Expand All @@ -72,7 +72,7 @@ RUN dotnet publish -c Release -o out

# app

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS app
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS app

WORKDIR /app
COPY --from=app-publish /app/src/Exceptionless.Web/out ./
Expand Down Expand Up @@ -146,7 +146,7 @@ USER elasticsearch

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 9.0 --runtime aspnetcore && \
./dotnet-install.sh --channel 10.0 --runtime aspnetcore && \
rm dotnet-install.sh

EXPOSE 8080 9200
Expand Down Expand Up @@ -206,7 +206,7 @@ USER elasticsearch

RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh --channel 9.0 --runtime aspnetcore && \
./dotnet-install.sh --channel 10.0 --runtime aspnetcore && \
rm dotnet-install.sh

EXPOSE 8080 9200
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100-rc*",
"version": "10.0.100",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Product>Exceptionless</Product>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
Expand Down
10 changes: 5 additions & 5 deletions src/Exceptionless.AppHost/Exceptionless.AppHost.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.2" />
<Sdk Name="Aspire.AppHost.Sdk" Version="13.0.0" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>a9c2ddcc-e51d-4cd1-9782-96e1d74eec87</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.2" />
<PackageReference Include="Aspire.Hosting.NodeJs" Version="9.5.2" />
<PackageReference Include="Aspire.Hosting.Redis" Version="9.5.2" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.0" />
<PackageReference Include="Aspire.Hosting.JavaScript" Version="13.0.0" />
<PackageReference Include="Aspire.Hosting.Redis" Version="13.0.0" />
<PackageReference Include="AspNetCore.HealthChecks.Elasticsearch" Version="9.0.0" />
<PackageReference Include="Foundatio.Minio" Version="12.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static IResourceBuilder<ElasticsearchResource> WithKibana(this IResourceB
{
containerName ??= $"{builder.Resource.Name}-kibana";

builder.ApplicationBuilder.Services.TryAddLifecycleHook<KibanaConfigWriterHook>();
var elasticsearchResources = builder.ApplicationBuilder.Resources.OfType<ElasticsearchResource>();

var resource = new KibanaResource(containerName);
var resourceBuilder = builder.ApplicationBuilder.AddResource(resource)
Expand All @@ -89,7 +89,8 @@ public static IResourceBuilder<ElasticsearchResource> WithKibana(this IResourceB
.WithHttpEndpoint(targetPort: KibanaPort, name: containerName)
.WithUrlForEndpoint(containerName, u => u.DisplayText = "Kibana")
.WithEnvironment("xpack.security.enabled", "false")
.ExcludeFromManifest();
.ExcludeFromManifest()
.ConfigureElasticsearchHosts(elasticsearchResources);

configureContainer?.Invoke(resourceBuilder);

Expand Down
52 changes: 29 additions & 23 deletions src/Exceptionless.AppHost/Extensions/KibanaConfigWriterHook.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
using System.Text;
using Aspire.Hosting.Lifecycle;
using System.Text;
using Aspire.Hosting.ApplicationModel;

namespace Aspire.Hosting;

internal class KibanaConfigWriterHook : IDistributedApplicationLifecycleHook
internal static class KibanaConfigWriterExtensions
{
public async Task AfterEndpointsAllocatedAsync(DistributedApplicationModel appModel, CancellationToken cancellationToken)
public static IResourceBuilder<KibanaResource> ConfigureElasticsearchHosts(
this IResourceBuilder<KibanaResource> builder,
IEnumerable<ElasticsearchResource> elasticsearchResources)
{
if (appModel.Resources.OfType<KibanaResource>().SingleOrDefault() is not { } kibanaResource)
return;

var elasticsearchInstances = appModel.Resources.OfType<ElasticsearchResource>();

if (!elasticsearchInstances.Any())
return;
builder.WithAnnotation(new EnvironmentCallbackAnnotation(async context =>
{
var hostsVariableBuilder = new StringBuilder();

var hostsVariableBuilder = new StringBuilder();
foreach (var elasticsearchInstance in elasticsearchResources)
{
if (elasticsearchInstance.PrimaryEndpoint.IsAllocated)
{
if (hostsVariableBuilder.Length > 0)
hostsVariableBuilder.Append(",");

var endpoint = elasticsearchInstance.PrimaryEndpoint;
hostsVariableBuilder.Append(endpoint.Scheme)
.Append("://")
.Append(endpoint.Host)
.Append(":")
.Append(endpoint.Port);
}
}

foreach (var elasticsearchInstance in elasticsearchInstances)
{
if (elasticsearchInstance.PrimaryEndpoint.IsAllocated)
if (hostsVariableBuilder.Length > 0)
{
var connectionString = await elasticsearchInstance.GetConnectionStringAsync();
if (hostsVariableBuilder.Length > 0)
hostsVariableBuilder.Append(",");
hostsVariableBuilder.Append(elasticsearchInstance.PrimaryEndpoint.Scheme).Append("://").Append(elasticsearchInstance.PrimaryEndpoint.ContainerHost).Append(":").Append(elasticsearchInstance.PrimaryEndpoint.Port);
context.EnvironmentVariables["ELASTICSEARCH_HOSTS"] = hostsVariableBuilder.ToString();
}
}

kibanaResource.Annotations.Add(new EnvironmentCallbackAnnotation(context =>
{
context.EnvironmentVariables.Add("ELASTICSEARCH_HOSTS", hostsVariableBuilder.ToString());
await Task.CompletedTask;
}));

return builder;
}
}
8 changes: 4 additions & 4 deletions src/Exceptionless.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
.WithUrlForEndpoint("http", u => u.DisplayText = "Api")
.WithHttpHealthCheck("/health");

builder.AddNpmApp("Web", "../../src/Exceptionless.Web/ClientApp", "dev")
builder.AddJavaScriptApp("Web", "../../src/Exceptionless.Web/ClientApp", "dev")
.WithReference(api)
.WithEnvironment("ASPNETCORE_URLS", "http://localhost:5200")
.WithUrlForEndpoint("http", u => u.DisplayText = "Web")
.WithEndpoint(port: 5173, targetPort: 5173, scheme: "http", env: "PORT", isProxied: false);
.WithHttpEndpoint(port: 5173, env: "PORT", isProxied: false);

builder.AddNpmApp("AngularWeb", "../../src/Exceptionless.Web/ClientApp.angular", "serve")
builder.AddJavaScriptApp("AngularWeb", "../../src/Exceptionless.Web/ClientApp.angular", "serve")
.WithReference(api)
.WithEnvironment("ASPNETCORE_URLS", "http://localhost:5200")
.WithUrlForEndpoint("http", u => u.DisplayText = "Angular Web")
.WithEndpoint(port: 5100, targetPort: 5100, scheme: "http", env: "PORT", isProxied: false);
.WithHttpEndpoint(port: 5100, env: "PORT", isProxied: false);

builder.Build().Run();
8 changes: 4 additions & 4 deletions src/Exceptionless.Core/Exceptionless.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<PackageReference Include="NEST.JsonNetSerializer" Version="7.17.5" />
<PackageReference Include="Handlebars.Net" Version="2.1.6" />
<PackageReference Include="McSherry.SemanticVersioning" Version="1.4.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.0" />
<PackageReference Include="Stripe.net" Version="47.4.0" />
<PackageReference Include="System.DirectoryServices" Version="9.0.10" />
<PackageReference Include="System.DirectoryServices" Version="10.0.0" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Foundatio.Repositories.Elasticsearch" Version="7.17.17" Condition="'$(ReferenceFoundatioRepositoriesSource)' == '' OR '$(ReferenceFoundatioRepositoriesSource)' == 'false'" />
<ProjectReference Include="..\..\..\..\Foundatio\Foundatio.Repositories\src\Foundatio.Repositories.Elasticsearch\Foundatio.Repositories.Elasticsearch.csproj" Condition="'$(ReferenceFoundatioRepositoriesSource)' == 'true'" />
Expand Down
16 changes: 6 additions & 10 deletions src/Exceptionless.Insulation/Exceptionless.Insulation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<PackageReference Include="Foundatio.Minio" Version="12.0.0" />
<PackageReference Include="Foundatio.RabbitMQ" Version="12.0.0" />
<PackageReference Include="Foundatio.Redis" Version="12.0.1-alpha.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.0" />
<PackageReference Include="MailKit" Version="4.14.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.2" />
<PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />
Expand All @@ -22,10 +22,6 @@
<PackageReference Include="Serilog.Sinks.ExceptionLess" Version="5.0.0" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
</ItemGroup>
<ItemGroup Label="Transitive dependency updates to resolve vulnerability warnings">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Exceptionless.Core\Exceptionless.Core.csproj" />
</ItemGroup>
Expand Down
5 changes: 0 additions & 5 deletions src/Exceptionless.Job/Exceptionless.Job.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<ItemGroup>
<PackageReference Include="Exceptionless.AspNetCore" Version="6.1.0" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.10" />
<PackageReference Include="App.Metrics.AspNetCore" Version="4.3.0" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Enrichers.Span" Version="3.1.0" />
Expand All @@ -23,10 +22,6 @@
<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="1.13.0-beta.1" />
</ItemGroup>

<ItemGroup Label="Transitive dependency updates to resolve vulnerability warnings">
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.10" />
</ItemGroup>

<ItemGroup>
<Content Include="appsettings.yml" CopyToOutputDirectory="Always" />
<Content Include="appsettings.*.yml" DependentUpon="appsettings.yml" CopyToOutputDirectory="Always" />
Expand Down
6 changes: 1 addition & 5 deletions src/Exceptionless.Web/Exceptionless.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<ItemGroup>
<PackageReference Include="Exceptionless.AspNetCore" Version="6.1.0" />
<PackageReference Include="Joonasw.AspNetCore.SecurityHeaders" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0" />
<PackageReference Include="MiniValidation" Version="0.9.2" />
<PackageReference Include="NEST.JsonNetSerializer" Version="7.17.5" />
<PackageReference Include="OAuth2" Version="0.10.3" />
Expand All @@ -38,9 +37,6 @@
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="9.0.6" />
<PackageReference Include="Unchase.Swashbuckle.AspNetCore.Extensions" Version="2.7.2" />
</ItemGroup>
<ItemGroup Label="Transitive dependency updates to resolve vulnerability warnings">
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.10" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Exceptionless.Insulation\Exceptionless.Insulation.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptionless.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void ConfigureServices(IServiceCollection services)
{
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
options.RequireHeaderSymmetry = false;
options.KnownNetworks.Clear();
options.KnownIPNetworks.Clear();
options.KnownProxies.Clear();
});

Expand Down
2 changes: 1 addition & 1 deletion tests/Exceptionless.Tests/AppWebHostFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected override IHostBuilder CreateHostBuilder()
.AddYamlFile("appsettings.yml", optional: false, reloadOnChange: false)
.Build();

return Program.CreateHostBuilder(config, Environments.Development);
return Exceptionless.Web.Program.CreateHostBuilder(config, Environments.Development);
}

async Task IAsyncLifetime.DisposeAsync()
Expand Down
6 changes: 3 additions & 3 deletions tests/Exceptionless.Tests/Exceptionless.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

<PackageReference Include="FluentRest.NewtonsoftJson" Version="10.1.0" />

<PackageReference Include="Aspire.Hosting.Testing" Version="9.5.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.10.0" />
<PackageReference Include="Aspire.Hosting.Testing" Version="13.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" PrivateAssets="All" />
Expand Down
Loading