@lidofinance/api-rpc
v0.46.0
Published
FetchRpc extension for api
Downloads
520
Readme
@lidofinance/api-rpc
Extension of fetchRpc, to track common RPC metrics.
Installation
yarn add @lidofinance/api-rpc
Getting started
It's only a factory, which extends fetchRpc
, where you need to pass prom-client's registry
and prefix for all
tracked metrics.
import { trackedFetchRpcFactory } from '@lidofinance/api-rpc';
import { registry } from './metrics';
import { METRICS_PREFIX } from '../config';
export const fetchRPC = trackedFetchRpcFactory({
registry,
prefix: METRICS_PREFIX,
});