Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidated CaptureEvent API methods #2749

Merged
merged 6 commits into from
Oct 23, 2023
Merged

Conversation

jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Oct 23, 2023

Resolves #2713

The code previously contained an internal interface containing a single method which was essentially an overload of various different CaptureEvent methods that we have in the IHub interface:

namespace Sentry.Internal;

internal interface IHubEx : IHub
{
    SentryId CaptureEventInternal(SentryEvent evt, Hint? hint, Scope? scope = null);
}

This PR both removes both the IHubEx interface and combines what was previously two separate CaptureEvent overloads into a single method signature where the Hint and Scope parameters are optional.

@jamescrosswell jamescrosswell linked an issue Oct 23, 2023 that may be closed by this pull request
@jamescrosswell jamescrosswell self-assigned this Oct 23, 2023
@bitsandfoxes bitsandfoxes self-assigned this Oct 23, 2023
Copy link
Contributor

@bitsandfoxes bitsandfoxes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IHubEx be gone! 🔥
I suspect the order scope, hint for the optional parameters is due to us expecting that scopes are much more likely to be used than hints?
I like that none of the samples had to be touched.

@jamescrosswell jamescrosswell merged commit 1007ba3 into feat/4.0.0 Oct 23, 2023
13 checks passed
@jamescrosswell jamescrosswell deleted the capture-event-2713 branch October 23, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single CaptureEvent with optional parameters Hint, Scope
2 participants