This is the basic convenience package that bundles the wrapper library and OpenTelemetry dependencies.
Full documentation for autometrics
library can be found
here.
# npm
npm install autometrics
# yarn
yarn add autometrics
# pnpm
pnpm add autometrics
- Anywhere in your source code:
import { autometrics } from "autometrics";
async function createUserRaw(payload: User) {
// ...
}
const createUser = autometrics(createUserRaw);
// ^ instrumented function