Skip to content

Monitoring

Scrape every process and monitor FoundationDB too. fdyno exports Prometheus, JSON metrics and structured logs.

curl -fsS http://127.0.0.1:9100/metrics/prometheus

Signals to watch

Signal Metric Look for
Readiness /readyz Fleet-wide 503: none ready. The body identifies drain or backend failure.
Errors fdyno_errors_total, fdyno_request_errors_total{action,class} A rise against fdyno_requests_total. class="server" per action is the 5xx share.
Latency fdyno_request_duration_seconds p99 per action.
Unknown outcomes fdyno_ambiguous_commit_outcomes_total Any rise. Clients must reconcile those writes.
Conflicts fdyno_transaction_conflicts_total A high share of fdyno_transaction_attempts_total: a hot item or range.
Saturation fdyno_admission_slot_seconds_total, fdyno_requests_rejected_inflight_total, fdyno_http_connections{state="rejected"} Average in-flight requests near fdyno_max_inflight; any rejection: the process is at its limit.
FoundationDB pushback fdyno_transaction_fdb_errors_total{code="1213"}, {code="1051"} Sustained tag or batch throttles.
Contention fdyno_requests_throttled_total{reason="contention"} Writes to one item faster than it can commit.
Index integrity fdyno_index_divergence_total Any non-zero value. It is a bug.
Worker backlog fdyno_ttl_oldest_eligible_age_seconds, fdyno_cdc_trim_oldest_record_age_seconds An age that grows across passes.
PITR trim falling behind fdyno_pitr_trim_oldest_overdue_undo_age_seconds Overdue age grows across fresh lease-held passes while reported work stays near the pass threshold.
Worker ownership fdyno_worker_lease_held Each process reports its last tick's observation. Check the age of the last lease-held tick before diagnosing takeover.
Worker priority fdyno_worker_priority_escalated 1 for long: batch priority is starved.
Restores fdyno_restore_jobs_failed_total Any rise.
Credentials and TLS fdyno_credentials_reload_failures_total, fdyno_tls_reload_errors_total Any rise. The old keys or certificate stay in use.

The complete metric reference is below.

Compare signals at the same layer

Layer Counted there
HTTP request The final response. fdyno_errors_total also counts refusals before dispatch.
API action accounting fdyno_requests_total counts handled requests and some refusals before dispatch; not every HTTP request.
FoundationDB attempts, including retries Errors and conflicts. Divide the conflict rate by the attempt rate.
  • Wire failures versus action failures. fdyno_errors_total includes refusals before dispatch. fdyno_requests_total counts handled requests and only some refusals before dispatch: an unsupported target prefix (as action Unknown), an action-policy refusal and a credential throttle. Earlier refusals, such as a missing X-Amz-Target, are not counted, so dividing those two totals does not give a wire error rate. For a dispatched action's server-error share, compare its class="server" error rate with its histogram count rate. Use the load balancer's request and response totals for the whole wire population. Client disconnects have a separate counter. An HTTP success can still contain UnprocessedItems.
  • Attempts versus outcomes. Divide the FoundationDB conflict rate by the attempt rate, not by the API request rate. An attempt can conflict and retry without a client error. An unknown commit attempt is not necessarily an unknown API outcome: fdyno retries a tokened transaction. Use the request and split-batch ambiguity counters for reconciliation; do not add them as if they counted disjoint requests.
  • Latency versus load. For fleet p99, compute rates per process, sum histogram buckets by action and le within one fleet, then compute the quantile. Do not average per-process p99 values. Check the matching request volume before acting on a percentile from sparse traffic.

The emitted metrics tests, split-batch ambiguity tests, and Prometheus rules show these boundaries and the aggregation used by the bundled alerts.

Set up scraping

Scrape /metrics/prometheus on every process's operations listener (DYNODB_OPS_ADDR), as job fdyno (or change FdynoTargetDown). When an operations listener is set, the data port returns 404 for metrics. If you scraped the data port, move the target to the operations listener. Keep the instance and job labels: the backlog alerts join on them. The repository has:

Alerts

The thresholds are starting points; tune them to your workload. Three depend on how you run fdyno:

  • FdynoCDCTrimBacklog fires at 93,600 seconds: 24-hour stream retention plus margin. Change it with DYNODB_CDC_RETENTION.
  • FdynoWorkerStalled fires after 30 minutes. Keep it above your longest worker interval.
