镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Custom Event Stacks

jmoeltjen edited this page Apr 16, 2016 · 1 revision

We try to group events into intuitive stacks, but sometimes you might want to create your own for organization, reporting, troubleshooting, etc.

We created SetManualStackingKey to facilitate this need.

Creating Custom Stacks

In the below examples, we use SetManualStackingKey and are naming the custom stack "MyCustomStackingKey".

C# Example

try {
    throw new ApplicationException("Unable to create order from quote.");
} catch (Exception ex) {
    ex.ToExceptionless().SetManualStackingKey("MyCustomStackingKey").Submit();
}

Or, you can set the stacking directly on an event (e.g., inside a plugin).

event.SetManualStackingKey("MyCustomStackingKey");

JavaScript Example

var client = exceptionless.ExceptionlessClient.default;
// Node.Js
// var client = require('exceptionless').ExceptionlessClient.default;
 
try {
  throw new Error('Unable to create order from quote.');
} catch (error) {
  client.createException(error).setManualStackingKey('MyCustomStackingKey').submit();
}

Clone this wiki locally