Repository navigation
Description
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:
- The first preview release will include a subset of the
interfacesandattributesspec, theHttpTransportand 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. - Second release will aim finishing support to the Sentry doc's spec
- More integrations
If you can support us by testing the previews, that'd be highly appreciated.
Activity
[-]A fresh start[/-][+].NET SDK redesign[/+]bruno-garcia commentedon Aug 2, 2018
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 commentedon May 25, 2019
#1 (comment)
n55p33 commentedon May 25, 2019
@shsh.65.65
Merge pull request #1 from getsentry/feat/remove-immutable-dependency
Merge pull request #1 from christopher-taormina-zocdoc/fix/aspnetcore…
Merge pull request #1 from getsentry/ref/simplify-deps