Alert Severity, for Fires when First check
FdynoTargetDown page, 2m up{job="fdyno"} == 0: Prometheus cannot scrape the instance. Is the process running? Read the last log lines for starting dynodb, a panic or a production-profile startup error. Run curl -s http://<ops-addr>/healthz from the Prometheus host.
FdynoFDBUnavailable page, 5m On one instance, transaction deadlines plus FoundationDB errors 1031 (transaction_timed_out), 1037 (process_behind) and 1038 (database_locked) exceed 1 per second. fdbcli --exec 'status': availability, the ratekeeper limit, storage free space, a database is locked message. One instance alerting points at its network path or cluster file; all point at the cluster.
FdynoAmbiguousCommit page, 0m In 10 minutes, an instance returned a write result, or a BatchWriteItem chunk, whose commit outcome is unknown. request failed WARN lines with "ambiguous":true give request_id, action, table and usually fdb_error_code. Tell the owners of those tables: clients reconcile before they retry.
FdynoIndexDivergence page, 0m In 15 minutes, the sampled index check found an index entry that disagrees with its base item (kind: missing_base, wrong_key or value_mismatch). The index/base divergence WARN line names the table, index and kind. Run dynodb verify table <table> --index --cluster-file <path> (read-only; exit 2 on divergence).
FdynoConflictStorm ticket, 15m Over 5 minutes, an instance's rate of 1020 (not_committed) errors divided by its attempt rate, with the attempt rate counted as at least 1 per second, is above 0.2. So 0.1 conflicts per second out of 0.2 attempts per second does not fire. JSON /metrics tables.top.hotkey_waits and tables.top.requests show the hot tables.
FdynoAdmissionRejections ticket, 10m An instance rejects more than 1 request per second with 400 ThrottlingException at DYNODB_MAX_INFLIGHT or because the request body budget is spent. requests_in_flight against max_inflight in JSON /metrics, and fdyno_request_body_buffered_bytes against fdyno_request_body_budget_bytes.
FdynoConnectionRejections ticket, 5m In 5 minutes, a listener closed new connections at its connection cap; the listener label names the data or operations listener. fdyno_http_connections{state="open"} against fdyno_http_max_connections for the same listener.
FdynoHighLatencyP99 ticket, 15m Fleet p99 of one action is above 2 s, with more than 0.1 requests per second for that action. Set DYNODB_SLOW_REQUEST_MS (for example 1000) on one instance and read slow_requests[]: high grv_wait_ms or commit_wait_ms points at FoundationDB, retry_wait_ms with conflicts at contention, hotkey_wait_ms at a hot key, read_wait_ms at large reads.
FdynoSlowRequests ticket, 15m More than 0.5 requests per second of one action take longer than 1 s (from the latency histogram). As for FdynoHighLatencyP99. Match a request_id from slow_requests[] (the last 64 slow requests) with your client logs.
FdynoWorkerStalled ticket, 30m Fleet-wide per worker name, for ttl-sweeper, cdc-trimmer, txn-token-gc or index-backfill: no instance holds the lease, or the newest lease-held tick is more than 30 minutes old. workers.<name> in JSON /metrics on each instance: lease_held, last_run_age_seconds, failures.
FdynoWorkerFailures ticket, 15m Across scraped instances, the total reported failures for one worker name exceeds 2 over the last 15 minutes. The worker failure WARN lines carry the error.
FdynoTTLBacklog ticket, 30m On the ttl-sweeper lease holder, the oldest item due for deletion has waited more than 1 h. Expired items are hidden from reads but stay stored until deleted (TTL). On the holder: ttl_oldest_eligible_valid, ttl_oldest_eligible_measured_unix_seconds, ttl_items_expired_total, ttl_tick_budget_exhausted_total, ttl_backfill_contended_total.
FdynoTTLAgeUnknown ticket, 15m The ttl-sweeper holder's last complete backlog measurement is more than 1 h old, or 0 (never). On the holder: ttl_oldest_eligible_valid, ttl_tick_budget_exhausted_total, ttl_backfill_contended_total, and worker failure lines for ttl-sweeper.
FdynoCDCTrimBacklog ticket, 30m On the cdc-trimmer lease holder, the oldest stream record is more than 93,600 s (26 h) old. On the holder: cdc_trim_oldest_record_age_seconds with cdc_trim_oldest_valid, cdc_trim_tick_budget_exhausted_total, cdc_trim_contended_total, workers.cdc-trimmer.
FdynoCDCTrimAgeUnknown ticket, 15m The cdc-trimmer holder's last complete measurement of the oldest record is more than 1 h old, or 0 (never). On the holder: cdc_trim_oldest_valid, cdc_trim_tick_budget_exhausted_total, cdc_trim_contended_total, and worker failure lines for cdc-trimmer.
FdynoIndexBackfillStuck ticket, 30m Backfill jobs are running, but no backfill page completed in 30 minutes. New indexes stay CREATING. It measures pages across all jobs (max(fdyno_index_backfill_jobs_running) > 0 and sum(increase(fdyno_index_backfill_pages_total[30m])) == 0), so one stuck job is masked while another job completes pages. FdynoIndexBackfillJobFailing covers that case. JSON /metrics: index_backfill_jobs_running, index_backfill_pages_total, index_backfill_skipped_oversized_total, workers.index-backfill.
FdynoIndexBackfillJobFailing ticket, 5m One backfill job has failed every attempt, with no page known to be committed, for 30 minutes (fdyno_index_backfill_oldest_failing_job_seconds above 1800 on the index-backfill lease holder), also while other jobs progress. The WARN GSI backfill job attempt failed with no page known to be committed names the table ID, index and error.
FdynoGSIReplicationStalled page, 2m The oldest unapplied GSI change of some table is more than 30 s old (fdyno_gsi_backlog_max_age_seconds; fdyno_gsi_backlog_age_seconds{table} names the table). Writes that change its GSIs are throttled after 5 s. The WARN GSI apply failed names the table, shard and error; fdyno_gsi_apply_records_total shows whether records are still applied.
FdynoRestoreJobFailed ticket, 0m fdyno_restore_jobs_failed_total rose in the last hour: a restore job was marked FAILED. worker failure WARN lines for restore-recovery, and the server logs around the failure.
FdynoCredentialReloadFailing ticket, 5m A reload of DYNODB_CREDENTIALS_FILE failed in 15 minutes. The instance keeps the previous key set. The credentials reload failed; keeping the previous key set log line names the error.
FdynoMixedVersions info, 1h Prometheus sees more than one build (version, commit in fdyno_build_info) among the scraped instances. count by (version, commit) (fdyno_build_info), and your deployment tool.
FdynoWorkerPriorityEscalated ticket, 1h A cleanup worker runs at FoundationDB default priority (fdyno_worker_priority_escalated is 1). The maintenance priority escalated to default warning names the worker. Check fdyno_transaction_fdb_errors_total{code="1051"}.
FdynoFDBThrottling ticket, 15m Fleet-wide, over 5 minutes, more than 1 per second of 1213 (tag_throttled) or, counted separately, of 1051 (batch_transaction_throttled). fdbcli --exec "throttle list", fdbcli --exec "quota get <tag> total_throughput", and the Performance limited by line of fdbcli --exec status.
FdynoAdmissionSaturated ticket, 10m Averaged over 5 minutes, an instance uses more than 90% of its in-flight request limit or of its request body budget; each share counts only when its configured limit is above 0. Latency per action (slow requests stay in flight longer), slow large uploads for the body budget, and traffic balance across instances.
FdynoServerErrors page, 10m Fleet-wide, over 5 minutes, more than 5% of one action's requests end with a 5xx status, and that action has more than 0.1 5xx responses per second. request failed log lines for the action: error_type, message, fdb_error_code, ambiguous. A corrupt, malformed tuple or non-canonical CDC record message: run dynodb verify table <name> and keep the report. Admission rejections (400 ThrottlingException) are not counted in this alert; see FdynoAdmissionRejections.
FdynoBacklogGrowing ticket, 1h On a lease holder, the slope of the TTL or CDC trim backlog age over the trailing hour is above 0.5 s per second, and stays so for 1 h. fdyno_worker_reported_failures_total, fdyno_worker_priority_escalated, the tick-budget-exhausted counters, and FoundationDB throttles.

