Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
21e57c6
feat(api/metrics): add internal Prometheus metrics server and registry
Emrys02 Jul 29, 2026
efc627e
feat(api/middleware): instrument HTTP request count and duration metrics
Emrys02 Jul 29, 2026
064fa6c
feat(api/middleware): instrument rate limit rejection metrics
Emrys02 Jul 29, 2026
5882f12
feat(api/ws): instrument WebSocket active connections and message met…
Emrys02 Jul 29, 2026
f6eda9d
feat(api/grpc): instrument outbound gRPC client request metrics
Emrys02 Jul 29, 2026
c7c7a76
feat(api/handlers): enforce query timeouts across contract and token …
Emrys02 Jul 29, 2026
e2f920a
feat(api/middleware): bound DB auth and API key query timeouts
Emrys02 Jul 29, 2026
f029e85
feat(api/config): add database pool lifecycle management and statemen…
Emrys02 Jul 29, 2026
bc9d2cd
feat(api/metrics): add pgxpool saturation metrics export
Emrys02 Jul 29, 2026
31607a4
docs(api): document rate limit, retry-after, and x-cache headers in o…
Emrys02 Jul 29, 2026
7227a63
chore(api): add miniredis and openapi test dependencies
Emrys02 Jul 29, 2026
851fd98
fix(api/handlers): serialize empty contract stats as empty array inst…
Emrys02 Jul 29, 2026
3457278
test(api): add contract x-cache unit tests and integration testing suite
Emrys02 Jul 29, 2026
8480165
feat(api/handlers): split /v1/health liveness and /v1/ready readiness…
Emrys02 Jul 29, 2026
56d19b7
docs(api): update openapi spec for /v1/health and /v1/ready endpoints
Emrys02 Jul 29, 2026
68022ff
chore(infra): update k8s, fly, and docker health probes to use /v1/ready
Emrys02 Jul 29, 2026
e518893
Merge dev into Emrys02:dev
Depo-dev Jul 31, 2026
bc24208
Merge dev into Emrys02:dev (second pass, after #330/#331/#353/#359/#3…
Depo-dev Jul 31, 2026
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
33 changes: 31 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ GRPC_API_DB_POOL_SIZE=10
# against PgBouncer.
GO_API_DB_POOL_SIZE=5

# OPTIONAL go-api default: 0
# Minimum pool connections kept open (issue #238). 0 matches pgxpool's own
# default — raise it to pre-warm connections and cut cold-start latency.
GO_API_DB_POOL_MIN_CONNS=0

# OPTIONAL go-api default: 1800000 (30 min)
# Maximum age of a pooled connection before it's recycled (issue #238). A
# random jitter of 10% of this value is applied automatically so connections
# don't all recycle at once.
GO_API_DB_POOL_MAX_CONN_LIFETIME_MS=1800000

# OPTIONAL go-api default: 300000 (5 min)
# How long an idle pooled connection is kept before it's closed (issue #238).
GO_API_DB_POOL_MAX_CONN_IDLE_TIME_MS=300000

# OPTIONAL go-api default: 60000 (1 min)
# How often idle pooled connections are health-checked (issue #238).
GO_API_DB_POOL_HEALTH_CHECK_PERIOD_MS=60000

# OPTIONAL go-api
# PgBouncer admin console connection, used by GET /v1/admin/db to read
# SHOW POOLS / SHOW STATS. Connect to the virtual "pgbouncer" database.
Expand Down Expand Up @@ -151,8 +170,11 @@ RUST_LOG=info
# Port serving /healthz and /readyz.
HEALTH_PORT=8080

# OPTIONAL indexer default: 30000 / 10000
# Postgres per-statement and idle-in-transaction timeout bounds (ms).
# OPTIONAL indexer + go-api default: 30000 / 10000
# Postgres per-statement and idle-in-transaction timeout bounds (ms), applied
# to every connection at connect time. Shared across both services (issue
# #238) so they agree on how long a query or idle transaction may hold a
# connection; bounded to [100, 3600000]ms, out-of-range values are clamped.
DB_STATEMENT_TIMEOUT_MS=30000
DB_IDLE_IN_TRANSACTION_TIMEOUT_MS=10000

Expand Down Expand Up @@ -287,6 +309,13 @@ RETENTION_SOROBAN_EVENTS_DAYS=0
PPROF_ENABLED=false
PPROF_ADDR=127.0.0.1:6060

# OPTIONAL go-api default: 9091
# Port the Go REST API serves its Prometheus /metrics endpoint on (issue #58),
# separate from the public API port. This is a distinct process/port from the
# Rust indexer's own METRICS_PORT (default 9090) documented above — same env
# var name, different service.
METRICS_PORT=9091

# ---------------------------------------------------------------------------
# Internal /internal/status auth (issue #316)
# ---------------------------------------------------------------------------
Expand Down
Loading
Loading