Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/guides/monitoring-pool-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,14 @@ DataSourcePool pool = DataSourcePool.builder()
The pool also logs these transitions itself:

```
FATAL: DataSource [mypool] is down or has network error!!!
RESOLVED FATAL: DataSource [mypool] is back up!
FATAL: DataSource [mypool] is down or has network error!!! (logged at ERROR)
Resolved Fatal: DataSource [mypool] is back up! (logged at INFO)
```

The "down" transition is logged at `ERROR` and the recovery at `INFO` — deliberately, so that
returning to a healthy state does not itself trigger ERROR-level alerting. If you want to alert on
recovery, do it via the `dataSourceUp` callback above rather than by matching the log line.

---

## Borrow/return hooks with `DataSourcePoolListener`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ private void notifyUp() {
dataSourceUp.set(true);
startHeartBeatIfStopped();
dataSourceDownReason = null;
Log.error("RESOLVED FATAL: DataSource [" + name + "] is back up!");
Log.info("Resolved Fatal: DataSource [{0}] is back up!", name);
if (notify != null) {
notify.dataSourceUp(this);
}
Expand Down
Loading