Each alert name links to its runbook section, which adds safe actions and what not to do. for is how long the whole expression must stay true before the alert fires. It is separate from the lookback window inside the expression, such as [5m]. Severity, from the rules file: page = act now; ticket = act within the working day; info = awareness only.

To test the rules, run promtool test rules fdyno-alerts.test.yml in deploy/prometheus.

Logs

The fdyno server writes JSON lines to stderr. Logs never contain item values, authorization headers or secrets. Under systemd, when stderr goes to the journal, each line starts with its syslog priority (<3> for ERROR, <4> for WARN, <6> for INFO, <7> for DEBUG). The journal stores the line at that priority, so journalctl -p warning shows warnings and errors. Before it exits on an error, the server logs one ERROR record with the cause. This covers a refused configuration, an unreachable FoundationDB at startup and a panic. Go's own panic report follows the record as plain text, at the unit's default priority.

Record Level When
access INFO Every request, with DYNODB_ACCESS_LOG set.
request failed WARN Every 5xx and every unknown-outcome response.
request client closed INFO The client closed the connection during the request. Logged with status 499.
slow request WARN A request over DYNODB_SLOW_REQUEST_MS.
worker failure WARN A background worker error.

Each request record has request_id, equal to the response's x-amzn-RequestId header. ambiguous=true marks an unknown commit outcome; fdb_error_code gives the FoundationDB error, such as 1021 or 1031. A request that names one table logs table; a request that names more logs tables, the number of distinct tables, which saturates at 100.

