-
Notifications
You must be signed in to change notification settings - Fork 4
Backend Error Reporting
Tahmid Ahmed edited this page Jan 15, 2026
·
17 revisions
Codebloom has a hand-rolled error reporter that will report certain logs and errors to Discord channels in our private Discord guild.
-
Reporter.javais the abstracted reporter class that exposes the following methods:-
.logis used for non-errors that need to be reported back to the server. We mainly use this for tracking odd behaviors or suspicious activity that may not be an error. -
.erroris used to report any errors back to the server. We use this to raise an indicator to the dev team that something is wrong when it likely shouldn't be. We have logic that will automatically call.erroron any controller exceptions or task scheduler (aka any background services).
-
-
ReporterController.javaallows us to ingest errors from our endpoint. The endpoints have basic CSRF protections via checking theOriginheader.-
/api/reporter/erroris the endpoint used to ingest errors from the frontend which will be sent to the server. -
/api/reporter/logis the endpoint used to ingest logs from the frontend which will be sent to the server.
-
-
ThrottledReporter.javais a rate-limited version of the Reporter class, which exposes the same functions but limits how often they can be called. Used for randomly-selected high-traffic logging.
public synchronized String getCsrf() {
if (csrf == null && !reported) {
reported = true;
reporter.log(Report.builder()
.environments(env.getActiveProfiles())
.location(Location.BACKEND)
.data("CSRF token is missing inside of LeetcodeAuthStealer. This may be something to look into.")
.build());
}
return csrf;
}Link to ThrottledReporter example
throttledReporter.log(Report.builder()
.data(String.format("""
Score Distribution Report
Leetcode Username: %s
Difficulty: %s (%d pts)
Acceptance Rate: %.2f
Question Multiplier: %.2f
Total: %d
""",
user.getLeetcodeUsername(),
leetcodeQuestion.getDifficulty(),
basePoints,
leetcodeQuestion.getAcceptanceRate(),
multiplier,
points
))
.build());- Home
- Setup
- Developer Commands
- Secrets
- Technical Docs
- Feature Docs
- CI Commands
- Contributing
- Codebloom ↗
- Codebloom - Swagger Documentation ↗
- Codebloom - Staging ↗
- Codebloom - Staging - Swagger Documentation ↗
- Codebloom - Local - Swagger Documentation ↗
- Codebloom - Local - Prometheus Metrics ↗
- Grafana Dashboard - Separate domain
- Public Taskboard (Read-only) ↗