Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<SentryVersion>5.14.0</SentryVersion>
<SentryVersion>5.16.1</SentryVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Sentry" Version="$(SentryVersion)" />
Expand Down
6 changes: 1 addition & 5 deletions src/SymbolCollector.Android.Library/Host.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ public static IHost Init(Context context, string dsn, string? sentryTrace = null
{
SentrySdk.Init(o =>
{

#pragma warning disable SENTRY0001
o.Experimental.EnableLogs = true;
#pragma warning restore SENTRY0001

o.CaptureFailedRequests = true;
o.Experimental.EnableLogs = true;

o.SetBeforeSend(@event =>
{
Expand Down
3 changes: 0 additions & 3 deletions src/SymbolCollector.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,7 @@ private static void Bootstrap(Args args)
o.Debug = true;
o.IsGlobalModeEnabled = true;
o.CaptureFailedRequests = true;

#pragma warning disable SENTRY0001
o.Experimental.EnableLogs = true;
#pragma warning restore SENTRY0001

#if DEBUG
o.Environment = "development";
Expand Down
2 changes: 0 additions & 2 deletions src/SymbolCollector.Core/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ public static IHost Init(Action<IServiceCollection> configureServices)
// TODO: Should also be added via IHostBuilder extension
l.AddSentry(o =>
{
#pragma warning disable SENTRY0001
o.Experimental.EnableLogs = true;
#pragma warning restore SENTRY0001
o.InitializeSdk = false;
});
l.AddSimpleConsole(o => o.ColorBehavior = LoggerColorBehavior.Disabled);
Expand Down
10 changes: 4 additions & 6 deletions src/SymbolCollector.Runner/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Runner uploads the apk by default (on current directory or under the apps' bin).
// To skip, pass 'skipUpload:true' as the first argument
#pragma warning disable SENTRY0001
var skipUpload = args.Any(a => a.Equals("skipUpload:true", StringComparison.OrdinalIgnoreCase));

IntrLog.Info($"Starting runner (skipUpload:{skipUpload})...");
Expand Down Expand Up @@ -36,7 +35,6 @@
options.Debug = false;
options.AutoSessionTracking = true;
options.TracesSampleRate = 1.0;

options.Experimental.EnableLogs = true;
});

Expand Down Expand Up @@ -258,13 +256,13 @@ static class IntrLog
public static void Info(string message, params object[] args)
{
Console.WriteLine(message, args);
SentrySdk.Experimental.Logger.LogInfo(message, args);
SentrySdk.Logger.LogInfo(message, args);
}

public static void Warning(string message, params object[] args)
{
Console.WriteLine(message, args);
SentrySdk.Experimental.Logger.LogWarning(message, args);
SentrySdk.Logger.LogWarning(message, args);
}

public static void Error(string message, Exception? exception = null, params object[] args)
Expand All @@ -274,11 +272,11 @@ public static void Error(string message, Exception? exception = null, params obj
if (exception != null)
{
Console.WriteLine(exception);
SentrySdk.Experimental.Logger.LogError($"{message} - {exception.Message}", args);
SentrySdk.Logger.LogError($"{message} - {exception.Message}", args);
}
else
{
SentrySdk.Experimental.Logger.LogError(message, args);
SentrySdk.Logger.LogError(message, args);
}
}
}
2 changes: 1 addition & 1 deletion src/SymbolCollector.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
o.AddExceptionFilterForType<OperationCanceledException>();
o.MinimumBreadcrumbLevel = LogLevel.Debug;
o.CaptureFailedRequests = true;
o.Experimental.EnableLogs = true;

// https://github.com/getsentry/symbol-collector/issues/205
// o.CaptureBlockingCalls = true;
Expand All @@ -99,7 +100,6 @@ private static IHostBuilder CreateHostBuilder(string[] args) =>
});

#pragma warning disable SENTRY0001
o.Experimental.EnableLogs = true;
o.EnableHeapDumps(20, Debouncer.PerDay(3, TimeSpan.FromHours(3)));
#pragma warning restore SENTRY0001
});
Expand Down
Loading