{"level":"WARN","msg":"request failed","request_id":"0c4a6e7c4a04c1032358d9df0067ea0b","action":"BatchWriteItem","tables":2,"status":500,"error_type":"InternalServerError","message":"The write may or may not have been applied. Read the item before you retry, or retry with a condition expression. TransactWriteItems with a ClientRequestToken is safe to retry.","ambiguous":true,"fdb_error_code":1031}

Warning records share a budget of 100 lines per second per process. fdyno_log_lines_suppressed_total counts dropped lines.

Slow requests

With DYNODB_SLOW_REQUEST_MS set, a request over the threshold logs a slow request record with its phase timings. JSON /metrics keeps the last 64 such requests under slow_requests.

Field Time spent
grv_wait_ms Waiting for a FoundationDB read version, on a retry or a regular-path attempt.
read_wait_ms Reads, plus fdyno's decoding and expression work. A first attempt on the C API path gets its read version inside its first read, so that wait is here.
commit_wait_ms Waiting for the commit.
retry_wait_ms Backoff between FoundationDB retries.
hotkey_wait_ms Queued behind writes to the same item.

Records also show attempts and conflicts. Requests take the same path with the threshold on as with it off, except GetItem, which takes the regular path. The timing costs a little CPU, so turn it on only to investigate.

Per-table hot spots

JSON /metrics tables holds the approximate top 20 tables of the last 60 s by requests, bytes, errors and same-item waits. A multi-table request counts for each table, so do not add values. Prometheus has no table labels.

FoundationDB

Set DYNODB_FDB_STATUS_INTERVAL (for example 15s) on two or three processes, not all, as each read loads the cluster controller. They export the cluster health gauges of the overview dashboard's FoundationDB row.

Also use FoundationDB's own tools: fdbcli --exec "status", status json and the trace logs. Watch storage and log queues, disk space, fault tolerance and ratekeeper limits. The FoundationDB administration guide covers them.

Metric reference

The operations listener serves GET /metrics/prometheus (Prometheus text) and GET /metrics (the same values in JSON, plus JSON-only views). Most counters reset on restart. Take rate() or increase() by process before summing counts of the same events across processes. Do not sum worker ages, per-process limits or copies of cluster gauges as if they were event counts. The durable cluster cleanup total below is exposed through per-process cached views and must not be summed.

JSON names omit fdyno_ unless noted; worker metrics use workers.<worker>. Labels never contain item keys, table names or tokens.

The signals and alerts above identify the operational checks.

Native mutation counters

JSON endpoint or path Enable at startup Coverage and units
GET /fdb/mutation-counters DYNODB_MUTATION_COUNTERS=1 (default off). Counts submitted mutation arguments for native single and transaction writes. Uncovered attempts do not imply zero mutations. Argument bytes are not storage bytes.

Set DYNODB_MUTATION_COUNTERS=1 at startup to expose GET /fdb/mutation-counters on the private operations listener. The JSON snapshot counts native single and transaction write attempts. The flag is off by default and fixed at process start. The snapshot uses schema version 2 and coverage version 3. It has no path for the extra write record of builds before cdb6320c, and no layout or receipt_shard field.

Go runner attempts, worker leases, direct directory and offline writes remain uncovered. Do not treat gaps as zero.

issued counts mutation calls and their argument bytes before the FDB client combines them, for submitted commit attempts only. Empty pages and mutations discarded before commit submission do not add rows. ended_attempt groups the same arguments by known commit success, known no effect or unknown outcome. Do not add the two families. For a range clear, bytes are the two key bounds, not the data erased. These counts are not wire bytes, storage input or net growth.

Compare integer deltas only within one process epoch, version and coverage. Reject disabled, invalid, truncated or overflowed snapshots and changes in writer identity.

Requests

