Skip to content

Commit

Permalink
Bump SentryVersion to 5.0.0-alpha.1 (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescrosswell authored Dec 3, 2024
1 parent a0fb731 commit 970d53b
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 310 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,21 @@ jobs:

- name: Setup Android SDK
uses: android-actions/setup-android@07976c6290703d34c16d382cb36445f98bb43b1f # v3.2.0
with:
log-accepted-android-sdk-licenses: false

- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.100

- name: Install Android workload (macOS)
- name: Install Workloads (macOS)
if: matrix.os == 'macos-latest'
run: sudo dotnet workload install maui-android
run: sudo dotnet workload restore

- name: Install Android workload (Windows/Linux)
- name: Install Workloads (Windows/Linux)
if: matrix.os != 'macos-latest'
run: dotnet workload install maui-android
run: dotnet workload restore

- name: Run batch build script
if: matrix.os == 'windows-latest'
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "9.0.100",
"rollForward": "latestMinor",
"allowPrerelease": false
}
}
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<SentryVersion>4.12.0</SentryVersion>
<SentryVersion>5.0.0-alpha.1</SentryVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Sentry.Extensions.Logging" Version="$(SentryVersion)" />
Expand Down
7 changes: 1 addition & 6 deletions src/SymbolCollector.Server/BatchFinalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,20 @@ public Task CloseBatch(
public class SymsorterBatchFinalizer : IBatchFinalizer
{
private readonly SymbolServiceOptions _options;
private readonly IMetricsPublisher _metrics;
private readonly ILogger<SymsorterBatchFinalizer> _logger;
private readonly ISymbolGcsWriter _gcsWriter;
private readonly BundleIdGenerator _bundleIdGenerator;
private readonly IHub _hub;
private readonly string _symsorterOutputPath;

public SymsorterBatchFinalizer(
IMetricsPublisher metrics,
IOptions<SymbolServiceOptions> options,
ISymbolGcsWriter gcsWriter,
BundleIdGenerator bundleIdGenerator,
IHub hub,
ILogger<SymsorterBatchFinalizer> logger)
{
_options = options?.Value ?? throw new ArgumentNullException(nameof(options));
_metrics = metrics;
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
_gcsWriter = gcsWriter ?? throw new ArgumentNullException(nameof(gcsWriter));
_bundleIdGenerator = bundleIdGenerator;
Expand Down Expand Up @@ -89,7 +86,6 @@ traceHeader is not null
? _hub.StartTransaction("CloseBatch", "batch.close", traceHeader)
: _hub.StartTransaction("CloseBatch", "batch.close");

var handle = _metrics.BeginGcsBatchUpload();
_ = Task.Run(async () =>
{
// get logger factory and create a logger for symsorter
Expand Down Expand Up @@ -189,7 +185,6 @@ into fileGroup
{
_logger.LogError(e, "Failed attempting to delete symsorter directory.");
}
handle.Dispose();
}

}, gcsUploadCancellation)
Expand Down Expand Up @@ -292,4 +287,4 @@ private bool SortSymbols(string batchLocation, SymbolUploadBatch batch, string s
_logger.LogInformation("Symsorter processed: {count}", match.Groups["count"].Value);
return false;
}
}
}
92 changes: 0 additions & 92 deletions src/SymbolCollector.Server/ProxyMetricsPublisher.cs

This file was deleted.

82 changes: 0 additions & 82 deletions src/SymbolCollector.Server/SentryMetricsPublisher.cs

This file was deleted.

15 changes: 0 additions & 15 deletions src/SymbolCollector.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ public void ConfigureServices(IServiceCollection services)
.AddJsonOptions(options =>
options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase);

services.AddSingleton<ISymbolServiceMetrics, ProxyMetricsPublisher>();
services.AddSingleton<ISymbolControllerMetrics, ProxyMetricsPublisher>();
services.AddSingleton<IMetricsPublisher, ProxyMetricsPublisher>();

services.AddSingleton<StatsDMetricsPublisher>();
services.AddSingleton<SentryMetricsPublisher>();

services.AddSingleton<ProxyMetricsPublisher>(c => new ProxyMetricsPublisher(
c.GetRequiredService<StatsDMetricsPublisher>(),
c.GetRequiredService<SentryMetricsPublisher>()));

services.AddOptions<StatsDOptions>()
.Configure<IConfiguration>((o, c) => c.Bind("StatsD", o))
.Validate(o => !string.IsNullOrWhiteSpace(o.Host), "StatD host is required.");
Expand Down Expand Up @@ -200,22 +189,18 @@ private string GetSymsorterPath()
private class SymbolServiceEventProcessor : ISentryEventProcessor
{
private readonly IWebHostEnvironment _environment;
private readonly IMetricsPublisher _metrics;
private readonly SymbolServiceOptions _options;
private readonly string _cores = Environment.ProcessorCount.ToString();
public SymbolServiceEventProcessor(
IWebHostEnvironment environment,
IMetricsPublisher metrics,
IOptions<SymbolServiceOptions> options)
{
_environment = environment;
_metrics = metrics;
_options = options.Value;
}

public SentryEvent? Process(SentryEvent @event)
{
_metrics.SentryEventProcessed();
@event.SetTag("server-endpoint", _options.BaseAddress ?? "?");
@event.Contexts["SymbolServiceOptions"] = _options;

Expand Down
78 changes: 0 additions & 78 deletions src/SymbolCollector.Server/StatsDMetricsPublisher.cs

This file was deleted.

Loading

0 comments on commit 970d53b

Please sign in to comment.