brettermetrics
v0.6.3
Published
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
Downloads
1
Readme
@autometrics/autometrics
📈✨
Documentation
Full documentation for @autometrics/autometrics
library can be found
here.
Installation: autometrics and peer dependencies
# npm
npm install @autometrics/autometrics @opentelemetry/sdk-metrics
@opentelemetry/exporter-prometheus
# yarn
yarn add @autometrics/autometrics @opentelemetry/sdk-metrics
@opentelemetry/exporter-prometheus
# pnpm
pnpm add @autometrics/autometrics @opentelemetry/sdk-metrics
@opentelemetry/exporter-prometheus
Basic example
import { autometrics } from "@autometrics/autometrics";
async function createUser(payload: User) {
// ...
}
const user = autometrics(createUser);
// ^ instrumented function