Prometheus name Type Meaning
fdyno_requests_total counter Handled API requests, plus refusals of an unsupported target, by action policy or by a credential throttle. Not every HTTP request.
fdyno_errors_total counter Responses with status ≥ 400, not failed operations.
fdyno_request_errors_total{action,class} counter Status 400 or higher per action; class client (4xx) or server (5xx). It counts the same refusals before dispatch as fdyno_requests_total: an unsupported target (as Unknown) and a refusal by action policy or by a credential throttle. Earlier refusals, such as a missing X-Amz-Target, count only in fdyno_errors_total. JSON: actions.<action>.client_errors and server_errors.
fdyno_request_duration_seconds{action} histogram Handler latency per action; buckets 1 ms to 10 s and +Inf; unknown actions: Unknown.
fdyno_request_bytes_total{action} counter Request body bytes as received, possibly compressed. JSON: actions.<action>.request_bytes.
fdyno_response_bytes_total{action} counter Response body bytes before compression. JSON: actions.<action>.response_bytes.
fdyno_requests_in_flight gauge Requests running now, probes included.
fdyno_requests_aborted_total{reason="client_closed"} counter Client-closed requests, logged as 499, excluded from errors_total.
fdyno_uptime_seconds gauge Seconds since the process started.
fdyno_build_info{version,commit,go_version} gauge Always 1. Identifies the binary. Prometheus only.

Admission and connections

Prometheus name Type Meaning
fdyno_max_inflight gauge The DYNODB_MAX_INFLIGHT limit; 0 means none.
fdyno_requests_rejected_inflight_total counter Requests refused with 400 ThrottlingException by DYNODB_MAX_INFLIGHT or by the request body budget.
fdyno_admission_slots_in_use gauge Requests counted against DYNODB_MAX_INFLIGHT, taken after signature verification.
fdyno_admission_slot_seconds_total counter Total time that requests were counted against DYNODB_MAX_INFLIGHT. Its rate over fdyno_max_inflight is the average share in use.
fdyno_request_body_buffered_bytes gauge Request body bytes buffered now, before the signature is verified.
fdyno_request_body_budget_bytes gauge DYNODB_MAX_INFLIGHT × 16 MiB; 0 means none. A request past it gets 400 ThrottlingException.
fdyno_requests_throttled_total{reason} counter ProvisionedThroughputExceededException refusals: credential (per-key rate limit) or contention (same-item write out of time).
fdyno_http_connections{listener,state} gauge state="open": open now; state="rejected": reset at accept since start. Listener data or ops. JSON: http_connections.
fdyno_http_max_connections{listener} gauge The connection cap; 0 means none. JSON: under http_connections.

Transactions

Prometheus name Type Meaning
fdyno_transaction_attempts_total counter FoundationDB transaction attempts, retries included.
fdyno_transaction_conflicts_total counter Attempts that failed with conflict 1020. It includes a first PutItem, UpdateItem or DeleteItem attempt that started at a recent read version and found the item or the table changed since (read modes); the retry starts at a new read version.
fdyno_transaction_unknown_total counter Counts only raw FoundationDB commit_unknown_result (1021) errors. cluster_version_changed (1039) after commit submission also leaves that attempt's outcome unknown but does not increment this counter.
fdyno_transaction_fdb_errors_total{code,name} counter FoundationDB errors per code from a fixed list, else other. Throttles are {code="1213",name="tag_throttled"}, code 1051, and code 1223 (proxy_tag_throttled, a tag quota delay that ran out). JSON: transaction_fdb_errors.
fdyno_transaction_timeouts_total counter Requests that reached the operation deadline.
fdyno_transaction_cancellations_total counter Transactions cancelled, for example by a client disconnect.
fdyno_ambiguous_commit_outcomes_total counter Requests that ended with an unknown commit outcome. See reliable writes.
fdyno_background_ambiguous_commit_outcomes_total counter Background transactions (workers, batch priority) with unknown outcomes; no client reconciles them, so workers re-check next pass.
fdyno_batch_write_chunk_ambiguous_total counter Split BatchWriteItem requests stopped by an unknown chunk outcome. JSON: batch_write_chunk_ambiguous.
fdyno_token_replay_hits_total counter TransactWriteItems attempts answered from a ClientRequestToken record.
fdyno_token_mismatch_total counter Token reuse with different parameters.
fdyno_fdb_read_rows_total counter Item and index rows read from FoundationDB, filtered and retried rows included.
fdyno_fdb_write_bytes_total{kind} counter Estimated bytes of committed write transactions, sampled from 1 commit in 64. kind is index_apply (the GSI change-log consumer), backfill (index backfill pages) or api (every other transaction: API writes and background base-table work).
fdyno_fdb_write_bytes_sampled_commits_total counter Commits in that sample.

