From d0b28cde3ba3b070dd9ea2f9971f44c16a88db64 Mon Sep 17 00:00:00 2001 From: GitHub Date: Wed, 5 Mar 2025 03:07:42 +0000 Subject: [PATCH 1/2] chore: update scripts/update-java.ps1 to 8.3.0 --- CHANGELOG.md | 3 +++ src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf29d0999a..ebfa25ae40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ - Bump Native SDK from v0.8.0 to v0.8.1 ([#4014](https://github.com/getsentry/sentry-dotnet/pull/4014)) - [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#081) - [diff](https://github.com/getsentry/sentry-native/compare/0.8.0...0.8.1) +- Bump Java SDK from v7.20.1 to v8.3.0 ([#3911](https://github.com/getsentry/sentry-dotnet/pull/3911)) + - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#830) + - [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.3.0) ## 5.2.0 diff --git a/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj b/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj index b9aec99266..7d08ec3bc0 100644 --- a/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj +++ b/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj @@ -3,7 +3,7 @@ net8.0-android34.0 $(NoWarn);BG8605;BG8606 - 7.20.1 + 8.3.0 $(BaseIntermediateOutputPath)sdks\Sentry\Android\$(SentryAndroidSdkVersion)\ .NET Bindings for the Sentry Android SDK From b77e292004989ace794ac139067bdf98423ffec2 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Wed, 5 Mar 2025 03:20:28 +0000 Subject: [PATCH 2/2] Format code --- .../IAndroidAssemblyReader.cs | 2 +- .../IProtobufRequest.cs | 4 +-- .../IProtobufRequestPayloadExtractor.cs | 2 +- src/Sentry.AspNetCore/ISentryBuilder.cs | 2 +- src/Sentry.EntityFramework/IQueryLogger.cs | 2 +- .../ILogEntryFilter.cs | 2 +- src/Sentry.Maui/IMauiElementEventBinder.cs | 4 +-- src/Sentry.Maui/Internal/MauiEventsBinder.cs | 2 +- .../IOpenTelemetryEnricher.cs | 2 +- .../Ben.BlockingDetector/IBlockingMonitor.cs | 4 +-- .../Ben.BlockingDetector/IRecursionTracker.cs | 6 ++-- .../ITaskBlockingListenerState.cs | 6 ++-- src/Sentry/Extensibility/IBackgroundWorker.cs | 6 ++-- src/Sentry/Extensibility/IDiagnosticLogger.cs | 4 +-- src/Sentry/Extensibility/IExceptionFilter.cs | 2 +- .../Extensibility/INetworkStatusListener.cs | 4 +-- .../Extensibility/IRequestPayloadExtractor.cs | 2 +- .../ISentryEventExceptionProcessor.cs | 2 +- .../Extensibility/ISentryEventProcessor.cs | 2 +- .../ISentryEventProcessorWithHint.cs | 2 +- .../Extensibility/ISentryHttpRequest.cs | 8 +++--- .../Extensibility/ISentryStackTraceFactory.cs | 2 +- .../ISentryTransactionProcessor.cs | 2 +- .../ISentryTransactionProcessorWithHint.cs | 2 +- src/Sentry/Extensibility/ITransport.cs | 2 +- src/Sentry/Http/ISentryHttpClientFactory.cs | 2 +- src/Sentry/IAttachmentContent.cs | 2 +- src/Sentry/IEventLike.cs | 22 +++++++-------- src/Sentry/IHasData.cs | 4 +-- src/Sentry/IHasExtra.cs | 4 +-- src/Sentry/IHasTags.cs | 6 ++-- src/Sentry/IHub.cs | 24 ++++++++-------- src/Sentry/IScopeObserver.cs | 10 +++---- src/Sentry/ISentryClient.cs | 18 ++++++------ src/Sentry/ISentryFailedRequestHandler.cs | 2 +- src/Sentry/ISentryJsonSerializable.cs | 2 +- src/Sentry/ISentryScopeManager.cs | 10 +++---- src/Sentry/ISentryScopeStateProcessor.cs | 2 +- src/Sentry/ISentrySession.cs | 16 +++++------ src/Sentry/ISessionManager.cs | 16 +++++------ src/Sentry/ISpan.cs | 16 +++++------ src/Sentry/ISpanData.cs | 12 ++++---- src/Sentry/ITransactionContext.cs | 6 ++-- src/Sentry/ITransactionTracer.cs | 8 +++--- src/Sentry/Infrastructure/ISystemClock.cs | 2 +- src/Sentry/Integrations/ISdkIntegration.cs | 2 +- src/Sentry/Internal/AppDomainAdapter.cs | 6 ++-- src/Sentry/Internal/IClientReportRecorder.cs | 6 ++-- src/Sentry/Internal/ICloneable.cs | 2 +- src/Sentry/Internal/IFileSystem.cs | 28 +++++++++---------- src/Sentry/Internal/IGCImplementation.cs | 8 +++--- src/Sentry/Internal/IInternalScopeManager.cs | 6 ++-- src/Sentry/Internal/IStringOrRegexMatcher.cs | 2 +- src/Sentry/Internal/ITransactionProfiler.cs | 6 ++-- src/Sentry/Internal/IUpdatable.cs | 4 +-- .../ScopeStack/IScopeStackContainer.cs | 2 +- src/Sentry/Internal/StackFrame.cs | 2 +- src/Sentry/Internal/TcpPing.cs | 2 +- .../Protocol/Envelopes/ISerializable.cs | 4 +-- src/Sentry/Protocol/ITraceContext.cs | 16 +++++------ 60 files changed, 179 insertions(+), 179 deletions(-) diff --git a/src/Sentry.Android.AssemblyReader/IAndroidAssemblyReader.cs b/src/Sentry.Android.AssemblyReader/IAndroidAssemblyReader.cs index ef8b3173fe..f0435d4303 100644 --- a/src/Sentry.Android.AssemblyReader/IAndroidAssemblyReader.cs +++ b/src/Sentry.Android.AssemblyReader/IAndroidAssemblyReader.cs @@ -10,5 +10,5 @@ public interface IAndroidAssemblyReader : IDisposable /// /// The name of the assembly. /// The reader, or null if the assembly could not be found. - PEReader? TryReadAssembly(string name); + public PEReader? TryReadAssembly(string name); } diff --git a/src/Sentry.AspNetCore.Grpc/IProtobufRequest.cs b/src/Sentry.AspNetCore.Grpc/IProtobufRequest.cs index fecefc8bc6..a4dc5d099a 100644 --- a/src/Sentry.AspNetCore.Grpc/IProtobufRequest.cs +++ b/src/Sentry.AspNetCore.Grpc/IProtobufRequest.cs @@ -8,10 +8,10 @@ public interface IProtobufRequest /// /// The content length. /// - long? ContentLength { get; } + public long? ContentLength { get; } /// /// The request message. /// - TRequest Request { get; } + public TRequest Request { get; } } diff --git a/src/Sentry.AspNetCore.Grpc/IProtobufRequestPayloadExtractor.cs b/src/Sentry.AspNetCore.Grpc/IProtobufRequestPayloadExtractor.cs index 6572a6246a..2ffb2cb103 100644 --- a/src/Sentry.AspNetCore.Grpc/IProtobufRequestPayloadExtractor.cs +++ b/src/Sentry.AspNetCore.Grpc/IProtobufRequestPayloadExtractor.cs @@ -12,6 +12,6 @@ public interface IProtobufRequestPayloadExtractor /// /// The gRPC Request object. /// The extracted payload. - IMessage? ExtractPayload(IProtobufRequest request) + public IMessage? ExtractPayload(IProtobufRequest request) where TRequest : class, IMessage; } diff --git a/src/Sentry.AspNetCore/ISentryBuilder.cs b/src/Sentry.AspNetCore/ISentryBuilder.cs index a8cb95576d..4d94d09513 100644 --- a/src/Sentry.AspNetCore/ISentryBuilder.cs +++ b/src/Sentry.AspNetCore/ISentryBuilder.cs @@ -10,5 +10,5 @@ public interface ISentryBuilder /// /// Gets the where Sentry services are configured. /// - IServiceCollection Services { get; } + public IServiceCollection Services { get; } } diff --git a/src/Sentry.EntityFramework/IQueryLogger.cs b/src/Sentry.EntityFramework/IQueryLogger.cs index eaa7cc7a97..3b1a77c4bd 100644 --- a/src/Sentry.EntityFramework/IQueryLogger.cs +++ b/src/Sentry.EntityFramework/IQueryLogger.cs @@ -10,5 +10,5 @@ public interface IQueryLogger /// /// The query text. /// The level. - void Log(string text, BreadcrumbLevel level = BreadcrumbLevel.Debug); + public void Log(string text, BreadcrumbLevel level = BreadcrumbLevel.Debug); } diff --git a/src/Sentry.Extensions.Logging/ILogEntryFilter.cs b/src/Sentry.Extensions.Logging/ILogEntryFilter.cs index 0592443725..9ab597b3a6 100644 --- a/src/Sentry.Extensions.Logging/ILogEntryFilter.cs +++ b/src/Sentry.Extensions.Logging/ILogEntryFilter.cs @@ -18,7 +18,7 @@ public interface ILogEntryFilter /// The event level. /// The EventId. /// The Exception, if any. - bool Filter( + public bool Filter( string categoryName, LogLevel logLevel, EventId eventId, diff --git a/src/Sentry.Maui/IMauiElementEventBinder.cs b/src/Sentry.Maui/IMauiElementEventBinder.cs index 2fe12e1a76..fcb9d1a1cc 100644 --- a/src/Sentry.Maui/IMauiElementEventBinder.cs +++ b/src/Sentry.Maui/IMauiElementEventBinder.cs @@ -13,13 +13,13 @@ public interface IMauiElementEventBinder /// This adds a breadcrumb to the sentry hub /// NOTE: we will override the type, timestamp, and category of the breadcrumb /// - void Bind(VisualElement element, Action addBreadcrumb); + public void Bind(VisualElement element, Action addBreadcrumb); /// /// Unbind the element because MAUI is removing the page /// /// - void UnBind(VisualElement element); + public void UnBind(VisualElement element); } /// diff --git a/src/Sentry.Maui/Internal/MauiEventsBinder.cs b/src/Sentry.Maui/Internal/MauiEventsBinder.cs index 23605ccb2e..36e30b186b 100644 --- a/src/Sentry.Maui/Internal/MauiEventsBinder.cs +++ b/src/Sentry.Maui/Internal/MauiEventsBinder.cs @@ -4,7 +4,7 @@ namespace Sentry.Maui.Internal; internal interface IMauiEventsBinder { - void HandleApplicationEvents(Application application, bool bind = true); + public void HandleApplicationEvents(Application application, bool bind = true); } internal class MauiEventsBinder : IMauiEventsBinder diff --git a/src/Sentry.OpenTelemetry/IOpenTelemetryEnricher.cs b/src/Sentry.OpenTelemetry/IOpenTelemetryEnricher.cs index 2fa72949f0..7d6062ca3e 100644 --- a/src/Sentry.OpenTelemetry/IOpenTelemetryEnricher.cs +++ b/src/Sentry.OpenTelemetry/IOpenTelemetryEnricher.cs @@ -2,5 +2,5 @@ namespace Sentry.OpenTelemetry; internal interface IOpenTelemetryEnricher { - void Enrich(ISpan span, Activity activity, IHub hub, SentryOptions? options); + public void Enrich(ISpan span, Activity activity, IHub hub, SentryOptions? options); } diff --git a/src/Sentry/Ben.BlockingDetector/IBlockingMonitor.cs b/src/Sentry/Ben.BlockingDetector/IBlockingMonitor.cs index 4169f95f13..9c3bc41cdf 100644 --- a/src/Sentry/Ben.BlockingDetector/IBlockingMonitor.cs +++ b/src/Sentry/Ben.BlockingDetector/IBlockingMonitor.cs @@ -2,6 +2,6 @@ namespace Sentry.Ben.BlockingDetector; internal interface IBlockingMonitor { - void BlockingStart(DetectionSource detectionSource); - void BlockingEnd(); + public void BlockingStart(DetectionSource detectionSource); + public void BlockingEnd(); } diff --git a/src/Sentry/Ben.BlockingDetector/IRecursionTracker.cs b/src/Sentry/Ben.BlockingDetector/IRecursionTracker.cs index fe881d41ad..930d9b666f 100644 --- a/src/Sentry/Ben.BlockingDetector/IRecursionTracker.cs +++ b/src/Sentry/Ben.BlockingDetector/IRecursionTracker.cs @@ -2,7 +2,7 @@ namespace Sentry.Ben.BlockingDetector; internal interface IRecursionTracker { - void Recurse(); - void Backtrack(); - bool IsFirstRecursion(); + public void Recurse(); + public void Backtrack(); + public bool IsFirstRecursion(); } diff --git a/src/Sentry/Ben.BlockingDetector/ITaskBlockingListenerState.cs b/src/Sentry/Ben.BlockingDetector/ITaskBlockingListenerState.cs index 263a3cdbe1..e81891b810 100644 --- a/src/Sentry/Ben.BlockingDetector/ITaskBlockingListenerState.cs +++ b/src/Sentry/Ben.BlockingDetector/ITaskBlockingListenerState.cs @@ -2,7 +2,7 @@ namespace Sentry.Ben.BlockingDetector; internal interface ITaskBlockingListenerState { - void Suppress(); - bool IsSuppressed(); - void Restore(); + public void Suppress(); + public bool IsSuppressed(); + public void Restore(); } diff --git a/src/Sentry/Extensibility/IBackgroundWorker.cs b/src/Sentry/Extensibility/IBackgroundWorker.cs index e42a0e27e2..dc25b0d604 100644 --- a/src/Sentry/Extensibility/IBackgroundWorker.cs +++ b/src/Sentry/Extensibility/IBackgroundWorker.cs @@ -12,17 +12,17 @@ public interface IBackgroundWorker /// /// The envelope to enqueue. /// True of queueing was successful. Otherwise, false. - bool EnqueueEnvelope(Envelope envelope); + public bool EnqueueEnvelope(Envelope envelope); /// /// Flushes envelopes asynchronously. /// /// How long to wait for flush to finish. /// A task to await for the flush operation. - Task FlushAsync(TimeSpan timeout); + public Task FlushAsync(TimeSpan timeout); /// /// Current count of items queued up. /// - int QueuedItems { get; } + public int QueuedItems { get; } } diff --git a/src/Sentry/Extensibility/IDiagnosticLogger.cs b/src/Sentry/Extensibility/IDiagnosticLogger.cs index 3fd73e2795..0104fc1000 100644 --- a/src/Sentry/Extensibility/IDiagnosticLogger.cs +++ b/src/Sentry/Extensibility/IDiagnosticLogger.cs @@ -8,7 +8,7 @@ public interface IDiagnosticLogger /// /// Whether the logger is enabled or not to the specified . /// - bool IsEnabled(SentryLevel level); + public bool IsEnabled(SentryLevel level); /// /// Log an internal SDK message. @@ -17,5 +17,5 @@ public interface IDiagnosticLogger /// The message. /// An optional Exception. /// Optional arguments for string template. - void Log(SentryLevel logLevel, string message, Exception? exception = null, params object?[] args); + public void Log(SentryLevel logLevel, string message, Exception? exception = null, params object?[] args); } diff --git a/src/Sentry/Extensibility/IExceptionFilter.cs b/src/Sentry/Extensibility/IExceptionFilter.cs index fe7cfcaf97..b24ff44b30 100644 --- a/src/Sentry/Extensibility/IExceptionFilter.cs +++ b/src/Sentry/Extensibility/IExceptionFilter.cs @@ -10,5 +10,5 @@ public interface IExceptionFilter /// /// The exception about to be captured. /// true if [the event should be filtered out]; otherwise, false. - bool Filter(Exception ex); + public bool Filter(Exception ex); } diff --git a/src/Sentry/Extensibility/INetworkStatusListener.cs b/src/Sentry/Extensibility/INetworkStatusListener.cs index 1c419cbe86..ed890810c7 100644 --- a/src/Sentry/Extensibility/INetworkStatusListener.cs +++ b/src/Sentry/Extensibility/INetworkStatusListener.cs @@ -14,11 +14,11 @@ public interface INetworkStatusListener /// /// Gets a value that indicates whether the network is online. /// - bool Online { get; } + public bool Online { get; } /// /// Asynchronously waits for the network to come online. /// /// A token which cancels waiting. - Task WaitForNetworkOnlineAsync(CancellationToken cancellationToken); + public Task WaitForNetworkOnlineAsync(CancellationToken cancellationToken); } diff --git a/src/Sentry/Extensibility/IRequestPayloadExtractor.cs b/src/Sentry/Extensibility/IRequestPayloadExtractor.cs index 730a14e7b7..3a761e1d28 100644 --- a/src/Sentry/Extensibility/IRequestPayloadExtractor.cs +++ b/src/Sentry/Extensibility/IRequestPayloadExtractor.cs @@ -10,5 +10,5 @@ public interface IRequestPayloadExtractor /// /// The HTTP Request object. /// The extracted payload. - object? ExtractPayload(IHttpRequest request); + public object? ExtractPayload(IHttpRequest request); } diff --git a/src/Sentry/Extensibility/ISentryEventExceptionProcessor.cs b/src/Sentry/Extensibility/ISentryEventExceptionProcessor.cs index 129062ddd6..9a736248a0 100644 --- a/src/Sentry/Extensibility/ISentryEventExceptionProcessor.cs +++ b/src/Sentry/Extensibility/ISentryEventExceptionProcessor.cs @@ -10,5 +10,5 @@ public interface ISentryEventExceptionProcessor /// /// The exception to process. /// The event to add data to. - void Process(Exception exception, SentryEvent sentryEvent); + public void Process(Exception exception, SentryEvent sentryEvent); } diff --git a/src/Sentry/Extensibility/ISentryEventProcessor.cs b/src/Sentry/Extensibility/ISentryEventProcessor.cs index 30e43c2382..67a089f945 100644 --- a/src/Sentry/Extensibility/ISentryEventProcessor.cs +++ b/src/Sentry/Extensibility/ISentryEventProcessor.cs @@ -15,7 +15,7 @@ public interface ISentryEventProcessor /// Returning null will stop the processing pipeline. /// Meaning the event should no longer be processed nor send. /// - SentryEvent? Process(SentryEvent @event); + public SentryEvent? Process(SentryEvent @event); } internal static class ISentryEventProcessorExtensions diff --git a/src/Sentry/Extensibility/ISentryEventProcessorWithHint.cs b/src/Sentry/Extensibility/ISentryEventProcessorWithHint.cs index 287e710b38..0d9a8bc1c5 100644 --- a/src/Sentry/Extensibility/ISentryEventProcessorWithHint.cs +++ b/src/Sentry/Extensibility/ISentryEventProcessorWithHint.cs @@ -16,6 +16,6 @@ public interface ISentryEventProcessorWithHint : ISentryEventProcessor /// Returning null will stop the processing pipeline so that the event will neither be processed by /// additional event processors or sent to Sentry. /// - SentryEvent? Process(SentryEvent @event, SentryHint hint); + public SentryEvent? Process(SentryEvent @event, SentryHint hint); } diff --git a/src/Sentry/Extensibility/ISentryHttpRequest.cs b/src/Sentry/Extensibility/ISentryHttpRequest.cs index f592c5fe77..2c7f5288e6 100644 --- a/src/Sentry/Extensibility/ISentryHttpRequest.cs +++ b/src/Sentry/Extensibility/ISentryHttpRequest.cs @@ -8,20 +8,20 @@ public interface IHttpRequest /// /// The content length. /// - long? ContentLength { get; } + public long? ContentLength { get; } /// /// The content type. /// - string? ContentType { get; } + public string? ContentType { get; } /// /// The request body. /// - Stream? Body { get; } + public Stream? Body { get; } /// /// Represents the parsed form values sent with the HttpRequest. /// - IEnumerable>>? Form { get; } + public IEnumerable>>? Form { get; } } diff --git a/src/Sentry/Extensibility/ISentryStackTraceFactory.cs b/src/Sentry/Extensibility/ISentryStackTraceFactory.cs index 1a3b41e965..db572f60a2 100644 --- a/src/Sentry/Extensibility/ISentryStackTraceFactory.cs +++ b/src/Sentry/Extensibility/ISentryStackTraceFactory.cs @@ -10,5 +10,5 @@ public interface ISentryStackTraceFactory /// /// The exception to create the stacktrace from. /// A Sentry stack trace. - SentryStackTrace? Create(Exception? exception = null); + public SentryStackTrace? Create(Exception? exception = null); } diff --git a/src/Sentry/Extensibility/ISentryTransactionProcessor.cs b/src/Sentry/Extensibility/ISentryTransactionProcessor.cs index f8fedc524f..da0ba8f5f2 100644 --- a/src/Sentry/Extensibility/ISentryTransactionProcessor.cs +++ b/src/Sentry/Extensibility/ISentryTransactionProcessor.cs @@ -14,7 +14,7 @@ public interface ISentryTransactionProcessor /// Returning null will stop the processing pipeline. /// Meaning the transaction should no longer be processed nor send. /// - SentryTransaction? Process(SentryTransaction transaction); + public SentryTransaction? Process(SentryTransaction transaction); } internal static class ISentryTransactionProcessorExtensions diff --git a/src/Sentry/Extensibility/ISentryTransactionProcessorWithHint.cs b/src/Sentry/Extensibility/ISentryTransactionProcessorWithHint.cs index c6e62586de..a84ceb78f3 100644 --- a/src/Sentry/Extensibility/ISentryTransactionProcessorWithHint.cs +++ b/src/Sentry/Extensibility/ISentryTransactionProcessorWithHint.cs @@ -15,5 +15,5 @@ public interface ISentryTransactionProcessorWithHint : ISentryTransactionProcess /// Returning null will stop the processing pipeline. /// Meaning the transaction should no longer be processed nor send. /// - SentryTransaction? Process(SentryTransaction transaction, SentryHint hint); + public SentryTransaction? Process(SentryTransaction transaction, SentryHint hint); } diff --git a/src/Sentry/Extensibility/ITransport.cs b/src/Sentry/Extensibility/ITransport.cs index d38db9a925..e95fa45a65 100644 --- a/src/Sentry/Extensibility/ITransport.cs +++ b/src/Sentry/Extensibility/ITransport.cs @@ -12,5 +12,5 @@ public interface ITransport /// /// The envelope to send to Sentry. /// The cancellation token. - Task SendEnvelopeAsync(Envelope envelope, CancellationToken cancellationToken = default); + public Task SendEnvelopeAsync(Envelope envelope, CancellationToken cancellationToken = default); } diff --git a/src/Sentry/Http/ISentryHttpClientFactory.cs b/src/Sentry/Http/ISentryHttpClientFactory.cs index c45067ef75..9a8b763ec1 100644 --- a/src/Sentry/Http/ISentryHttpClientFactory.cs +++ b/src/Sentry/Http/ISentryHttpClientFactory.cs @@ -10,5 +10,5 @@ public interface ISentryHttpClientFactory /// /// The options. /// . - HttpClient Create(SentryOptions options); + public HttpClient Create(SentryOptions options); } diff --git a/src/Sentry/IAttachmentContent.cs b/src/Sentry/IAttachmentContent.cs index fcb0d234b0..757bc4942f 100644 --- a/src/Sentry/IAttachmentContent.cs +++ b/src/Sentry/IAttachmentContent.cs @@ -8,5 +8,5 @@ public interface IAttachmentContent /// /// Gets the stream that represents attachment content. /// - Stream GetStream(); + public Stream GetStream(); } diff --git a/src/Sentry/IEventLike.cs b/src/Sentry/IEventLike.cs index 26ccbed0ed..092b73e6f4 100644 --- a/src/Sentry/IEventLike.cs +++ b/src/Sentry/IEventLike.cs @@ -9,12 +9,12 @@ public interface IEventLike : IHasTags, IHasExtra /// A trail of events which happened prior to an issue. /// /// - IReadOnlyCollection Breadcrumbs { get; } + public IReadOnlyCollection Breadcrumbs { get; } /// /// Adds a breadcrumb. /// - void AddBreadcrumb(Breadcrumb breadcrumb); + public void AddBreadcrumb(Breadcrumb breadcrumb); /// /// The release distribution of the application. @@ -24,7 +24,7 @@ public interface IEventLike : IHasTags, IHasExtra /// /// Sentry level. /// - SentryLevel? Level { get; set; } + public SentryLevel? Level { get; set; } /// /// Gets or sets the HTTP. @@ -32,7 +32,7 @@ public interface IEventLike : IHasTags, IHasExtra /// /// The HTTP. /// - SentryRequest Request { get; set; } + public SentryRequest Request { get; set; } /// /// Gets the structured Sentry context. @@ -40,7 +40,7 @@ public interface IEventLike : IHasTags, IHasExtra /// /// The contexts. /// - SentryContexts Contexts { get; set; } + public SentryContexts Contexts { get; set; } /// /// Gets the user information. @@ -48,18 +48,18 @@ public interface IEventLike : IHasTags, IHasExtra /// /// The user. /// - SentryUser User { get; set; } + public SentryUser User { get; set; } /// /// The release version of the application. /// - string? Release { get; set; } + public string? Release { get; set; } /// /// The environment name, such as 'production' or 'staging'. /// /// Requires Sentry 8.0 or higher. - string? Environment { get; set; } + public string? Environment { get; set; } /// /// The name of the transaction in which there was an event. @@ -70,13 +70,13 @@ public interface IEventLike : IHasTags, IHasExtra /// rather than the actual request path. That is so GET /user/10 and /user/20 /// (which have route template /user/{id}) are identified as the same transaction. /// - string? TransactionName { get; set; } + public string? TransactionName { get; set; } /// /// SDK information. /// /// New in Sentry version: 8.4 - SdkVersion Sdk { get; } + public SdkVersion Sdk { get; } /// /// A list of strings used to dictate the deduplication of this event. @@ -88,7 +88,7 @@ public interface IEventLike : IHasTags, IHasExtra /// /// { "fingerprint": ["myrpc", "POST", "/foo.bar"] } /// { "fingerprint": ["{{ default }}", "http://example.com/my.url"] } - IReadOnlyList Fingerprint { get; set; } + public IReadOnlyList Fingerprint { get; set; } } /// diff --git a/src/Sentry/IHasData.cs b/src/Sentry/IHasData.cs index 980f403731..1f7257b11d 100644 --- a/src/Sentry/IHasData.cs +++ b/src/Sentry/IHasData.cs @@ -8,10 +8,10 @@ public interface IHasData /// /// An arbitrary mapping of additional metadata to store with the event. /// - IReadOnlyDictionary Data { get; } + public IReadOnlyDictionary Data { get; } /// /// Sets an extra. /// - void SetData(string key, object? value); + public void SetData(string key, object? value); } diff --git a/src/Sentry/IHasExtra.cs b/src/Sentry/IHasExtra.cs index 174b73f3c9..54bc034d53 100644 --- a/src/Sentry/IHasExtra.cs +++ b/src/Sentry/IHasExtra.cs @@ -8,12 +8,12 @@ public interface IHasExtra /// /// An arbitrary mapping of additional metadata to store with the event. /// - IReadOnlyDictionary Extra { get; } + public IReadOnlyDictionary Extra { get; } /// /// Sets an extra. /// - void SetExtra(string key, object? value); + public void SetExtra(string key, object? value); } /// diff --git a/src/Sentry/IHasTags.cs b/src/Sentry/IHasTags.cs index 3a78dc5792..e5900563ab 100644 --- a/src/Sentry/IHasTags.cs +++ b/src/Sentry/IHasTags.cs @@ -8,17 +8,17 @@ public interface IHasTags /// /// Arbitrary key-value for this event. /// - IReadOnlyDictionary Tags { get; } + public IReadOnlyDictionary Tags { get; } /// /// Sets a tag. /// - void SetTag(string key, string value); + public void SetTag(string key, string value); /// /// Removes a tag. /// - void UnsetTag(string key); + public void UnsetTag(string key); } /// diff --git a/src/Sentry/IHub.cs b/src/Sentry/IHub.cs index 5b8d923f7b..f7a609805b 100644 --- a/src/Sentry/IHub.cs +++ b/src/Sentry/IHub.cs @@ -15,12 +15,12 @@ public interface IHub : ISentryClient, ISentryScopeManager /// /// Last event id recorded in the current scope. /// - SentryId LastEventId { get; } + public SentryId LastEventId { get; } /// /// Starts a transaction. /// - ITransactionTracer StartTransaction( + public ITransactionTracer StartTransaction( ITransactionContext context, IReadOnlyDictionary customSamplingContext); @@ -30,22 +30,22 @@ ITransactionTracer StartTransaction( /// /// This method is used internally and is not meant for public use. /// - void BindException(Exception exception, ISpan span); + public void BindException(Exception exception, ISpan span); /// /// Gets the currently ongoing (not finished) span or null if none available. /// - ISpan? GetSpan(); + public ISpan? GetSpan(); /// /// Gets the Sentry trace header that allows tracing across services /// - SentryTraceHeader? GetTraceHeader(); + public SentryTraceHeader? GetTraceHeader(); /// /// Gets the Sentry baggage header that allows tracing across services /// - BaggageHeader? GetBaggage(); + public BaggageHeader? GetBaggage(); /// /// Continues a trace based on HTTP header values provided as strings. @@ -53,7 +53,7 @@ ITransactionTracer StartTransaction( /// /// If no "sentry-trace" header is provided a random trace ID and span ID is created. /// - TransactionContext ContinueTrace( + public TransactionContext ContinueTrace( string? traceHeader, string? baggageHeader, string? name = null, @@ -65,7 +65,7 @@ TransactionContext ContinueTrace( /// /// If no "sentry-trace" header is provided a random trace ID and span ID is created. /// - TransactionContext ContinueTrace( + public TransactionContext ContinueTrace( SentryTraceHeader? traceHeader, BaggageHeader? baggageHeader, string? name = null, @@ -74,12 +74,12 @@ TransactionContext ContinueTrace( /// /// Starts a new session. /// - void StartSession(); + public void StartSession(); /// /// Pauses an active session. /// - void PauseSession(); + public void PauseSession(); /// /// Resumes an active session. @@ -87,12 +87,12 @@ TransactionContext ContinueTrace( /// then the paused session is /// ended and a new one is started instead. /// - void ResumeSession(); + public void ResumeSession(); /// /// Ends the currently active session. /// - void EndSession(SessionEndStatus status = SessionEndStatus.Exited); + public void EndSession(SessionEndStatus status = SessionEndStatus.Exited); /// /// Captures an event with a configurable scope. diff --git a/src/Sentry/IScopeObserver.cs b/src/Sentry/IScopeObserver.cs index 3757122d83..591188b3c8 100644 --- a/src/Sentry/IScopeObserver.cs +++ b/src/Sentry/IScopeObserver.cs @@ -8,25 +8,25 @@ public interface IScopeObserver /// /// Adds a breadcrumb. /// - void AddBreadcrumb(Breadcrumb breadcrumb); + public void AddBreadcrumb(Breadcrumb breadcrumb); /// /// Sets an extra. /// - void SetExtra(string key, object? value); + public void SetExtra(string key, object? value); /// /// Sets a tag. /// - void SetTag(string key, string value); + public void SetTag(string key, string value); /// /// Removes a tag. /// - void UnsetTag(string key); + public void UnsetTag(string key); /// /// Sets the user information. /// - void SetUser(SentryUser? user); + public void SetUser(SentryUser? user); } diff --git a/src/Sentry/ISentryClient.cs b/src/Sentry/ISentryClient.cs index e3e12fe191..d9f974c2a4 100644 --- a/src/Sentry/ISentryClient.cs +++ b/src/Sentry/ISentryClient.cs @@ -10,14 +10,14 @@ public interface ISentryClient /// /// Whether the client is enabled or not. /// - bool IsEnabled { get; } + public bool IsEnabled { get; } /// /// Capture an envelope and queue it. /// /// The envelope. /// true if the enveloped was queued, false otherwise. - bool CaptureEnvelope(Envelope envelope); + public bool CaptureEnvelope(Envelope envelope); /// /// Capture the event @@ -26,13 +26,13 @@ public interface ISentryClient /// An optional scope to be applied to the event. /// An optional hint providing high level context for the source of the event /// The Id of the event. - SentryId CaptureEvent(SentryEvent evt, Scope? scope = null, SentryHint? hint = null); + public SentryId CaptureEvent(SentryEvent evt, Scope? scope = null, SentryHint? hint = null); /// /// Captures a user feedback. /// /// The user feedback to send to Sentry. - void CaptureUserFeedback(UserFeedback userFeedback); + public void CaptureUserFeedback(UserFeedback userFeedback); /// /// Captures a transaction. @@ -43,7 +43,7 @@ public interface ISentryClient /// /// The transaction. [EditorBrowsable(EditorBrowsableState.Never)] - void CaptureTransaction(SentryTransaction transaction); + public void CaptureTransaction(SentryTransaction transaction); /// /// Captures a transaction. @@ -59,7 +59,7 @@ public interface ISentryClient /// This will be available in callbacks prior to processing the transaction. /// [EditorBrowsable(EditorBrowsableState.Never)] - void CaptureTransaction(SentryTransaction transaction, Scope? scope, SentryHint? hint); + public void CaptureTransaction(SentryTransaction transaction, Scope? scope, SentryHint? hint); /// /// Captures a session update. @@ -69,7 +69,7 @@ public interface ISentryClient /// It will be called automatically by the SDK. /// /// The update to send to Sentry. - void CaptureSession(SessionUpdate sessionUpdate); + public void CaptureSession(SessionUpdate sessionUpdate); /// /// Captures a Checkin. @@ -80,7 +80,7 @@ public interface ISentryClient /// /// /// The optional monitor config used to create a Check-In programmatically. - SentryId CaptureCheckIn(string monitorSlug, + public SentryId CaptureCheckIn(string monitorSlug, CheckInStatus status, SentryId? sentryId = null, TimeSpan? duration = null, @@ -92,5 +92,5 @@ SentryId CaptureCheckIn(string monitorSlug, /// /// The amount of time allowed for flushing. /// A task to await for the flush operation. - Task FlushAsync(TimeSpan timeout); + public Task FlushAsync(TimeSpan timeout); } diff --git a/src/Sentry/ISentryFailedRequestHandler.cs b/src/Sentry/ISentryFailedRequestHandler.cs index dcde535338..bb2f947d4b 100644 --- a/src/Sentry/ISentryFailedRequestHandler.cs +++ b/src/Sentry/ISentryFailedRequestHandler.cs @@ -2,5 +2,5 @@ namespace Sentry; internal interface ISentryFailedRequestHandler { - void HandleResponse(HttpResponseMessage response); + public void HandleResponse(HttpResponseMessage response); } diff --git a/src/Sentry/ISentryJsonSerializable.cs b/src/Sentry/ISentryJsonSerializable.cs index 4775d59fed..387a5f501d 100644 --- a/src/Sentry/ISentryJsonSerializable.cs +++ b/src/Sentry/ISentryJsonSerializable.cs @@ -15,5 +15,5 @@ public interface ISentryJsonSerializable /// Note: this method is meant only for internal use and is exposed due to a language limitation. /// Avoid relying on this method in user code. /// - void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? logger); + public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? logger); } diff --git a/src/Sentry/ISentryScopeManager.cs b/src/Sentry/ISentryScopeManager.cs index 72456843b1..3fd221c229 100644 --- a/src/Sentry/ISentryScopeManager.cs +++ b/src/Sentry/ISentryScopeManager.cs @@ -13,27 +13,27 @@ public interface ISentryScopeManager /// Configures the current scope. /// /// The configure scope. - void ConfigureScope(Action configureScope); + public void ConfigureScope(Action configureScope); /// /// Asynchronously configure the current scope. /// /// The configure scope. /// A task that completes when the callback is done or a completed task if the SDK is disabled. - Task ConfigureScopeAsync(Func configureScope); + public Task ConfigureScopeAsync(Func configureScope); /// /// Binds the client to the current scope. /// /// The client. - void BindClient(ISentryClient client); + public void BindClient(ISentryClient client); /// /// Pushes a new scope into the stack which is removed upon Dispose. /// /// A disposable which removes the scope /// from the environment when invoked. - IDisposable PushScope(); + public IDisposable PushScope(); /// /// Pushes a new scope into the stack which is removed upon Dispose. @@ -41,5 +41,5 @@ public interface ISentryScopeManager /// A state to associate with the scope. /// A disposable which removes the scope /// from the environment when invoked. - IDisposable PushScope(TState state); + public IDisposable PushScope(TState state); } diff --git a/src/Sentry/ISentryScopeStateProcessor.cs b/src/Sentry/ISentryScopeStateProcessor.cs index c6aeb56fe4..d339fe0b83 100644 --- a/src/Sentry/ISentryScopeStateProcessor.cs +++ b/src/Sentry/ISentryScopeStateProcessor.cs @@ -8,5 +8,5 @@ public interface ISentryScopeStateProcessor /// /// Applies state onto a scope. /// - void Apply(Scope scope, object state); + public void Apply(Scope scope, object state); } diff --git a/src/Sentry/ISentrySession.cs b/src/Sentry/ISentrySession.cs index ecf721d0cc..d2f8686584 100644 --- a/src/Sentry/ISentrySession.cs +++ b/src/Sentry/ISentrySession.cs @@ -8,40 +8,40 @@ public interface ISentrySession /// /// Session auto-generated ID. /// - SentryId Id { get; } + public SentryId Id { get; } /// /// Session distinct ID. /// - string? DistinctId { get; } + public string? DistinctId { get; } /// /// Session start timestamp. /// - DateTimeOffset StartTimestamp { get; } + public DateTimeOffset StartTimestamp { get; } /// /// Release. /// - string Release { get; } + public string Release { get; } /// /// Environment. /// - string? Environment { get; } + public string? Environment { get; } /// /// IP address of the user. /// - string? IpAddress { get; } + public string? IpAddress { get; } /// /// User agent. /// - string? UserAgent { get; } + public string? UserAgent { get; } /// /// Reported error count. /// - int ErrorCount { get; } + public int ErrorCount { get; } } diff --git a/src/Sentry/ISessionManager.cs b/src/Sentry/ISessionManager.cs index 7f52f43e46..b529a72b56 100644 --- a/src/Sentry/ISessionManager.cs +++ b/src/Sentry/ISessionManager.cs @@ -2,19 +2,19 @@ namespace Sentry; internal interface ISessionManager { - bool IsSessionActive { get; } + public bool IsSessionActive { get; } - SessionUpdate? TryRecoverPersistedSession(); + public SessionUpdate? TryRecoverPersistedSession(); - SessionUpdate? StartSession(); + public SessionUpdate? StartSession(); - SessionUpdate? EndSession(DateTimeOffset timestamp, SessionEndStatus status); + public SessionUpdate? EndSession(DateTimeOffset timestamp, SessionEndStatus status); - SessionUpdate? EndSession(SessionEndStatus status); + public SessionUpdate? EndSession(SessionEndStatus status); - void PauseSession(); + public void PauseSession(); - IReadOnlyList ResumeSession(); + public IReadOnlyList ResumeSession(); - SessionUpdate? ReportError(); + public SessionUpdate? ReportError(); } diff --git a/src/Sentry/ISpan.cs b/src/Sentry/ISpan.cs index e1f4ad436c..0259ac02c0 100644 --- a/src/Sentry/ISpan.cs +++ b/src/Sentry/ISpan.cs @@ -11,44 +11,44 @@ public interface ISpan : ISpanData /// Span description. /// // 'new' because it adds a setter. - new string? Description { get; set; } + public new string? Description { get; set; } /// /// Span operation. /// // 'new' because it adds a setter. - new string Operation { get; set; } + public new string Operation { get; set; } /// /// Span status. /// // 'new' because it adds a setter. - new SpanStatus? Status { get; set; } + public new SpanStatus? Status { get; set; } /// /// Starts a child span. /// - ISpan StartChild(string operation); + public ISpan StartChild(string operation); /// /// Finishes the span. /// - void Finish(); + public void Finish(); /// /// Finishes the span with the specified status. /// - void Finish(SpanStatus status); + public void Finish(SpanStatus status); /// /// Finishes the span with the specified exception and status. /// - void Finish(Exception exception, SpanStatus status); + public void Finish(Exception exception, SpanStatus status); /// /// Finishes the span with the specified exception and automatically inferred status. /// - void Finish(Exception exception); + public void Finish(Exception exception); } /// diff --git a/src/Sentry/ISpanData.cs b/src/Sentry/ISpanData.cs index 3a475102b8..55c1dd80c1 100644 --- a/src/Sentry/ISpanData.cs +++ b/src/Sentry/ISpanData.cs @@ -10,34 +10,34 @@ public interface ISpanData : ITraceContext, IHasData, IHasTags, IHasExtra /// /// Start timestamp. /// - DateTimeOffset StartTimestamp { get; } + public DateTimeOffset StartTimestamp { get; } /// /// End timestamp. /// - DateTimeOffset? EndTimestamp { get; } + public DateTimeOffset? EndTimestamp { get; } /// /// Whether the span is finished. /// - bool IsFinished { get; } + public bool IsFinished { get; } /// /// Get Sentry trace header. /// - SentryTraceHeader GetTraceHeader(); + public SentryTraceHeader GetTraceHeader(); /// /// The measurements that have been set on the transaction. /// - IReadOnlyDictionary Measurements { get; } + public IReadOnlyDictionary Measurements { get; } /// /// Sets a measurement on the transaction. /// /// The name of the measurement. /// The measurement. - void SetMeasurement(string name, Measurement measurement); + public void SetMeasurement(string name, Measurement measurement); } /// diff --git a/src/Sentry/ITransactionContext.cs b/src/Sentry/ITransactionContext.cs index d1cb0dc849..e1ffc74bb6 100644 --- a/src/Sentry/ITransactionContext.cs +++ b/src/Sentry/ITransactionContext.cs @@ -10,15 +10,15 @@ public interface ITransactionContext : ITraceContext /// /// Transaction name. /// - string Name { get; } + public string Name { get; } /// /// Whether the parent transaction of this transaction has been sampled. /// - bool? IsParentSampled { get; } + public bool? IsParentSampled { get; } /// /// The source of the transaction name. /// - TransactionNameSource NameSource { get; } + public TransactionNameSource NameSource { get; } } diff --git a/src/Sentry/ITransactionTracer.cs b/src/Sentry/ITransactionTracer.cs index 015840061c..9971321f2c 100644 --- a/src/Sentry/ITransactionTracer.cs +++ b/src/Sentry/ITransactionTracer.cs @@ -9,21 +9,21 @@ public interface ITransactionTracer : ITransactionData, ISpan /// Transaction name. /// // 'new' because it adds a setter - new string Name { get; set; } + public new string Name { get; set; } /// /// Whether the parent transaction of this transaction has been sampled. /// // 'new' because it adds a setter - new bool? IsParentSampled { get; set; } + public new bool? IsParentSampled { get; set; } /// /// Flat list of spans within this transaction. /// - IReadOnlyCollection Spans { get; } + public IReadOnlyCollection Spans { get; } /// /// Gets the last active (not finished) span in this transaction. /// - ISpan? GetLastActiveSpan(); + public ISpan? GetLastActiveSpan(); } diff --git a/src/Sentry/Infrastructure/ISystemClock.cs b/src/Sentry/Infrastructure/ISystemClock.cs index ca9b8ee7f2..d13f407ced 100644 --- a/src/Sentry/Infrastructure/ISystemClock.cs +++ b/src/Sentry/Infrastructure/ISystemClock.cs @@ -11,5 +11,5 @@ public interface ISystemClock /// /// Gets the current time in UTC. /// - DateTimeOffset GetUtcNow(); + public DateTimeOffset GetUtcNow(); } diff --git a/src/Sentry/Integrations/ISdkIntegration.cs b/src/Sentry/Integrations/ISdkIntegration.cs index 561195ffc7..898e5b39db 100644 --- a/src/Sentry/Integrations/ISdkIntegration.cs +++ b/src/Sentry/Integrations/ISdkIntegration.cs @@ -13,5 +13,5 @@ public interface ISdkIntegration /// /// The hub. /// The options. - void Register(IHub hub, SentryOptions options); + public void Register(IHub hub, SentryOptions options); } diff --git a/src/Sentry/Internal/AppDomainAdapter.cs b/src/Sentry/Internal/AppDomainAdapter.cs index e6201182c0..1849a88cac 100644 --- a/src/Sentry/Internal/AppDomainAdapter.cs +++ b/src/Sentry/Internal/AppDomainAdapter.cs @@ -2,11 +2,11 @@ namespace Sentry.Internal; internal interface IAppDomain { - event UnhandledExceptionEventHandler UnhandledException; + public event UnhandledExceptionEventHandler UnhandledException; - event EventHandler ProcessExit; + public event EventHandler ProcessExit; - event EventHandler UnobservedTaskException; + public event EventHandler UnobservedTaskException; } internal sealed class AppDomainAdapter : IAppDomain diff --git a/src/Sentry/Internal/IClientReportRecorder.cs b/src/Sentry/Internal/IClientReportRecorder.cs index 980d827b9d..de80abb795 100644 --- a/src/Sentry/Internal/IClientReportRecorder.cs +++ b/src/Sentry/Internal/IClientReportRecorder.cs @@ -8,7 +8,7 @@ internal interface IClientReportRecorder /// The reason for the event being discarded. /// The data category of the event being discardedd. /// The number of items discarded (defaults to 1) - void RecordDiscardedEvent(DiscardReason reason, DataCategory category, int quantity = 1); + public void RecordDiscardedEvent(DiscardReason reason, DataCategory category, int quantity = 1); /// /// Generates a containing counts of discarded events that have been recorded. @@ -18,7 +18,7 @@ internal interface IClientReportRecorder /// The , as long as there is something to report. /// Returns null if there were no discarded events recorded since the previous call to this method. /// - ClientReport? GenerateClientReport(); + public ClientReport? GenerateClientReport(); /// /// Loads the current instance with the events from the provided . @@ -27,5 +27,5 @@ internal interface IClientReportRecorder /// Useful when recovering from failures while sending client reports. /// /// The client report to load. - void Load(ClientReport report); + public void Load(ClientReport report); } diff --git a/src/Sentry/Internal/ICloneable.cs b/src/Sentry/Internal/ICloneable.cs index 7a6e8ed0e6..a64a7c48a8 100644 --- a/src/Sentry/Internal/ICloneable.cs +++ b/src/Sentry/Internal/ICloneable.cs @@ -2,5 +2,5 @@ namespace Sentry.Internal; internal interface ICloneable { - T Clone(); + public T Clone(); } diff --git a/src/Sentry/Internal/IFileSystem.cs b/src/Sentry/Internal/IFileSystem.cs index bcb041336f..366bf70583 100644 --- a/src/Sentry/Internal/IFileSystem.cs +++ b/src/Sentry/Internal/IFileSystem.cs @@ -10,19 +10,19 @@ internal interface IFileSystem // Note: This is not comprehensive. If you need other filesystem methods, add to this interface, // then implement in both Sentry.Internal.FileSystem and Sentry.Testing.FakeFileSystem. - IEnumerable EnumerateFiles(string path); - IEnumerable EnumerateFiles(string path, string searchPattern); - IEnumerable EnumerateFiles(string path, string searchPattern, SearchOption searchOption); - bool DirectoryExists(string path); - bool FileExists(string path); - DateTimeOffset GetFileCreationTime(string path); - string? ReadAllTextFromFile(string file); - Stream OpenFileForReading(string path); + public IEnumerable EnumerateFiles(string path); + public IEnumerable EnumerateFiles(string path, string searchPattern); + public IEnumerable EnumerateFiles(string path, string searchPattern, SearchOption searchOption); + public bool DirectoryExists(string path); + public bool FileExists(string path); + public DateTimeOffset GetFileCreationTime(string path); + public string? ReadAllTextFromFile(string file); + public Stream OpenFileForReading(string path); - bool CreateDirectory(string path); - bool DeleteDirectory(string path, bool recursive = false); - bool CreateFileForWriting(string path, out Stream fileStream); - bool WriteAllTextToFile(string path, string contents); - bool MoveFile(string sourceFileName, string destFileName, bool overwrite = false); - bool DeleteFile(string path); + public bool CreateDirectory(string path); + public bool DeleteDirectory(string path, bool recursive = false); + public bool CreateFileForWriting(string path, out Stream fileStream); + public bool WriteAllTextToFile(string path, string contents); + public bool MoveFile(string sourceFileName, string destFileName, bool overwrite = false); + public bool DeleteFile(string path); } diff --git a/src/Sentry/Internal/IGCImplementation.cs b/src/Sentry/Internal/IGCImplementation.cs index a148aa2936..a62a08df24 100644 --- a/src/Sentry/Internal/IGCImplementation.cs +++ b/src/Sentry/Internal/IGCImplementation.cs @@ -5,8 +5,8 @@ namespace Sentry.Internal; /// internal interface IGCImplementation { - void RegisterForFullGCNotification(int maxGenerationThreshold, int largeObjectHeapThreshold); - GCNotificationStatus WaitForFullGCComplete(TimeSpan timeout); - void CancelFullGCNotification(); - long TotalAvailableMemoryBytes { get; } + public void RegisterForFullGCNotification(int maxGenerationThreshold, int largeObjectHeapThreshold); + public GCNotificationStatus WaitForFullGCComplete(TimeSpan timeout); + public void CancelFullGCNotification(); + public long TotalAvailableMemoryBytes { get; } } diff --git a/src/Sentry/Internal/IInternalScopeManager.cs b/src/Sentry/Internal/IInternalScopeManager.cs index 81398d1ec4..474c2681f4 100644 --- a/src/Sentry/Internal/IInternalScopeManager.cs +++ b/src/Sentry/Internal/IInternalScopeManager.cs @@ -4,8 +4,8 @@ namespace Sentry.Internal; internal interface IInternalScopeManager : ISentryScopeManager, IDisposable { - KeyValuePair GetCurrent(); - void RestoreScope(Scope savedScope); + public KeyValuePair GetCurrent(); + public void RestoreScope(Scope savedScope); - IScopeStackContainer ScopeStackContainer { get; } + public IScopeStackContainer ScopeStackContainer { get; } } diff --git a/src/Sentry/Internal/IStringOrRegexMatcher.cs b/src/Sentry/Internal/IStringOrRegexMatcher.cs index 916eb5fc55..18826f7f46 100644 --- a/src/Sentry/Internal/IStringOrRegexMatcher.cs +++ b/src/Sentry/Internal/IStringOrRegexMatcher.cs @@ -5,5 +5,5 @@ internal interface IStringOrRegexMatcher /// /// Evaluates if the given value matches the string or regex. /// - bool IsMatch(StringOrRegex stringOrRegex, string value); + public bool IsMatch(StringOrRegex stringOrRegex, string value); } diff --git a/src/Sentry/Internal/ITransactionProfiler.cs b/src/Sentry/Internal/ITransactionProfiler.cs index e17ace104a..480ef7480c 100644 --- a/src/Sentry/Internal/ITransactionProfiler.cs +++ b/src/Sentry/Internal/ITransactionProfiler.cs @@ -8,7 +8,7 @@ internal interface ITransactionProfilerFactory /// /// Called during transaction start to start a new profiler, if applicable. /// - ITransactionProfiler? Start(ITransactionTracer transaction, CancellationToken cancellationToken); + public ITransactionProfiler? Start(ITransactionTracer transaction, CancellationToken cancellationToken); } /// @@ -19,9 +19,9 @@ internal interface ITransactionProfiler /// /// Called when the transaction ends - this should stop profile samples collection. /// - void Finish(); + public void Finish(); /// Process and collect the profile. /// The collected profile. - ISerializable? Collect(SentryTransaction transaction); + public ISerializable? Collect(SentryTransaction transaction); } diff --git a/src/Sentry/Internal/IUpdatable.cs b/src/Sentry/Internal/IUpdatable.cs index 7606a4ae13..dced987210 100644 --- a/src/Sentry/Internal/IUpdatable.cs +++ b/src/Sentry/Internal/IUpdatable.cs @@ -3,10 +3,10 @@ namespace Sentry.Internal; internal interface IUpdatable : IUpdatable where T : IUpdatable { - void UpdateFrom(T source); + public void UpdateFrom(T source); } internal interface IUpdatable { - void UpdateFrom(object source); + public void UpdateFrom(object source); } diff --git a/src/Sentry/Internal/ScopeStack/IScopeStackContainer.cs b/src/Sentry/Internal/ScopeStack/IScopeStackContainer.cs index 8d50c3d528..56060d03fe 100644 --- a/src/Sentry/Internal/ScopeStack/IScopeStackContainer.cs +++ b/src/Sentry/Internal/ScopeStack/IScopeStackContainer.cs @@ -2,5 +2,5 @@ namespace Sentry.Internal.ScopeStack; internal interface IScopeStackContainer { - KeyValuePair[]? Stack { get; set; } + public KeyValuePair[]? Stack { get; set; } } diff --git a/src/Sentry/Internal/StackFrame.cs b/src/Sentry/Internal/StackFrame.cs index 5d11ec2145..ad71b40a04 100644 --- a/src/Sentry/Internal/StackFrame.cs +++ b/src/Sentry/Internal/StackFrame.cs @@ -6,7 +6,7 @@ namespace Sentry.Internal; /// internal interface IStackFrame { - StackFrame? Frame { get; } + public StackFrame? Frame { get; } /// /// Returns a pointer to the base address of the native image that this stack frame is executing. diff --git a/src/Sentry/Internal/TcpPing.cs b/src/Sentry/Internal/TcpPing.cs index 7a922c96e6..9df889c5df 100644 --- a/src/Sentry/Internal/TcpPing.cs +++ b/src/Sentry/Internal/TcpPing.cs @@ -2,7 +2,7 @@ namespace Sentry.Internal; internal interface IPing { - Task IsAvailableAsync(CancellationToken cancellationToken); + public Task IsAvailableAsync(CancellationToken cancellationToken); } internal class TcpPing(string hostToCheck, int portToCheck = 443) : IPing diff --git a/src/Sentry/Protocol/Envelopes/ISerializable.cs b/src/Sentry/Protocol/Envelopes/ISerializable.cs index 3b861c93ae..4fefc262b4 100644 --- a/src/Sentry/Protocol/Envelopes/ISerializable.cs +++ b/src/Sentry/Protocol/Envelopes/ISerializable.cs @@ -10,10 +10,10 @@ public interface ISerializable /// /// Serializes the object to a stream asynchronously. /// - Task SerializeAsync(Stream stream, IDiagnosticLogger? logger, CancellationToken cancellationToken = default); + public Task SerializeAsync(Stream stream, IDiagnosticLogger? logger, CancellationToken cancellationToken = default); /// /// Serializes the object to a stream synchronously. /// - void Serialize(Stream stream, IDiagnosticLogger? logger); + public void Serialize(Stream stream, IDiagnosticLogger? logger); } diff --git a/src/Sentry/Protocol/ITraceContext.cs b/src/Sentry/Protocol/ITraceContext.cs index 3a0ec29aa5..6bad1e1a4e 100644 --- a/src/Sentry/Protocol/ITraceContext.cs +++ b/src/Sentry/Protocol/ITraceContext.cs @@ -8,22 +8,22 @@ public interface ITraceContext /// /// Span ID. /// - SpanId SpanId { get; } + public SpanId SpanId { get; } /// /// Parent ID. /// - SpanId? ParentSpanId { get; } + public SpanId? ParentSpanId { get; } /// /// Trace ID. /// - SentryId TraceId { get; } + public SentryId TraceId { get; } /// /// Operation. /// - string Operation { get; } + public string Operation { get; } /// /// Specifies the origin of the trace. If no origin is set then the trace origin is assumed to be "manual". @@ -31,17 +31,17 @@ public interface ITraceContext /// /// See https://develop.sentry.dev/sdk/performance/trace-origin/ for more information. /// - string? Origin { get; } + public string? Origin { get; } /// /// Description. /// - string? Description { get; } + public string? Description { get; } /// /// Status. /// - SpanStatus? Status { get; } + public SpanStatus? Status { get; } // Note: this may need to be mutated internally, // but the user should never be able to change it @@ -50,5 +50,5 @@ public interface ITraceContext /// /// Whether the span or transaction is sampled in (i.e. eligible for sending to Sentry). /// - bool? IsSampled { get; } + public bool? IsSampled { get; } }