Enums
The Category, Type, and Area enums in TritonTypes — what each one classifies, the values that ship out of the box, and how to extend them for your own org.
Three fields classify every Triton log: Category, Type, and Area. Getting them right is what turns a pile of log records into something you can filter, group, and actually learn from. All three are defined as enums in TritonTypes.cls, plus a fourth enum — Level — for severity.
Why enums instead of free-text strings? Consistency. If half your team writes "Accounts" and the other half writes "Account", no filter will ever line up. Enums make the value set explicit, discoverable in your IDE, and safe to refactor. You can pass raw strings where you need to (.type(...) and .area(...) accept them), but reach for the enum first.
Category — the broad bucket
Category is the highest-level classification, and it matters for more than filtering: Pharos uses it to decide which page layout and detail view to render for the record. Mislabel an Apex log as a Flow log and it'll still capture your data, but the detail page won't show the Apex stack trace where you expect it.
The values that ship in TritonTypes.Category:
Apex · Flow · LWC · Aura
Category answers exactly one question — what technology produced this log? Severity is never expressed through Category; that's what the Level enum is for.
Rule of thumb: match the technology you're logging from. Logging from Apex? Use Apex. From a Lightning web component? LWC. Logging around a callout or integration from Apex? Keep the Apex category and attach the HTTP exchange with .integrationPayload(...) — there's no need to reach for a separate category or entity for integration logging. Many of Triton's built-in methods set the category for you — Triton.makeBuilder() starts you on Apex.
Type — the technical detail
Type is a finer, more technical classification written to the Type field. It doesn't affect how the record renders, so you have more freedom here. The out-of-the-box values in TritonTypes.Type:
Backend
Server-side Apex work (the common default).
Frontend
Client-side / UI-originated logs.
DMLResult
Logs summarizing bulk DML outcomes.
LongRunningRequest
Slow requests worth flagging.
ConcurrentRequestsLimit
Concurrency-limit conditions.
AccountTrigger
Example of a domain-specific type.
BackendCall · UserInteraction · ComponentLifecycle · ComponentRender · Performance
Set by the LWC profiling APIs — see Profiling. Performance is also set by Apex performance marks.
When you log an exception via .exception(e), Triton sets the Type to the exception's own type name (e.g. DmlException, CalloutException), falling back to Backend when it can't determine one. That's usually exactly what you want.
Area — the business context
Area (written to the Functional Area field) describes what part of the business a log is about, from a business perspective rather than a technical one. This is the classification you'll customize the most, because it's the most org-specific. The starter values in TritonTypes.Area:
OpportunityManagement · LeadConversion · Community · RestAPI · Accounts · LWC · Flow
Good areas read like features or domains: DealRegistration, PartnerCommunity, InvoiceSync, AccountEnrichment. Aim for the level of granularity you'd actually want to filter or alert on.
Level — severity
The fourth enum, TritonTypes.Level, ranks severity from least to most verbose: ERROR · WARNING · INFO · DEBUG · FINE · FINER · FINEST. It gets its own page because it also drives runtime filtering — see Log Levels.
Adding your own values — the upgrade-safe way
Sooner or later you'll want classifications the shipped enums don't cover — an InvoiceSync area, a Callout type. The tempting move is to add them straight to the enum in TritonTypes.cls. Resist it. Apex enums can't be extended from the outside, so the only way to add a value is to edit the shipped TritonTypes.cls — and that file belongs to Triton. Your additions get clobbered (or cause merge conflicts) the next time you upgrade.
Treat the built-in enums as convenient defaults you use as-is, not values you extend. When you need your own Type and Area values, define them as public static final String constants in your own classes and pass them to .area(...) / .type(...):
Those constant classes are yours, so no Triton upgrade will ever touch them — and you keep the consistency, typo-safety, and IDE discoverability that made enums appealing in the first place. See Custom Classifications for the full pattern (and why Category is the one exception you should still leave as an enum).
Keep additions deliberate and documented — the value of a taxonomy is that everyone uses the same one. For guidance on designing a taxonomy that scales, see Taxonomy & Standards.
Last updated