Same-item writes

Prometheus name Type Meaning
fdyno_hotkey_waits_total counter Writes that queued behind another write to the same item.
fdyno_hotkey_wait_nanos_total counter Total queue wait.
fdyno_hotkey_keys_inflight gauge Items with a queued or running write.
fdyno_hotkey_queue_depth gauge Writers queued now, all items.
fdyno_hotkey_enqueue_depth histogram Writers ahead at enqueue. Buckets 1, 4, 16, 64, 256, 1024, 4096.
fdyno_hotkey_wait_rejections_total counter Writes refused at once because the queue wait would pass the deadline.
fdyno_hotkey_queue_rejections_total counter Writes refused at once by a queue bound.

Background workers

All workers share these series. The worker label names the worker.

Prometheus name Type Meaning
fdyno_worker_lease_held{worker} gauge 1 when this process owns the worker.
fdyno_worker_runs_total{worker} counter Passes run.
fdyno_worker_items_processed_total{worker} counter Completed work items.
fdyno_worker_reported_failures_total{worker} counter Failed attempts, including lease acquisition/release; excludes healthy peer-held leases, shutdown cancellation and native throttles. Retries count again; zero does not prove health.
fdyno_worker_last_lease_held_tick_age_seconds{worker} gauge Seconds since the last pass that held the lease.
fdyno_lease_fence_rejections_total{worker} counter Effects refused because the lease moved to another process.
fdyno_worker_lease_implausible_expiry_total{worker} counter Lease values seen with an expiry more than the lease lifetime plus 5 minutes past this process's clock. Job leases use restore-recovery, import and export. See A lease expiry is implausibly far ahead.
fdyno_worker_priority_escalations_total{worker} counter Times a cleanup worker moved from batch to default priority.
fdyno_worker_priority_escalated{worker} gauge 1 while a cleanup worker runs at default priority, until a complete pass. JSON: workers.<worker>.priority_escalated.

Backlog ages

Lease owners report ages after passes; others report 0. Partial coverage gives lower bounds; low can hide backlog.

Prometheus name Type Meaning
fdyno_ttl_oldest_eligible_age_seconds gauge Clock − DYNODB_TTL_SKEW_MARGIN − oldest TTL index head's minute-bucket start across tables; not item delay.
fdyno_ttl_oldest_eligible_valid gauge 1 when every TTL table's head was checked.
fdyno_ttl_oldest_eligible_measured_unix_seconds gauge Time of the last complete measurement.
fdyno_cdc_trim_oldest_record_age_seconds gauge Age of the oldest stream record, all shards.
fdyno_cdc_trim_oldest_valid gauge 1 when the last pass read every shard.
fdyno_cdc_trim_oldest_measured_unix_seconds gauge Time of the last complete measurement.
fdyno_pitr_trim_oldest_overdue_undo_age_seconds gauge Largest observed overdue undo age in whole seconds. Retention and skew are already subtracted.
fdyno_pitr_trim_oldest_overdue_undo_valid gauge 1 when the registry snapshot was complete and the pass read or accounted for every table's undo head.
fdyno_pitr_trim_oldest_overdue_undo_measured_unix_seconds gauge Start of the observed lease-held pass, including partial passes; 0 means no sample.

PITR trim falling behind

These three PITR gauges are on by default. At /metrics, the JSON names omit fdyno_. The lease holder samples each table's undo head before trimming on its first returned page. This uses the trim reads already in the pass. It is not a count of remaining records or a snapshot after the pass. A lost commit reply can remove an earlier head before a retry returns its sample.

Alert when overdue age grows across several fresh lease-held passes. Use fdyno_worker_runs_total and fdyno_worker_items_processed_total with worker="pitr-trim" to distinguish ongoing work from a stalled worker. The item counter also includes dropped retired streams and can miss removals after a lost commit reply. It is not an exact count of undo records.

Check fdyno_worker_lease_held and the sample time on the same process before comparing ages. Do not sum the gauges across processes. A fence rejection discards the sample. A positive partial sample covers only the heads seen; zero with valid=0 does not mean the worker caught up. EarliestRestorableDateTime is not an overdue age.

If overdue age keeps rising, check lease ownership, reported failures, and FoundationDB commit latency. Compare fresh ages and foreground commit and API p99 under the same load. Count undo records that become due per interval, not API requests. Each pass stops at its deadline, with no record cap to raise.

TTL sweeper

