Breadcrumbs and tags
Breadcrumbs
Breadcrumbs are the steps your mod recorded before an error. The most recent ones are attached to the next event, so you can see what led up to it.
ExampleMod.NITEA.addBreadcrumb("machine", "Generator started");
ExampleMod.NITEA.addBreadcrumb("network", "Lost connection to controller", Level.WARNING);
The first argument is a category (up to 100 characters), the second a message (up to 1000). The level defaults to INFO.
Only the most recent 100 are kept. Change it, from 0 (off) to 100, with maxBreadcrumbs:
NiteaOptions.builder("examplemod").maxBreadcrumbs(30) // ...
Record things that help you reproduce a problem: a machine starting, a screen opening, a config reload.
Never put player names, UUIDs, chat messages or IP addresses in breadcrumbs.
Tags
Tags are key-value pairs attached to every following event. Keys are up to 50 characters, values up to 200.
ExampleMod.NITEA.setTag("difficulty", "hard");
ExampleMod.NITEA.setTag("difficulty", null); // removes it
Set tags that apply from the start with the builder:
NiteaOptions.builder("examplemod")
.tag("edition", "lite")
// ...
.build();
For a tag on a single event, pass it to captureException instead.
Issues show the most common values of each tag across their events.