# AllSet Services Prometheus Metrics

All services expose Prometheus-format metrics via HTTP `GET /metrics`.

### Endpoints

URL pattern: `{endpoint}/{chain}/{service}-metrics/metrics`

**Mainnet — `https://allset.fast.xyz`**

**Ethereum**

* Generator: https://allset.fast.xyz/ethereum/generator-metrics/metrics
* Verifier: https://allset.fast.xyz/ethereum/verifier-metrics/metrics
* Relayer: https://allset.fast.xyz/ethereum/relayer-metrics/metrics
* Block Hash: https://allset.fast.xyz/ethereum/block-hash-metrics/metrics

**Base**

* Generator: https://allset.fast.xyz/base/generator-metrics/metrics
* Verifier: https://allset.fast.xyz/base/verifier-metrics/metrics
* Relayer: https://allset.fast.xyz/base/relayer-metrics/metrics
* Block Hash: https://allset.fast.xyz/base/block-hash-metrics/metrics

**Arbitrum**

* Generator: https://allset.fast.xyz/arbitrum/generator-metrics/metrics
* Verifier: https://allset.fast.xyz/arbitrum/verifier-metrics/metrics
* Relayer: https://allset.fast.xyz/arbitrum/relayer-metrics/metrics
* Block Hash: https://allset.fast.xyz/arbitrum/block-hash-metrics/metrics

**Testnet — `https://testnet.allset.xyz`**

**Ethereum Sepolia**

* Generator: https://testnet.allset.xyz/ethereum-sepolia/generator-metrics/metrics
* Verifier: https://testnet.allset.xyz/ethereum-sepolia/verifier-metrics/metrics
* Relayer: https://testnet.allset.xyz/ethereum-sepolia/relayer-metrics/metrics
* Block Hash: https://testnet.allset.xyz/ethereum-sepolia/block-hash-metrics/metrics

**Arbitrum Sepolia**

* Generator: https://testnet.allset.xyz/arbitrum-sepolia/generator-metrics/metrics
* Verifier: https://testnet.allset.xyz/arbitrum-sepolia/verifier-metrics/metrics
* Relayer: https://testnet.allset.xyz/arbitrum-sepolia/relayer-metrics/metrics
* Block Hash: https://testnet.allset.xyz/arbitrum-sepolia/block-hash-metrics/metrics

***

### Generator

| Metric                   | Type    | Description                                                    |
| ------------------------ | ------- | -------------------------------------------------------------- |
| `total_generate_succeed` | Counter | Cumulative count of successfully generated claims              |
| `total_generate_failed`  | Gauge   | Failed generations since last success (resets to 0 on success) |
| `pending_logs_count`     | Gauge   | Number of log records currently in pending status              |
| `reorged_logs_total`     | Counter | Cumulative count of logs marked failed due to chain reorg      |

* `total_generate_succeed` / `total_generate_failed` — incremented in `utils.rs` during claim generation; failed gauge resets on each success.
* `pending_logs_count` — set in `poller.rs` after each poll cycle.
* `reorged_logs_total` — incremented in `poller.rs` when a reorg is detected and logs are invalidated.

### Verifier

| Metric                 | Type    | Description                                                      |
| ---------------------- | ------- | ---------------------------------------------------------------- |
| `total_verify_succeed` | Counter | Cumulative count of successfully verified claims                 |
| `total_verify_failed`  | Gauge   | Failed verifications since last success (resets to 0 on success) |

* Both metrics are updated in `poller.rs` during the verification loop.

### Relayer

| Metric                | Type    | Description                                                       |
| --------------------- | ------- | ----------------------------------------------------------------- |
| `total_relay_succeed` | Counter | Cumulative count of successfully relayed transactions             |
| `total_relay_failed`  | Gauge   | Failed relay attempts since last success (resets to 0 on success) |
| `queue_size`          | Gauge   | Current number of jobs in the relay queue                         |

* `queue_size` — incremented in `submitter.rs` when a job is enqueued, decremented on dequeue.
* `total_relay_succeed` — incremented in `monitor.rs` when on-chain confirmation is received.
* `total_relay_failed` — incremented in `submitter.rs` / `monitor.rs` on failure; resets on success.

### Block Hash

| Metric                        | Type    | Description                                                                        |
| ----------------------------- | ------- | ---------------------------------------------------------------------------------- |
| `total_processed_blocks`      | Counter | Cumulative count of successfully processed blocks                                  |
| `block_processing_queue_size` | Gauge   | Current number of blocks waiting in the processing queue                           |
| `failed_block_submissions`    | Gauge   | Failed block submissions since last successful processing (resets to 0 on success) |
| `retried_blocks`              | Counter | Cumulative count of blocks that were retried                                       |

* All metrics are updated in `processing.rs` during the block processing loop.
