From 7a6ef2ea4477b6cff0f27fad078f511d787d854b Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Wed, 2 Apr 2025 20:18:40 +1300 Subject: [PATCH 1/4] Added CaptureFeedback overload with configureScope parameter #4035 --- src/Sentry/Extensibility/DisabledHub.cs | 7 ++++++ src/Sentry/Extensibility/HubAdapter.cs | 8 +++++++ src/Sentry/IHub.cs | 8 +++++++ src/Sentry/Internal/Hub.cs | 23 +++++++++++++++++++ src/Sentry/SentrySdk.cs | 7 ++++++ ...piApprovalTests.Run.DotNet8_0.verified.txt | 4 ++++ ...piApprovalTests.Run.DotNet9_0.verified.txt | 4 ++++ .../ApiApprovalTests.Run.Net4_8.verified.txt | 4 ++++ 8 files changed, 65 insertions(+) diff --git a/src/Sentry/Extensibility/DisabledHub.cs b/src/Sentry/Extensibility/DisabledHub.cs index 6c18af6e45..0cb5636937 100644 --- a/src/Sentry/Extensibility/DisabledHub.cs +++ b/src/Sentry/Extensibility/DisabledHub.cs @@ -147,6 +147,13 @@ public bool CaptureEnvelope(Envelope envelope) /// public SentryId CaptureEvent(SentryEvent evt, Scope? scope = null, SentryHint? hint = null) => SentryId.Empty; + /// + /// No-Op. + /// + public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + { + } + /// /// No-Op. /// diff --git a/src/Sentry/Extensibility/HubAdapter.cs b/src/Sentry/Extensibility/HubAdapter.cs index 61d715d341..1859c534db 100644 --- a/src/Sentry/Extensibility/HubAdapter.cs +++ b/src/Sentry/Extensibility/HubAdapter.cs @@ -222,6 +222,14 @@ public SentryId CaptureEvent(SentryEvent evt, Scope? scope) public SentryId CaptureEvent(SentryEvent evt, Scope? scope, SentryHint? hint = null) => SentrySdk.CaptureEvent(evt, scope, hint); + /// + /// Forwards the call to . + /// + [DebuggerStepThrough] + [EditorBrowsable(EditorBrowsableState.Never)] + public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + => SentrySdk.CaptureFeedback(feedback, hint, configureScope); + /// /// Forwards the call to . /// diff --git a/src/Sentry/IHub.cs b/src/Sentry/IHub.cs index f7a609805b..79ee1ec64a 100644 --- a/src/Sentry/IHub.cs +++ b/src/Sentry/IHub.cs @@ -116,4 +116,12 @@ public TransactionContext ContinueTrace( /// The callback to configure the scope. /// public SentryId CaptureEvent(SentryEvent evt, SentryHint? hint, Action configureScope); + + /// + /// Captures feedback from the user. + /// + /// The feedback to send to Sentry. + /// Hint providing high level context for the source of the event, including attachments + /// Callback method to configure the scope. + public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope); } diff --git a/src/Sentry/Internal/Hub.cs b/src/Sentry/Internal/Hub.cs index cd00686250..1fbbbd4a90 100644 --- a/src/Sentry/Internal/Hub.cs +++ b/src/Sentry/Internal/Hub.cs @@ -506,6 +506,29 @@ private SentryId CaptureEvent(SentryEvent evt, SentryHint? hint, Scope scope) } } + public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + { + if (!IsEnabled) + { + return; + } + + try + { + var clonedScope = CurrentScope.Clone(); + configureScope(clonedScope); + + // Although we clone a temporary scope for the configureScope action, for the second scope + // argument (the breadcrumbScope) we pass in the current scope... this is because we want + // a breadcrumb to be left on the current scope for exception events + CaptureFeedback(feedback, clonedScope, hint); + } + catch (Exception e) + { + _options.LogError(e, "Failure to capture feedback"); + } + } + public void CaptureFeedback(SentryFeedback feedback, Scope? scope = null, SentryHint? hint = null) { if (!IsEnabled) diff --git a/src/Sentry/SentrySdk.cs b/src/Sentry/SentrySdk.cs index 401a0fa6f0..310dcb16cb 100644 --- a/src/Sentry/SentrySdk.cs +++ b/src/Sentry/SentrySdk.cs @@ -481,6 +481,13 @@ public static SentryId CaptureMessage(string message, SentryLevel level = Sentry public static SentryId CaptureMessage(string message, Action configureScope, SentryLevel level = SentryLevel.Info) => CurrentHub.CaptureMessage(message, configureScope, level); + /// + /// Captures feedback from the user. + /// + [DebuggerStepThrough] + public static void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + => CurrentHub.CaptureFeedback(feedback, hint, configureScope); + /// /// Captures feedback from the user. /// diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt index 67795954b7..0f647ff217 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt @@ -212,6 +212,7 @@ namespace Sentry void BindException(System.Exception exception, Sentry.ISpan span); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope); Sentry.TransactionContext ContinueTrace(Sentry.SentryTraceHeader? traceHeader, Sentry.BaggageHeader? baggageHeader, string? name = null, string? operation = null); Sentry.TransactionContext ContinueTrace(string? traceHeader, string? baggageHeader, string? name = null, string? operation = null); void EndSession(Sentry.SessionEndStatus status = 0); @@ -823,6 +824,7 @@ namespace Sentry public static Sentry.SentryId CaptureException(System.Exception exception) { } public static Sentry.SentryId CaptureException(System.Exception exception, System.Action configureScope) { } public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public static void CaptureFeedback(string message, string? contactEmail = null, string? name = null, string? replayId = null, string? url = null, Sentry.SentryId? associatedEventId = default, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public static Sentry.SentryId CaptureMessage(string message, Sentry.SentryLevel level = 1) { } public static Sentry.SentryId CaptureMessage(string message, System.Action configureScope, Sentry.SentryLevel level = 1) { } @@ -1333,6 +1335,7 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } @@ -1379,6 +1382,7 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public Sentry.SentryId CaptureException(System.Exception exception) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt index 67795954b7..0f647ff217 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -212,6 +212,7 @@ namespace Sentry void BindException(System.Exception exception, Sentry.ISpan span); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope); Sentry.TransactionContext ContinueTrace(Sentry.SentryTraceHeader? traceHeader, Sentry.BaggageHeader? baggageHeader, string? name = null, string? operation = null); Sentry.TransactionContext ContinueTrace(string? traceHeader, string? baggageHeader, string? name = null, string? operation = null); void EndSession(Sentry.SessionEndStatus status = 0); @@ -823,6 +824,7 @@ namespace Sentry public static Sentry.SentryId CaptureException(System.Exception exception) { } public static Sentry.SentryId CaptureException(System.Exception exception, System.Action configureScope) { } public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public static void CaptureFeedback(string message, string? contactEmail = null, string? name = null, string? replayId = null, string? url = null, Sentry.SentryId? associatedEventId = default, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public static Sentry.SentryId CaptureMessage(string message, Sentry.SentryLevel level = 1) { } public static Sentry.SentryId CaptureMessage(string message, System.Action configureScope, Sentry.SentryLevel level = 1) { } @@ -1333,6 +1335,7 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } @@ -1379,6 +1382,7 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public Sentry.SentryId CaptureException(System.Exception exception) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index 0c06282d34..92f6070fa5 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -200,6 +200,7 @@ namespace Sentry void BindException(System.Exception exception, Sentry.ISpan span); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope); Sentry.TransactionContext ContinueTrace(Sentry.SentryTraceHeader? traceHeader, Sentry.BaggageHeader? baggageHeader, string? name = null, string? operation = null); Sentry.TransactionContext ContinueTrace(string? traceHeader, string? baggageHeader, string? name = null, string? operation = null); void EndSession(Sentry.SessionEndStatus status = 0); @@ -804,6 +805,7 @@ namespace Sentry public static Sentry.SentryId CaptureException(System.Exception exception) { } public static Sentry.SentryId CaptureException(System.Exception exception, System.Action configureScope) { } public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public static void CaptureFeedback(string message, string? contactEmail = null, string? name = null, string? replayId = null, string? url = null, Sentry.SentryId? associatedEventId = default, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public static Sentry.SentryId CaptureMessage(string message, Sentry.SentryLevel level = 1) { } public static Sentry.SentryId CaptureMessage(string message, System.Action configureScope, Sentry.SentryLevel level = 1) { } @@ -1314,6 +1316,7 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } @@ -1360,6 +1363,7 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public Sentry.SentryId CaptureException(System.Exception exception) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } From 2dbcc190bcaae581a8d0e7de3adcc72be429dd85 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Thu, 3 Apr 2025 09:54:35 +1300 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3dd61e5aa..1ce8348391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Features + +- Added CaptureFeedback overload with configureScope parameter #4035 ([#4073](https://github.com/getsentry/sentry-dotnet/pull/4073)) + ## 5.5.0 ### Features From cc5312acbb0022bfe0641958d0403726b6414bf3 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 8 Apr 2025 10:16:12 +1200 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ce8348391..be4fe36ee5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Features -- Added CaptureFeedback overload with configureScope parameter #4035 ([#4073](https://github.com/getsentry/sentry-dotnet/pull/4073)) +- Added CaptureFeedback overload with configureScope parameter ([#4073](https://github.com/getsentry/sentry-dotnet/pull/4073)) ## 5.5.0 From 738883b035f60a083b19e04d4b680c5c0e8bc325 Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Tue, 8 Apr 2025 12:34:04 +1200 Subject: [PATCH 4/4] Review feedback --- CHANGELOG.md | 2 +- src/Sentry/Extensibility/DisabledHub.cs | 9 ++++++++- src/Sentry/Extensibility/HubAdapter.cs | 10 +++++++++- src/Sentry/IHub.cs | 11 +++++++++-- src/Sentry/Internal/Hub.cs | 19 +++++++++++++------ src/Sentry/SentrySdk.cs | 9 ++++++++- ...piApprovalTests.Run.DotNet8_0.verified.txt | 12 ++++++++---- ...piApprovalTests.Run.DotNet9_0.verified.txt | 12 ++++++++---- .../ApiApprovalTests.Run.Net4_8.verified.txt | 12 ++++++++---- 9 files changed, 72 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7142d50e6..6ba35f03e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Features -- Added CaptureFeedback overload with configureScope parameter ([#4073](https://github.com/getsentry/sentry-dotnet/pull/4073)) +- Added `CaptureFeedback` overload with `configureScope` parameter ([#4073](https://github.com/getsentry/sentry-dotnet/pull/4073)) ### Fixes diff --git a/src/Sentry/Extensibility/DisabledHub.cs b/src/Sentry/Extensibility/DisabledHub.cs index 0cb5636937..327857b4c1 100644 --- a/src/Sentry/Extensibility/DisabledHub.cs +++ b/src/Sentry/Extensibility/DisabledHub.cs @@ -150,7 +150,14 @@ public bool CaptureEnvelope(Envelope envelope) /// /// No-Op. /// - public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + public void CaptureFeedback(SentryFeedback feedback, Action configureScope) + { + } + + /// + /// No-Op. + /// + public void CaptureFeedback(SentryFeedback feedback, SentryHint? hint, Action configureScope) { } diff --git a/src/Sentry/Extensibility/HubAdapter.cs b/src/Sentry/Extensibility/HubAdapter.cs index 1859c534db..b7c35aac79 100644 --- a/src/Sentry/Extensibility/HubAdapter.cs +++ b/src/Sentry/Extensibility/HubAdapter.cs @@ -227,7 +227,15 @@ public SentryId CaptureEvent(SentryEvent evt, Scope? scope, SentryHint? hint = n /// [DebuggerStepThrough] [EditorBrowsable(EditorBrowsableState.Never)] - public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + public void CaptureFeedback(SentryFeedback feedback, Action configureScope) + => SentrySdk.CaptureFeedback(feedback, configureScope); + + /// + /// Forwards the call to . + /// + [DebuggerStepThrough] + [EditorBrowsable(EditorBrowsableState.Never)] + public void CaptureFeedback(SentryFeedback feedback, SentryHint? hint, Action configureScope) => SentrySdk.CaptureFeedback(feedback, hint, configureScope); /// diff --git a/src/Sentry/IHub.cs b/src/Sentry/IHub.cs index 79ee1ec64a..e915da6eab 100644 --- a/src/Sentry/IHub.cs +++ b/src/Sentry/IHub.cs @@ -121,7 +121,14 @@ public TransactionContext ContinueTrace( /// Captures feedback from the user. /// /// The feedback to send to Sentry. - /// Hint providing high level context for the source of the event, including attachments /// Callback method to configure the scope. - public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope); + public void CaptureFeedback(SentryFeedback feedback, Action configureScope); + + /// + /// Captures feedback from the user. + /// + /// The feedback to send to Sentry. + /// An optional hint providing high level context for the source of the event, including attachments + /// Callback method to configure the scope. + public void CaptureFeedback(SentryFeedback feedback, SentryHint? hint, Action configureScope); } diff --git a/src/Sentry/Internal/Hub.cs b/src/Sentry/Internal/Hub.cs index 8be9437ef6..8601283ce9 100644 --- a/src/Sentry/Internal/Hub.cs +++ b/src/Sentry/Internal/Hub.cs @@ -506,7 +506,10 @@ private SentryId CaptureEvent(SentryEvent evt, SentryHint? hint, Scope scope) } } - public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + public void CaptureFeedback(SentryFeedback feedback, Action configureScope) => + CaptureFeedback(feedback, null, configureScope); + + public void CaptureFeedback(SentryFeedback feedback, SentryHint? hint, Action configureScope) { if (!IsEnabled) { @@ -518,9 +521,6 @@ public void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureSco /// Captures feedback from the user. /// [DebuggerStepThrough] - public static void CaptureFeedback(SentryFeedback feedback, SentryHint hint, Action configureScope) + public static void CaptureFeedback(SentryFeedback feedback, Action configureScope) + => CurrentHub.CaptureFeedback(feedback, configureScope); + + /// + /// Captures feedback from the user. + /// + [DebuggerStepThrough] + public static void CaptureFeedback(SentryFeedback feedback, SentryHint? hint, Action configureScope) => CurrentHub.CaptureFeedback(feedback, hint, configureScope); /// diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt index 7930d94f55..e512cfdd15 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet8_0.verified.txt @@ -212,7 +212,8 @@ namespace Sentry void BindException(System.Exception exception, Sentry.ISpan span); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope); - void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope); Sentry.TransactionContext ContinueTrace(Sentry.SentryTraceHeader? traceHeader, Sentry.BaggageHeader? baggageHeader, string? name = null, string? operation = null); Sentry.TransactionContext ContinueTrace(string? traceHeader, string? baggageHeader, string? name = null, string? operation = null); void EndSession(Sentry.SessionEndStatus status = 0); @@ -824,8 +825,9 @@ namespace Sentry public static Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public static Sentry.SentryId CaptureException(System.Exception exception) { } public static Sentry.SentryId CaptureException(System.Exception exception, System.Action configureScope) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public static void CaptureFeedback(string message, string? contactEmail = null, string? name = null, string? replayId = null, string? url = null, Sentry.SentryId? associatedEventId = default, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public static Sentry.SentryId CaptureMessage(string message, Sentry.SentryLevel level = 1) { } public static Sentry.SentryId CaptureMessage(string message, System.Action configureScope, Sentry.SentryLevel level = 1) { } @@ -1335,8 +1337,9 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } @@ -1382,8 +1385,9 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public Sentry.SentryId CaptureException(System.Exception exception) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt index 7930d94f55..e512cfdd15 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.DotNet9_0.verified.txt @@ -212,7 +212,8 @@ namespace Sentry void BindException(System.Exception exception, Sentry.ISpan span); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope); - void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope); Sentry.TransactionContext ContinueTrace(Sentry.SentryTraceHeader? traceHeader, Sentry.BaggageHeader? baggageHeader, string? name = null, string? operation = null); Sentry.TransactionContext ContinueTrace(string? traceHeader, string? baggageHeader, string? name = null, string? operation = null); void EndSession(Sentry.SessionEndStatus status = 0); @@ -824,8 +825,9 @@ namespace Sentry public static Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public static Sentry.SentryId CaptureException(System.Exception exception) { } public static Sentry.SentryId CaptureException(System.Exception exception, System.Action configureScope) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public static void CaptureFeedback(string message, string? contactEmail = null, string? name = null, string? replayId = null, string? url = null, Sentry.SentryId? associatedEventId = default, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public static Sentry.SentryId CaptureMessage(string message, Sentry.SentryLevel level = 1) { } public static Sentry.SentryId CaptureMessage(string message, System.Action configureScope, Sentry.SentryLevel level = 1) { } @@ -1335,8 +1337,9 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } @@ -1382,8 +1385,9 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public Sentry.SentryId CaptureException(System.Exception exception) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } diff --git a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt index b3a7b7d707..53e7696195 100644 --- a/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt +++ b/test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt @@ -200,7 +200,8 @@ namespace Sentry void BindException(System.Exception exception, Sentry.ISpan span); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope); Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope); - void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope); + void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope); Sentry.TransactionContext ContinueTrace(Sentry.SentryTraceHeader? traceHeader, Sentry.BaggageHeader? baggageHeader, string? name = null, string? operation = null); Sentry.TransactionContext ContinueTrace(string? traceHeader, string? baggageHeader, string? name = null, string? operation = null); void EndSession(Sentry.SessionEndStatus status = 0); @@ -805,8 +806,9 @@ namespace Sentry public static Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public static Sentry.SentryId CaptureException(System.Exception exception) { } public static Sentry.SentryId CaptureException(System.Exception exception, System.Action configureScope) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public static void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public static void CaptureFeedback(string message, string? contactEmail = null, string? name = null, string? replayId = null, string? url = null, Sentry.SentryId? associatedEventId = default, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public static Sentry.SentryId CaptureMessage(string message, Sentry.SentryLevel level = 1) { } public static Sentry.SentryId CaptureMessage(string message, System.Action configureScope, Sentry.SentryLevel level = 1) { } @@ -1316,8 +1318,9 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, System.Action configureScope) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { } @@ -1363,8 +1366,9 @@ namespace Sentry.Extensibility public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.Scope? scope, Sentry.SentryHint? hint = null) { } public Sentry.SentryId CaptureEvent(Sentry.SentryEvent evt, Sentry.SentryHint? hint, System.Action configureScope) { } public Sentry.SentryId CaptureException(System.Exception exception) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, System.Action configureScope) { } public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.Scope? scope = null, Sentry.SentryHint? hint = null) { } - public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint hint, System.Action configureScope) { } + public void CaptureFeedback(Sentry.SentryFeedback feedback, Sentry.SentryHint? hint, System.Action configureScope) { } public void CaptureSession(Sentry.SessionUpdate sessionUpdate) { } public void CaptureTransaction(Sentry.SentryTransaction transaction) { } public void CaptureTransaction(Sentry.SentryTransaction transaction, Sentry.Scope? scope, Sentry.SentryHint? hint) { }