public void Invoke(string request) { using (SentrySdk.PushScope()) { SentrySdk.AddBreadcrumb(request, "request-path"); // Change the SentryClient in case the request is to the admin part: if (request.StartsWith("/admin")) { // Within this scope, the _adminClient will be used instead of whatever // client was defined before this point: SentrySdk.BindClient(_adminClient); } SentrySdk.CaptureException(new Exception("Error at the admin section")); // Else it uses the default client } // Scope is disposed. }
public void IterationSetup() { SentrySdk.Init(); SentrySdk.BindClient(DisabledHub.Instance); }