From cabec71f6621a80a24c332a609fd43902046f644 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Sat, 29 Jan 2022 18:04:42 +0100 Subject: [PATCH 1/4] make types and members public --- src/Sentry/Envelopes/Envelope.cs | 2 +- src/Sentry/Envelopes/EnvelopeItem.cs | 2 +- src/Sentry/Envelopes/ISerializable.cs | 2 +- src/Sentry/Extensibility/IBackgroundWorker.cs | 2 +- src/Sentry/SentryOptions.cs | 5 ++++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Sentry/Envelopes/Envelope.cs b/src/Sentry/Envelopes/Envelope.cs index 2473db6462..91badd1cd6 100644 --- a/src/Sentry/Envelopes/Envelope.cs +++ b/src/Sentry/Envelopes/Envelope.cs @@ -14,7 +14,7 @@ namespace Sentry.Protocol.Envelopes /// /// Envelope. /// - internal sealed class Envelope : ISerializable, IDisposable + public sealed class Envelope : ISerializable, IDisposable { private const string EventIdKey = "event_id"; diff --git a/src/Sentry/Envelopes/EnvelopeItem.cs b/src/Sentry/Envelopes/EnvelopeItem.cs index 0cc4d28c92..b889a4cc52 100644 --- a/src/Sentry/Envelopes/EnvelopeItem.cs +++ b/src/Sentry/Envelopes/EnvelopeItem.cs @@ -13,7 +13,7 @@ namespace Sentry.Protocol.Envelopes /// /// Envelope item. /// - internal sealed class EnvelopeItem : ISerializable, IDisposable + public sealed class EnvelopeItem : ISerializable, IDisposable { private const string TypeKey = "type"; private const string TypeValueEvent = "event"; diff --git a/src/Sentry/Envelopes/ISerializable.cs b/src/Sentry/Envelopes/ISerializable.cs index df6f8a4269..267a1c7e14 100644 --- a/src/Sentry/Envelopes/ISerializable.cs +++ b/src/Sentry/Envelopes/ISerializable.cs @@ -8,7 +8,7 @@ namespace Sentry.Protocol.Envelopes /// /// Represents a serializable entity. /// - internal interface ISerializable + public interface ISerializable { /// /// Serializes the object to a stream. diff --git a/src/Sentry/Extensibility/IBackgroundWorker.cs b/src/Sentry/Extensibility/IBackgroundWorker.cs index cefe373831..39e8d60651 100644 --- a/src/Sentry/Extensibility/IBackgroundWorker.cs +++ b/src/Sentry/Extensibility/IBackgroundWorker.cs @@ -7,7 +7,7 @@ namespace Sentry.Extensibility /// /// A worker that queues envelopes synchronously and flushes async. /// - internal interface IBackgroundWorker + public interface IBackgroundWorker { /// /// Attempts to queue the envelope with the worker. diff --git a/src/Sentry/SentryOptions.cs b/src/Sentry/SentryOptions.cs index 679a6181f6..0fe842378d 100644 --- a/src/Sentry/SentryOptions.cs +++ b/src/Sentry/SentryOptions.cs @@ -83,7 +83,10 @@ public bool IsGlobalModeEnabled internal IExceptionFilter[]? ExceptionFilters { get; set; } = Array.Empty(); - internal IBackgroundWorker? BackgroundWorker { get; set; } + /// + /// The worker used by the client and passes to the transport. + /// + public IBackgroundWorker? BackgroundWorker { get; set; } internal ISentryHttpClientFactory? SentryHttpClientFactory { get; set; } From d5f52cc10bd93605275dc759f83bba84f26b62eb Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Sat, 29 Jan 2022 18:07:07 +0100 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c4174492d..07cf098cef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,12 @@ # Changelog -## 3.13.0 +## Unreleased + +### Features -### Various fixes & improvements +- The implementation of the background worker can now be changed ([#1450](https://github.com/getsentry/sentry-dotnet/pull/1450)) -- fix flakey memory test (#1430) by @SimonCropp -- dispose of client should only flush (#1354) by @SimonCropp -- Add CaptureLastError for ASP.NET (#1411) by @lucas-zimerman -- add IsDynamicCode* to events (#1418) by @SimonCropp -- Report ThreadPool stats (#1399) by @SimonCropp +## 3.13.0 ## Features From df7381e249d395374e4e59fb104ccf6ccb468f06 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Sat, 29 Jan 2022 18:10:03 +0100 Subject: [PATCH 3/4] doc --- CHANGELOG.md | 7 +------ src/Sentry/Envelopes/EnvelopeItem.cs | 4 ++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ab6c86f91..972345214f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,15 +4,10 @@ ### Features -- The implementation of the background worker can now be changed ([#1450](https://github.com/getsentry/sentry-dotnet/pull/1450)) - -## 3.13.0 - -## Features - - Add the delegate TransactionNameProvider to allow the name definition from Unknown transactions on ASP.NET Core ([#1421](https://github.com/getsentry/sentry-dotnet/pull/1421)) - SentrySDK.WithScope is now obsolete in favour of overloads of CaptureEvent, CaptureMessage, CaptureException ([#1412](https://github.com/getsentry/sentry-dotnet/pull/1412)) - Add Sentry to global usings when ImplicitUsings is enabled (`true`) ([#1398](https://github.com/getsentry/sentry-dotnet/pull/1398)) +- The implementation of the background worker can now be changed ([#1450](https://github.com/getsentry/sentry-dotnet/pull/1450)) ### Fixes diff --git a/src/Sentry/Envelopes/EnvelopeItem.cs b/src/Sentry/Envelopes/EnvelopeItem.cs index b889a4cc52..05d74d3e29 100644 --- a/src/Sentry/Envelopes/EnvelopeItem.cs +++ b/src/Sentry/Envelopes/EnvelopeItem.cs @@ -58,6 +58,10 @@ public EnvelopeItem(IReadOnlyDictionary header, ISerializable p var value => Convert.ToInt64(value) // can be int, long, or another numeric type }; + /// + /// Returns the file name or null if no name exists. + /// + /// The file name or null. public string? TryGetFileName() => Header.GetValueOrDefault(FileNameKey) as string; private async Task BufferPayloadAsync(IDiagnosticLogger? logger, CancellationToken cancellationToken = default) From 58046e5ef853fc3f54602c901fa992162c434ab3 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Sat, 29 Jan 2022 18:19:29 +0100 Subject: [PATCH 4/4] verify --- src/Sentry/SentryOptions.cs | 2 +- .../ApiApprovalTests.Run.Core3_1.verified.txt | 45 +++++++++++++++++++ ...piApprovalTests.Run.DotNet5_0.verified.txt | 45 +++++++++++++++++++ ...piApprovalTests.Run.DotNet6_0.verified.txt | 45 +++++++++++++++++++ .../ApiApprovalTests.Run.Core2_1.verified.txt | 45 +++++++++++++++++++ .../ApiApprovalTests.Run.Core3_0.verified.txt | 45 +++++++++++++++++++ .../ApiApprovalTests.Run.Core3_1.verified.txt | 45 +++++++++++++++++++ ...piApprovalTests.Run.DotNet4_6.verified.txt | 45 +++++++++++++++++++ ...piApprovalTests.Run.DotNet5_0.verified.txt | 45 +++++++++++++++++++ ...piApprovalTests.Run.DotNet6_0.verified.txt | 45 +++++++++++++++++++ 10 files changed, 406 insertions(+), 1 deletion(-) diff --git a/src/Sentry/SentryOptions.cs b/src/Sentry/SentryOptions.cs index 0fe842378d..a6f4d63ef7 100644 --- a/src/Sentry/SentryOptions.cs +++ b/src/Sentry/SentryOptions.cs @@ -84,7 +84,7 @@ public bool IsGlobalModeEnabled internal IExceptionFilter[]? ExceptionFilters { get; set; } = Array.Empty(); /// - /// The worker used by the client and passes to the transport. + /// The worker used by the client to pass envelopes. /// public IBackgroundWorker? BackgroundWorker { get; set; } diff --git a/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core3_1.verified.txt b/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core3_1.verified.txt index b916503f0d..30b552a907 100644 --- a/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core3_1.verified.txt +++ b/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.Core3_1.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -981,6 +982,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt b/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt index 2d070b0705..d19836d27b 100644 --- a/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt +++ b/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -981,6 +982,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index b53131bf93..35c37768c1 100644 --- a/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.DiagnosticSource.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -981,6 +982,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Core2_1.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Core2_1.verified.txt index 92066f179d..9c62355090 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Core2_1.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Core2_1.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -980,6 +981,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1304,6 +1311,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_0.verified.txt index 91771456d0..7e59a5e541 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_0.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -980,6 +981,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1304,6 +1311,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt index b916503f0d..30b552a907 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Core3_1.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -981,6 +982,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_6.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_6.verified.txt index 1134c6a3af..034b11d985 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_6.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet4_6.verified.txt @@ -442,6 +442,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -980,6 +981,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt index 2d070b0705..d19836d27b 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet5_0.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -981,6 +982,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt index b53131bf93..35c37768c1 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet6_0.verified.txt @@ -443,6 +443,7 @@ namespace Sentry public bool AttachStacktrace { get; set; } public bool AutoSessionTracking { get; set; } public System.TimeSpan AutoSessionTrackingInterval { get; set; } + public Sentry.Extensibility.IBackgroundWorker? BackgroundWorker { get; set; } public System.Func? BeforeBreadcrumb { get; set; } public System.Func? BeforeSend { get; set; } public string? CacheDirectoryPath { get; set; } @@ -981,6 +982,12 @@ namespace Sentry.Extensibility "nd CaptureException that provide a callback to a configurable scope.")] public void WithScope(System.Action scopeCallback) { } } + public interface IBackgroundWorker + { + int QueuedItems { get; } + bool EnqueueEnvelope(Sentry.Protocol.Envelopes.Envelope envelope); + System.Threading.Tasks.Task FlushAsync(System.TimeSpan timeout); + } public interface IDiagnosticLogger { bool IsEnabled(Sentry.SentryLevel level); @@ -1305,6 +1312,44 @@ namespace Sentry.Protocol public static Sentry.Protocol.Trace FromJson(System.Text.Json.JsonElement json) { } } } +namespace Sentry.Protocol.Envelopes +{ + public sealed class Envelope : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public Envelope(System.Collections.Generic.IReadOnlyDictionary header, System.Collections.Generic.IReadOnlyList items) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public System.Collections.Generic.IReadOnlyList Items { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public Sentry.SentryId? TryGetEventId() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.Envelope FromEvent(Sentry.SentryEvent @event, Sentry.Extensibility.IDiagnosticLogger? logger = null, System.Collections.Generic.IReadOnlyCollection? attachments = null, Sentry.SessionUpdate? sessionUpdate = null) { } + public static Sentry.Protocol.Envelopes.Envelope FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.Envelope FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.Envelope FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public sealed class EnvelopeItem : Sentry.Protocol.Envelopes.ISerializable, System.IDisposable + { + public EnvelopeItem(System.Collections.Generic.IReadOnlyDictionary header, Sentry.Protocol.Envelopes.ISerializable payload) { } + public System.Collections.Generic.IReadOnlyDictionary Header { get; } + public Sentry.Protocol.Envelopes.ISerializable Payload { get; } + public void Dispose() { } + public System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default) { } + public string? TryGetFileName() { } + public long? TryGetLength() { } + public string? TryGetType() { } + public static System.Threading.Tasks.Task DeserializeAsync(System.IO.Stream stream, System.Threading.CancellationToken cancellationToken = default) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromAttachment(Sentry.Attachment attachment) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromEvent(Sentry.SentryEvent @event) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromSession(Sentry.SessionUpdate sessionUpdate) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromTransaction(Sentry.Transaction transaction) { } + public static Sentry.Protocol.Envelopes.EnvelopeItem FromUserFeedback(Sentry.UserFeedback sentryUserFeedback) { } + } + public interface ISerializable + { + System.Threading.Tasks.Task SerializeAsync(System.IO.Stream stream, Sentry.Extensibility.IDiagnosticLogger? logger, System.Threading.CancellationToken cancellationToken = default); + } +} namespace Sentry.Reflection { public static class AssemblyExtensions