Prometheus name Type Meaning
fdyno_ttl_items_expired_total counter Expired items deleted by this process, excluding unknown commit outcomes.
fdyno_ttl_index_entries_deleted_total counter Expiry-index entries deleted.
fdyno_ttl_index_entries_backfilled_total counter Expiry-index entries added for rows written before TTL was enabled.
fdyno_ttl_sweep_transactions_total counter Sweep transactions.
fdyno_ttl_tick_budget_exhausted_total counter Passes that used their whole time budget.
fdyno_ttl_drain_attempts_total, fdyno_ttl_drain_conflicts_total, fdyno_ttl_drain_failures_total counter Delete-phase attempts, conflicts and failures.
fdyno_ttl_drain_entries_skipped_total{table} counter Expiry entries the drain read past because reading or deleting that one row failed on its own. The row and its entry stay eligible for a later pass. A rise does not identify the row; the same row can count once per pass. At most 100 table names get separate labels. Each appears after its first skip. The _other series is present from startup and counts overflow plus any skips on a table literally named _other. See A TTL row is skipped.
fdyno_ttl_backfill_pages_total, fdyno_ttl_backfill_rows_scanned_total counter Backfill-phase pages and rows.
fdyno_ttl_backfill_attempts_total, fdyno_ttl_backfill_conflicts_total, fdyno_ttl_backfill_failures_total counter Backfill-phase attempts, conflicts and failures.
fdyno_ttl_backfill_contended_total counter Backfill pages put off to the next pass after four attempts. Not a failure.
fdyno_ttl_backfill_page_rows gauge Current backfill page size; it halves under contention, down to 1.
fdyno_ttl_backfill_rows_skipped_total counter Rows the backfill moved past because every attempt of a one-row page was retried; the wrap then does not complete. It counts skips only: it names neither the row nor the cause. See TTL backfill.

Stream trimmer

Prometheus name Type Meaning
fdyno_cdc_trim_deleted_total counter Stream records deleted.
fdyno_cdc_trim_transactions_total counter Trim transactions.
fdyno_cdc_trim_attempts_total, fdyno_cdc_trim_conflicts_total counter Trim attempts and conflicts.
fdyno_cdc_trim_contended_total counter Pages put off to the next pass after four attempts. Not a failure.
fdyno_cdc_trim_tick_budget_exhausted_total counter Passes that used their whole time budget.

Token cleanup

Prometheus name Type Meaning
fdyno_txn_token_gc_deleted_total counter Expired token records deleted.
fdyno_txn_token_gc_transactions_total counter Token cleanup transactions.
fdyno_txn_token_gc_cursor_wraps_total counter Complete token-keyspace passes; stalled while leased means passes do not finish.

Table catalog

The TTL sweeper, stream trimmer and ListStreams open only registered tables. ListStreams also reads the records of deleted tables' kept streams. Every table is registered by the transaction that creates it.

Prometheus name Type Meaning
fdyno_catalog_registry_entries{kind} gauge Registered tables, kind ttl or streams.
fdyno_catalog_registry_pruned_total counter Stale entries removed.
fdyno_catalog_registry_stale_skipped_total counter Stale entries skipped.

Indexes, backups and streams

Prometheus name Type Meaning
fdyno_index_backfill_jobs_running gauge New-GSI backfills in progress.
fdyno_index_backfill_pages_total, fdyno_index_backfill_items_total counter Backfill pages and items.
fdyno_index_backfill_oldest_failing_job_seconds gauge On the index-backfill lease holder: how long the job that has failed longest has failed every attempt with no page known to be committed; 0 when none. A committed page clears that job's age; a finished or removed job drops out. On a failed lease acquisition, the process clears all failure ages if more than one lease lifetime has passed since its last successful take or renewal.
fdyno_gsi_apply_lag_seconds histogram Per GSI change record: the writer's clock at the base write to the applier's clock after the apply commit. Buckets 250 µs × 2^(i/4) up to 54 s.
fdyno_gsi_apply_mutations_skipped_total counter GSI index writes left out because one apply batch held several updates of one item: each GSI gets one clear of the first key and one set of the last key and value.
fdyno_index_backfill_skipped_oversized_total counter Items skipped because their index key is too large.
fdyno_index_divergence_total{kind} counter Sampled index entries with no base item (kind="missing_base"), whose base item belongs at another index key or nowhere in the index (kind="wrong_key"), or with a different projection at the right key (kind="value_mismatch"). Any non-zero value is a bug.
fdyno_index_consistency_pages_checked_total, fdyno_index_consistency_entries_checked_total counter Pages and entries the sampler checked.
fdyno_restore_jobs_failed_total counter Restore jobs that a failure path marked FAILED, counted by the process that committed the mark. A restore cancelled with DeleteTable does not count: its job is marked FAILED without a count. When a mark's commit reply is lost, the retry finds the job already FAILED under its own fence and counts it once.
fdyno_backup_rolling_fallbacks_total counter Backups that completed as ROLLING.
fdyno_stream_reshards_total counter Automatic online stream shard splits.
fdyno_stream_trimmed_access_total counter Stream reads refused with TrimmedDataAccessException.

