Skip to content

Commit

Permalink
Merge pull request #130 from Resgrid/develop
Browse files Browse the repository at this point in the history
CU-8688kakx4 reverting console changes for Sentry.Profiling looks lik…
  • Loading branch information
ucswift authored May 25, 2024
2 parents 3a68bce + bc316c8 commit 665c97f
Show file tree
Hide file tree
Showing 7 changed files with 383 additions and 362 deletions.
15 changes: 2 additions & 13 deletions Core/Resgrid.Framework/Logging.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
using Microsoft.Extensions.Options;
using Resgrid.Config;
using Resgrid.Config;
using Sentry;
using Sentry.Profiling;
using Serilog;
using Serilog.Core;
using Serilog.Events;
using Serilog.Sinks.Elasticsearch;
using System;
using System.Diagnostics;
using System.Net;
using System.Net.Mail;
using System.Reflection;
using System.Runtime.CompilerServices;
using static NodaTime.TimeZones.ZoneEqualityComparer;

namespace Resgrid.Framework
{
Expand Down Expand Up @@ -46,14 +42,7 @@ public static void Initialize(string key)
o.TracesSampleRate = ExternalErrorConfig.SentryPerfSampleRate;
o.Environment = ExternalErrorConfig.Environment;
o.Release = Assembly.GetEntryAssembly().GetName().Version.ToString();
o.ProfilesSampleRate = ExternalErrorConfig.SentryProfilingSampleRate;

// Requires NuGet package: Sentry.Profiling
// Note: By default, the profiler is initialized asynchronously. This can be tuned by passing a desired initialization timeout to the constructor.
o.AddIntegration(new ProfilingIntegration(
// During startup, wait up to 500ms to profile the app startup code. This could make launching the app a bit slower so comment it out if your prefer profiling to start asynchronously
//TimeSpan.FromMilliseconds(500)
));
o.ProfilesSampleRate = 0.0;
}).CreateLogger();
}
else if (SystemBehaviorConfig.ErrorLoggerType == ErrorLoggerTypes.Elk)
Expand Down
1 change: 0 additions & 1 deletion Core/Resgrid.Framework/Resgrid.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<PackageReference Include="protobuf-net" Version="3.2.30" />
<PackageReference Include="Sentry" Version="4.6.2" />
<PackageReference Include="Sentry.AspNetCore" Version="4.6.2" />
<PackageReference Include="Sentry.Profiling" Version="4.6.2" />
<PackageReference Include="Sentry.Serilog" Version="4.6.2" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" Version="10.0.0" />
Expand Down
Loading

0 comments on commit 665c97f

Please sign in to comment.