1.0.1 • Published 3 months ago
@autometrics/exporter-otlp-http v1.0.1
@autometrics/exporter-otlp-http
Export metrics by pushing them to an OpenTelemetry Collector.
For this exporter to work, you need to have an Otel Collector running, see: https://opentelemetry.io/docs/collector/getting-started/
Documentation
Full documentation for the autometrics
library can be found here:
https://github.com/autometrics-dev/autometrics-ts.
Installation
# npm
npm install @autometrics/autometrics @autometrics/exporter-otlp-http
# yarn
yarn add @autometrics/autometrics @autometrics/exporter-otlp-http
# pnpm
pnpm add @autometrics/autometrics @autometrics/exporter-otlp-http
Usage
- Anywhere in your source code:
import { autometrics } from "@autometrics/autometrics";
import { init } from "@autometrics/exporter-otlp-http";
init({ url: "https://<your-otel-collector>" });
async function createUserRaw(payload: User) {
// ...
}
const createUser = autometrics(createUserRaw);
// ^ instrumented function
1.0.1
3 months ago
1.0.0
6 months ago
0.7.0
8 months ago
0.7.0-beta12
8 months ago
0.7.0-beta11
8 months ago
0.7.0-beta10
9 months ago
0.7.0-beta5
9 months ago
0.7.0-beta4
9 months ago