• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LFDT-Panurus / panurus / 40812414179
85%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 03:55AM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
40812414179

push

github

AkramBitar
feat(storage): add Postgres connection-pool visibility metrics

Export db_pool_in_use/db_pool_max_open (gauges) and
db_pool_wait_count_total/db_pool_wait_seconds_total (counters), labeled by a
parsed host:port/dbname pool identity, for every Postgres token store's
connection pool.

A production-shape selector benchmark found a connection-pool deadlock under
the simple driver (#2474): sustained contention plus a nonzero lock hold time
exhausted the pool permanently, surfacing only as hung Select calls with no
metric pointing at the pool as the cause.

Panurus never checks out a connection itself - the pool lives inside
fabric-smart-client's postgres.Open and only reaches Panurus as a *sql.DB -
so (*sql.DB).Stats() is the only available signal, and it reports cumulative
totals rather than per-wait observations. That rules out the histogram the
parent epic (#2492) originally proposed; a gauge pair plus a counter pair is
the closest honest signal instead.

- New token/services/storage/db/sql/dbpool package: a Sampler that polls
  Stats() once per second (token.storage.db.poolMetricsInterval, 0 disables)
  and turns the cumulative wait counters into deltas, since metrics.Counter
  only exposes Add(delta).
- postgres/driver.go: an observedDbProvider decorator registers every pool a
  store opens with the sampler; NewNamedDriver gains a *dbpool.Sampler
  parameter, NewDriverWithDbProvider is unchanged (nil sampler, no
  decorator) so every existing call site keeps working.
- token/sdk/dig/sdk.go: wires the sampler through dig, starts it in
  SDK.Start and stops it in SDK.Stop alongside the drift-check sweeps, so an
  in-process restart cannot leak its goroutine.
- pool identifies the data source (host:port/dbname), not the store: every
  store sharing a data source shares one pool, and the label is parsed out
  of the DSN rather than redacted from it so no credential field can leak
  into it.
- in_use/max_open are deliberately instantaneous gauges sampled at... (continued)
Source Files on build 40812414179
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #40812414179
  • a9cb72cd on github
  • Prev Build on main (#40664142950)
  • Next Build on main (#40838886505)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc