You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/node/web3.mdx
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,53 @@ service] and register it in the service manager for your platform.
209
209
210
210
:::
211
211
212
+
### Metrics
213
+
214
+
Web3 Gateway can report a number of metrics to Prometheus server.
215
+
Metrics collection is not enabled by default. Enable metrics by configuring
216
+
the `monitoring` section in the config file of the Web3 gateway.
217
+
218
+
```yaml title='gateway.yml'
219
+
...
220
+
# Existing fields omitted ...
221
+
gateway:
222
+
# Existing fields omitted ...
223
+
monitoring:
224
+
host: "localhost"
225
+
# Use different port for each Web3 gateway instance, if all run locally.
226
+
port: 9999
227
+
```
228
+
229
+
Oasis Web3 Gateway reports metrics starting with `oasis_web3_gateway_`.
230
+
231
+
The following metrics are currently reported:
232
+
233
+
<!-- markdownlint-disable line-length -->
234
+
235
+
Name | Type | Description | Labels | Package
236
+
-----|------|-------------|--------|--------
237
+
oasis_web3_gateway_gas_oracle_node_min_price | Gauge | Min gas price queried from the node. | | [gas](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/gas/backend.go)
238
+
oasis_web3_gateway_gas_oracle_computed_price | Gauge | Computed recommended gas price based on recent full blocks. -1 if none (no recent full blocks). | | [gas](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/gas/backend.go)
239
+
oasis_web3_gateway_cache_hits | Gauge | Number of cache hits. | cache | [indexer](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/indexer/backend_cache.go)
240
+
oasis_web3_gateway_cache_misses | Gauge | Number of cache misses. | cache | [indexer](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/indexer/backend_cache.go)
241
+
oasis_web3_gateway_cache_hit_ratio | Gauge | Percent of Hits over all accesses (Hits + Misses). | cache | [indexer](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/indexer/backend_cache.go)
oasis_web3_gateway_indexer_health | Gauge | 1 if gateway indexer healthcheck is reporting as healthy, 0 otherwise. | | [indexer](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/indexer/indexer.go)
245
+
oasis_web3_gateway_subscription_seconds | Histogram | Histogram for the eth subscription API subscriptions duration. | method_name | [rpc/eth/filters](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/eth/filters/metrics.go)
246
+
oasis_web3_gateway_subscription_inflight | Gauge | Number of concurrent eth inflight subscriptions. | method_name | [rpc/eth/filters](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/eth/filters/metrics.go)
247
+
oasis_web3_gateway_api_request_heights | Histogram | Histogram of eth API request heights (difference from the latest height). | method_name | [rpc/eth/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/eth/metrics/api.go)
248
+
oasis_web3_gateway_signed_queries | Counter | Number of eth_call signed queries. | | [rpc/eth/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/eth/metrics/api.go)
249
+
oasis_web3_gateway_api_seconds | Histogram | Histogram for the eth API requests duration. | method_name | [rpc/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/metrics/metrics.go)
250
+
oasis_web3_gateway_api_request | Counter | Counter for API requests. | method_name | [rpc/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/metrics/metrics.go)
251
+
oasis_web3_gateway_api_failure | Counter | Counter for API request failures. | method_name | [rpc/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/metrics/metrics.go)
252
+
oasis_web3_gateway_api_success | Counter | Counter for API successful requests. | method_name | [rpc/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/metrics/metrics.go)
253
+
oasis_web3_gateway_api_inflight | Gauge | Number of inflight API request. | method_name | [rpc/metrics](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/rpc/metrics/metrics.go)
254
+
oasis_web3_gateway_health | Gauge | 1 if gateway healthcheck is reporting as healthy, 0 otherwise. | | [server](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/server/json_rpc.go)
255
+
oasis_web3_gateway_psql_query_seconds | Histogram | Histogram for the postgresql query duration. | query | [storage/psql](https://github.com/oasisprotocol/oasis-web3-gateway/blob/main/storage/psql/metrics.go)
256
+
257
+
<!-- markdownlint-enable line-length -->
258
+
212
259
## Archive Web3 Gateway
213
260
214
261
Each Oasis Web3 gateway can only connect to and synchronize blocks from a
0 commit comments