Skip to content
New issue

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

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

Already on GitHub? # to your account

.NET SDK redesign #1

Closed
bruno-garcia opened this issue May 14, 2018 · 3 comments
Closed

.NET SDK redesign #1

bruno-garcia opened this issue May 14, 2018 · 3 comments
Assignees
Labels
Feature New feature or request

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented May 14, 2018

This issue can be used to discuss the kickoff of a new API for .NET applications.

Some goals to start with are:

  • Targeting .NET Standard 2.0
    • Multi-targeting is hard. The further back you go, the harder it gets. We already have support for .NET 3.5 on the current SDK so there's no reason to attempt to support it on something we're building for the future.
    • There hasn't been any user request to .NET Standard 1.x. There are many essential APIs missing and we'd surely spend quite sometime working around that of simply leaving features off for those targets.
    • This could obviously change and if there is demand, we can simple add the other targets later. Building it on the API offered by .NET Standard 2.0 will speed up the feature rich version though.

Proposed API for sending event:

public class SentryEvent
{
    // Contains fields of the Sentry protocol 
    // This type gets serialized
}

public interface ISentryClient 
{
    Guid CaptureEvent(SentryEvent @event);
}

The client API queues the event for processing/submission via a in-memory queue. In the background there's a task which asynchronously does the event submission. For that reason the API has a IDisposable handle be invoked on app shutdown, which when invoked could block up to N seconds to ensure all events are sent to sentry or persisted to disk if that option is enabled (useful for mobile).

Convenience methods added as extensions, i.e:

public static class SentryClientExtensions
{
    SentryResponse CaptureException(
        this ISentryClient client, 
        Exception exception)
}

The client manages a background worker which invokes a transport. Different transports can be used. For example an HTTP transport should be default but one that will store the event to disk to be sent at a later time could be another one.

Milestones:

  1. The first preview release will include a subset of the interfaces and attributes spec, the HttpTransport and an Microsoft.Extensions.Logging and ASP.NET Core integrations. The extenal API should be close to the final one which is part of the Sentry SDK's unification workload.
  2. Second release will aim finishing support to the Sentry doc's spec
  3. More integrations

If you can support us by testing the previews, that'd be highly appreciated.

@bruno-garcia bruno-garcia self-assigned this May 15, 2018
@bruno-garcia bruno-garcia changed the title A fresh start .NET SDK redesign May 15, 2018
@bruno-garcia bruno-garcia added the Feature New feature or request label May 15, 2018
@bruno-garcia
Copy link
Member Author

The SDK has 4 public previews and we move any discussion to the forum:

https://forum.sentry.io/t/new-net-sdks-feedback-wanted/4365

@n55p33
Copy link

n55p33 commented May 25, 2019

#1 (comment)

@n55p33
Copy link

n55p33 commented May 25, 2019

@shsh.65.65

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants