Monitoring & Observability
AlgoBridge provides several layers of visibility into sync health, latency, error rates, and Salesforce API usage.
Connection Health Dashboard
Go to Health in your workspace to see a real-time overview of all system components. The dashboard auto-refreshes every 30 seconds and shows five panels:
| Panel | What it shows |
|---|---|
| PostgreSQL | Connection status, query latency |
| Salesforce | OAuth status, org ID, API version, daily API calls used vs limit |
| Sync Engine | Running / paused, last cycle timestamp, current queue depth |
| Trigger Health | Status of each trigger installed on mapped tables |
| Plan Limits | Mapping count vs plan limit |
Per-Mapping Error-Rate Health Scores
Each mapping in the Mappings list displays a health score from 0 to 100:
| Score | Meaning |
|---|---|
| 90–100 | Healthy — < 1% failure rate |
| 70–89 | Warning — 1–10% failure rate |
| 40–69 | Degraded — 10–25% failure rate |
| 0–39 | Critical — > 25% failure rate |
The score is calculated from the last 500 trigger-log rows for that mapping. It updates on each sync cycle.
Click a mapping to see the error-rate trend chart and the breakdown of failure reasons.
Sync Latency — p50 / p95
The Health dashboard shows sync latency percentiles for each mapping: the time from when a row enters _trigger_log (DB write) to when Salesforce confirms the operation.
| Metric | Description |
|---|---|
| p50 | Median latency — 50% of rows sync faster than this |
| p95 | 95th-percentile latency — a measure of worst-case performance |
Latency history is shown as a 7-day sparkline per mapping. Values above 30 seconds indicate a backlogged queue or a slow Salesforce API response.
The per-mapping latency breakdown is also available in Mappings → (mapping) → Stats.
Salesforce API Quota Dashboard
The Health → Salesforce panel shows:
- Daily API calls used — how many SOAP/Bulk API calls have been made today
- Daily limit — your org’s total daily API limit
- Percentage consumed — with a warning indicator at 80%
This data is fetched directly from the Salesforce API limits endpoint and cached for 5 minutes. It reflects all API consumers in your org, not just AlgoBridge.
Tip: If you are consistently near your daily limit, consider reducing the number of active bidirectional mappings or switching high-volume objects to SF→PG only (which uses SOQL polling, not the write API).
Data Validation Report
The data validation report compares PostgreSQL row counts against Salesforce record counts for each active mapping. It helps detect gaps caused by bulk deletes, failed initial loads, or sync interruptions.
To run a validation:
- Go to Mappings → (mapping) → Validate
- Click Run Comparison
AlgoBridge queries Salesforce for the total active record count (SELECT COUNT() FROM Object WHERE IsDeleted = false) and compares it to the PostgreSQL row count for that table. Results show:
| Column | Description |
|---|---|
| SF count | Records in Salesforce (non-deleted) |
| PG count | Rows in your PostgreSQL table |
| Delta | Difference (positive = more in SF, negative = more in PG) |
| Status | In sync / Out of sync |
A delta of 0 means the counts match. A non-zero delta does not necessarily indicate a bug — soft-deleted records, archived rows, or active initial loads can cause temporary discrepancies.
Prometheus Metrics
AlgoBridge exposes a Prometheus-compatible metrics endpoint:
GET /api/metrics
This endpoint is unauthenticated and outside the /api/v1/ prefix — no Bearer token needed. Add it to your Prometheus scrape config or Grafana Agent directly.
Available metrics
| Metric | Type | Labels | Description |
|---|---|---|---|
algobridge_sync_rows_total |
Counter | workspace_id, object |
Total rows successfully synced to Salesforce |
algobridge_sync_errors_total |
Counter | workspace_id, object |
Total rows that failed to sync |
algobridge_trigger_log_queue_depth |
Gauge | workspace_id |
Current rows in NEW state (unprocessed) |
algobridge_sf_api_calls_total |
Counter | workspace_id, api |
Total Salesforce API calls (SOAP or Bulk) |
Grafana scrape config example
scrape_configs:
- job_name: algobridge
static_configs:
- targets: ['your-instance.example.com']
metrics_path: /api/metrics
scheme: https
Example output
# HELP algobridge_sync_rows_total Total rows synced to Salesforce
# TYPE algobridge_sync_rows_total counter
algobridge_sync_rows_total{workspace_id="ws_abc",object="Contact"} 14293
algobridge_sync_rows_total{workspace_id="ws_abc",object="Opportunity"} 3021
# HELP algobridge_trigger_log_queue_depth Current rows in NEW state
# TYPE algobridge_trigger_log_queue_depth gauge
algobridge_trigger_log_queue_depth{workspace_id="ws_abc"} 0
Activity Log
Go to Monitoring → Activity for a per-record sync history. You can filter by:
- Object / table name
- Log entry type (INSERT / UPDATE / DELETE)
- Date range
Entries are paginated with Load More at the bottom of the list. The view auto-refreshes every 10 seconds while open.
Salesforce Errors Tab
Go to Monitoring → Salesforce Errors to see all rows currently in FAILED state across all mappings. From here you can:
- Retry individual errors (resets state to
NEW) - Clear errors (marks them as
IGNORED— removes from the error list without retrying) - Filter by object or error message
For per-record timeline history and field-level diffs, use the Record Explorer.