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
4 changes: 4 additions & 0 deletions .github/workflows/createrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
- name: Publish API
if: ${{ github.event.release.prerelease == false }}
run: dotnet publish "MobileConfiguration\MobileConfiguration.csproj" --configuration Release --output publishOutput -r win-x64 --self-contained
-p:Version=${{ steps.get_version.outputs.VERSION }}
-p:AssemblyVersion=${{ steps.get_version.outputs.VERSION }}
-p:FileVersion=${{ steps.get_version.outputs.VERSION }}
-p:InformationalVersion=${{ steps.get_version.outputs.VERSION }}

- name: Build Release Package
run: |
Expand Down
47 changes: 0 additions & 47 deletions .github/workflows/prlinked.yml

This file was deleted.

1 change: 1 addition & 0 deletions MobileConfiguration/MobileConfiguration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.3" />
<PackageReference Include="Sentry.AspNetCore" Version="6.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 20 additions & 0 deletions MobileConfiguration/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using MobileConfiguration.Repository;
using NLog;
using NLog.Extensions.Logging;
using Sentry.Extensibility;
using Shared.EntityFramework;
using Shared.Extensions;
using Shared.General;
Expand All @@ -30,6 +31,25 @@

ConfigurationReader.Initialise(configuration);

// Configure Sentry on the webBuilder using the config snapshot.
var sentrySection = ConfigurationReader.GetValueOrDefault("SentryConfiguration", "Dsn", "N/A");
if (sentrySection != "N/A")
{
// Replace the condition below if you intended to only enable Sentry in certain environments.
if (builder.Environment.IsDevelopment() == false)
{
builder.WebHost.UseSentry(o =>
{
o.Dsn = sentrySection;
o.SendDefaultPii = true;
o.MaxRequestBodySize = RequestSize.Always;
o.CaptureBlockingCalls = true;
o.Release = Assembly.GetExecutingAssembly().GetName().Version?.ToString() ?? "unknown";
});
}
}


String contentRoot = Directory.GetCurrentDirectory();

String nlogConfigPath = Path.Combine(contentRoot, "nlog.config");
Expand Down
Loading