Skip to content

Commit

Permalink
fix: Disable Profiling (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes authored Jul 22, 2024
1 parent f50dfc4 commit 11979f6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Various fixes & improvements

- disable profiling (#198) by @bitsandfoxes

## 1.19.0

### Various fixes & improvements
Expand Down
1 change: 0 additions & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<ItemGroup>
<PackageVersion Include="Sentry.Extensions.Logging" Version="$(SentryVersion)" />
<PackageVersion Include="Sentry.Profiling" Version="$(SentryVersion)" />
<PackageVersion Include="Sentry.AspNetCore" Version="$(SentryVersion)" />
<PackageVersion Include="Sentry.Serilog" Version="$(SentryVersion)" />
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.2.0" />
Expand Down
7 changes: 1 addition & 6 deletions src/SymbolCollector.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Polly.Extensions.Http;
using Sentry.Profiling;
using Sentry.Protocol;
using SymbolCollector.Core;
using static System.Console;
Expand Down Expand Up @@ -231,11 +230,7 @@ private static void Bootstrap(Args args)
o.AutoSessionTracking = true;

o.TracesSampleRate = 1.0;
o.ProfilesSampleRate = 1.0;

o.AddIntegration(new ProfilingIntegration(
// Block up to 2 seconds to get profiling started before running the app
TimeSpan.FromSeconds(2)));
o.ProfilesSampleRate = 0.0;

o.ExperimentalMetrics = new ExperimentalMetricsOptions
{
Expand Down
1 change: 0 additions & 1 deletion src/SymbolCollector.Console/SymbolCollector.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Sentry.Profiling" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="System.CommandLine.DragonFruit" />
</ItemGroup>
Expand Down
6 changes: 0 additions & 6 deletions src/SymbolCollector.Server/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Sentry;
using Sentry.Profiling;
using Serilog;
using SystemEnvironment = System.Environment;

Expand Down Expand Up @@ -73,10 +71,6 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
{
o.Dsn = "https://[email protected]/1886021";

o.AddIntegration(new ProfilingIntegration(
// Block up to 2 seconds to get profiling started before running the app
TimeSpan.FromSeconds(2)));

// o.ExperimentalMetrics = new ExperimentalMetricsOptions
// {
// EnableCodeLocations = true,
Expand Down
1 change: 0 additions & 1 deletion src/SymbolCollector.Server/SymbolCollector.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<ItemGroup>
<PackageReference Include="Sentry.AspNetCore" />
<PackageReference Include="Sentry.Serilog" />
<PackageReference Include="Sentry.Profiling" />
<PackageReference Include="Google.Cloud.Storage.V1" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Settings.Configuration" />
Expand Down
2 changes: 1 addition & 1 deletion src/SymbolCollector.Server/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"Sentry": {
"TracesSampleRate": 1.0,
"ProfilesSampleRate": 1.0
"ProfilesSampleRate": 0.0
},
"GoogleCloud": {
"JsonCredentialParameters": {
Expand Down
2 changes: 1 addition & 1 deletion src/SymbolCollector.Server/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"DiagnosticLevel": "Info",
"Dsn": "https://[email protected]/1886021",
"TracesSampleRate": 1.0,
"ProfilesSampleRate": 0.25,
"ProfilesSampleRate": 0.0,
"DefaultTags": {
"app": "SymbolCollector.Server"
}
Expand Down

0 comments on commit 11979f6

Please sign in to comment.