Credentials and TLS

Prometheus name Type Meaning
fdyno_credentials_reloads_total counter Successful credential reloads.
fdyno_credentials_reload_failures_total counter Failed reloads. The previous keys stay active.
fdyno_credentials_loaded_keys gauge Keys loaded now.
fdyno_credentials_rate_limited_keys gauge Keys with a rate limit.
fdyno_authz_denied_total{action} counter Requests denied by a key's policy.
fdyno_tls_reloads_total counter Certificate reloads. The three TLS series exist only with in-process TLS. JSON: under tls.
fdyno_tls_reload_errors_total counter Failed certificate reloads. The previous certificate stays in use.
fdyno_tls_certificate_not_after_seconds gauge Expiry of the certificate in use, as Unix time.

JSON adds credential_throttles_top: up to 20 rate-limited access-key IDs with throttle counts, never secrets.

Process and FoundationDB client

Prometheus name Type Meaning
fdyno_fdb_cluster_file_writable gauge 1 when the startup check could replace the cluster file. It is not checked again.
fdyno_fdb_locality_info{datacenter_id,zone_id} gauge Always 1. The configured locality IDs. Prometheus only.
fdyno_log_lines_suppressed_total counter Warning lines dropped by the log budget of 100 lines per second.

FoundationDB cluster status

DYNODB_FDB_STATUS_INTERVAL (for example 15s, on a few processes) controls FoundationDB status reads. Gauges are absent while polling is off or fields are missing (such as during recovery); failed reads keep previous values. JSON: fdb_status.

Check the sample age and failed-read counter on the same poller before using its values. A successful scrape can return an old healthy sample after a failed FoundationDB status read. A fresh sample can omit a field the cluster could not report; absent does not mean zero. Pollers report views of the same cluster, so use a fresh view instead of adding the gauges across pollers. For suspect or stale status, check fdbcli from an affected host and compare with readiness. The status poller exports the age of the last successful status read alongside the cached values.

Prometheus name Type Meaning
fdyno_fdb_status_age_seconds gauge Seconds since the last successful read; -1 before the first.
fdyno_fdb_status_read_failures_total counter Failed status reads.
fdyno_fdb_status_database_available gauge 1 when the database is available.
fdyno_fdb_status_data_healthy gauge 1 when data distribution reports a healthy state.
fdyno_fdb_status_degraded_processes gauge Processes the cluster reports as degraded.
fdyno_fdb_status_latency_probe_seconds{probe} gauge The cluster's latency probe. probe is grv or grv_batch (read version at default or batch priority), read or commit.
fdyno_fdb_status_ratekeeper_tps_limit{priority} gauge The ratekeeper's transaction rate limit. priority is default or batch.
fdyno_fdb_status_ratekeeper_released_tps{priority} gauge Transactions released per second.
fdyno_fdb_status_ratekeeper_limited_by{priority,reason} gauge Always 1. reason names what limits the rate; workload means nothing on the servers does.
fdyno_fdb_status_storage_queue_bytes gauge The largest storage server queue.
fdyno_fdb_status_log_queue_bytes gauge The largest log server queue.
fdyno_fdb_status_storage_durability_lag_seconds gauge The largest storage server durability lag.
fdyno_fdb_status_storage_data_lag_seconds gauge The largest storage server data lag.
fdyno_fdb_status_throttled_tags{kind} gauge Tags the cluster throttles now, kind auto or manual.
fdyno_fdb_status_moving_data_bytes gauge Data in flight for data distribution.

JSON-only views

JSON key Meaning
slow_request_threshold_ms The DYNODB_SLOW_REQUEST_MS threshold.
slow_requests_total Requests over the threshold.
slow_requests The last 64 slow requests. See slow requests.
tables A 60-second per-table view. See per-table hot spots.

Prometheus has four unlabelled gauges for the per-table view: fdyno_table_stats_tracked, fdyno_table_stats_max, fdyno_table_stats_window_seconds and fdyno_table_stats_evictions_total.