Skip to content

Commit

Permalink
chore: add metrics documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Jun 6, 2024
1 parent 0dcbe4d commit 9b3a3bd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions metrics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Pricefeeder Metrics

## Available metrics

### `fetched_prices_total`

The total number of prices fetched from the data sources. This metric is incremented every time the price feeder fetches prices from the data sources.

**labels**:

- `source`: The data source from which the price was fetched, e.g. `Bybit`.
- `success`: The result of the fetch operation. Possible values are 'true' and 'false'.

### `aggregate_prices_total`

The total number of times the `AggregatePriceProvider` is called to return a price. It randomly selects a source for each pair from its map of price providers. This metric is incremented every time the `AggregatePriceProvider` is called.

**labels**:

- `pair`: The pair for which the price was aggregated.
- `source`: The data source from which the price was fetched, e.g. `Bybit`.
- `success`: The result of the fetch operation. Possible values are 'true' and 'false'.

### `prices_posted_total`

The total number of txs sent to the on-chain oracle module. This metric is incremented every time the price feeder posts a price to the on-chain oracle module.

**labels**:

- `success`: The result of the post operation. Possible values are 'true' and 'false'.

0 comments on commit 9b3a3bd

Please sign in to comment.