-
-
Notifications
You must be signed in to change notification settings - Fork 516
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.
In the below examples, we use SetManualStackingKey
and are naming the custom stack "MyCustomStackingKey".
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");
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();
}